]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
sgml-common: Drop HTML documentation
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 18 Mar 2023 09:02:50 +0000 (10:02 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Mar 2023 18:25:39 +0000 (18:25 +0000)
We do not need this on our systems - anyway it
has been installed in a wrong directory.

Also replaced all hardcoded path values.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
sgml-common/sgml-common.nm

index e1e3f13f314387177aa46d09bc425474e15dbfe6..5a3a724836884c97e4919ad5939f5d876f428cea 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = sgml-common
 version    = 0.6.3
-release    = 2
+release    = 3
 arch       = noarch
 
 groups     = Applications/Text
@@ -31,60 +31,63 @@ build
        end
 
        configure_options += \
-               --mandir=/usr/share/man \
-               --sysconfdir=/etc
+               --mandir=%{mandir} \
+               --sysconfdir=%{sysconfdir}
 
        prepare_cmds
                for i in COPYING INSTALL install-sh missing mkinstalldirs; do \
                        rm -f ${i}; \
-                       cp -pvf /usr/share/automake*/${i} .; \
+                       cp -pvf %{datadir}/automake*/${i} .; \
                done
        end
 
        install_cmds
-               mkdir -pv %{BUILDROOT}/etc/{sg,x}ml/docbook
-               mkdir -pv %{BUILDROOT}/usr/share/sgml/docbook
+               mkdir -pv %{BUILDROOT}%{sysconfdir}/{sg,x}ml/docbook
+               mkdir -pv %{BUILDROOT}%{datadir}/sgml/docbook
 
                # Touch SGML catalog
-               touch %{BUILDROOT}/etc/sgml/catalog
+               touch %{BUILDROOT}%{sysconfdir}/sgml/catalog
 
                # Create an empty XML catalog.
-               xmlcatalog --noout --create %{BUILDROOT}/etc/xml/catalog
+               xmlcatalog --noout --create %{BUILDROOT}%{sysconfdir}/xml/catalog
 
                # Now put the common DocBook entries in it
                xmlcatalog --noout --add "delegatePublic" \
                        "-//OASIS//ENTITIES DocBook XML" \
-                       "file:///etc/sgml/docbook/xmlcatalog" %{BUILDROOT}/etc/xml/catalog
+                       "file://%{sysconfdir}/sgml/docbook/xmlcatalog" %{BUILDROOT}%{sysconfdir}/xml/catalog
 
                xmlcatalog --noout --add "delegatePublic" \
                        "-//OASIS//DTD DocBook XML" \
-                       "file:///etc/sgml/docbook/xmlcatalog" %{BUILDROOT}/etc/xml/catalog
+                       "file://%{sysconfdir}/sgml/docbook/xmlcatalog" %{BUILDROOT}%{sysconfdir}/xml/catalog
 
                xmlcatalog --noout --add "delegatePublic" \
                        "ISO 8879:1986" \
-                       "file:///etc/sgml/docbook/xmlcatalog" %{BUILDROOT}/etc/xml/catalog
+                       "file://%{sysconfdir}/sgml/docbook/xmlcatalog" %{BUILDROOT}%{sysconfdir}/xml/catalog
 
                xmlcatalog --noout --add "delegateSystem" \
                        "http://www.oasis-open.org/docbook/" \
-                       "file:///etc/sgml/docbook/xmlcatalog" %{BUILDROOT}/etc/xml/catalog
+                       "file://%{sysconfdir}/sgml/docbook/xmlcatalog" %{BUILDROOT}%{sysconfdir}/xml/catalog
 
                xmlcatalog --noout --add "delegateURI" \
                        "http://www.oasis-open.org/docbook/" \
-                       "file:///etc/sgml/docbook/xmlcatalog" %{BUILDROOT}/etc/xml/catalog
+                       "file://%{sysconfdir}/sgml/docbook/xmlcatalog" %{BUILDROOT}%{sysconfdir}/xml/catalog
 
                # Also create the common DocBook catalog
                xmlcatalog --noout --create \
-                       %{BUILDROOT}/etc/sgml/docbook/xmlcatalog
+                       %{BUILDROOT}%{sysconfdir}/sgml/docbook/xmlcatalog
 
-               ln -svf ../../../../etc/sgml/docbook/xmlcatalog \
-                       %{BUILDROOT}/usr/share/sgml/docbook/xmlcatalog
+               ln -svf ../../../..%{sysconfdir}/sgml/docbook/xmlcatalog \
+                       %{BUILDROOT}%{datadir}/sgml/docbook/xmlcatalog
 
-               rm -f %{BUILDROOT}/usr/share/sgml/xml.dcl
+               rm -rvf %{BUILDROOT}%{datadir}/sgml/xml.dcl
 
                install -p -m0644 %{DIR_SOURCE}/*.dcl %{DIR_SOURCE}/*.soc \
-                       %{BUILDROOT}/usr/share/sgml
+                       %{BUILDROOT}%{datadir}/sgml
 
-               rm -rf %{BUILDROOT}/usr/share/xml/*
+               rm -rvf %{BUILDROOT}%{datadir}/xml/*
+
+               # Remove unused and wrongly installed HTML documentation.
+               rm -rvf %{BUILDROOT}%{prefix}/doc
        end
 end
 
@@ -104,9 +107,9 @@ packages
                end
 
                files
-                       /etc/xml
-                       /etc/sgml/docbook/xmlcatalog
-                       /usr/share/sgml/docbook/xmlcatalog
+                       %{sysconfdir}/xml
+                       %{sysconfdir}/sgml/docbook/xmlcatalog
+                       %{datadir}/sgml/docbook/xmlcatalog
                end
        end
 end