%define dtdver 4.1.2 %define mltyp xml Name: docbook-dtd412-xml Version: 1.0 Release: 18mdk Group : Publishing Summary: XML document type definition for DocBook %{dtdver} License: Artistic style URL : http://www.oasis-open.org/docbook/ Provides: docbook-dtd-%{mltyp} Requires(pre): coreutils Requires(pre): sgml-common >= 0.6.3-2mdk Requires(pre): libxml2-utils BuildRoot: %_tmppath/%name-buildroot # Zip file downloadable at http://www.oasis-open.org/docbook/%{mltyp}/%{dtdver} Source0 : docbkx412.tar.bz2 Source1 : docbook-dtd412-xml-catalog.tar.bz2 Patch0 : %{name}-%{version}.catalog.patch.bz2 Patch1 : %{name}-%{version}.dbcentx.patch.bz2 BuildArch: noarch %define sgmlbase %{_datadir}/sgml %Description The DocBook Document Type Definition (DTD) describes the syntax of technical documentation texts (articles, books and manual pages). This syntax is XML-compliant and is developed by the OASIS consortium. This is the version %{dtdver} of this DTD. %Prep %setup -q %setup -D -a 1 -q %patch0 -p1 %patch1 -p1 %Build %Install rm -rf $RPM_BUILD_ROOT DESTDIR=$RPM_BUILD_ROOT%{sgmlbase}/docbook/%{mltyp}-dtd-%{dtdver} mkdir -p $DESTDIR install -m644 docbook.cat $DESTDIR/catalog install -m644 xmlcatalog $DESTDIR install -m644 *.dtd $DESTDIR install -m644 *.mod $DESTDIR # Symlinks mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sgml ln -s %{mltyp}-docbook-%{dtdver}.cat \ $RPM_BUILD_ROOT%{_sysconfdir}/sgml/%{mltyp}-docbook.cat mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sgml touch $RPM_BUILD_ROOT%{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat # What's that for? # touch $RPM_BUILD_ROOT%{_sysconfdir}/sgml/catalog %clean rm -rf $RPM_BUILD_ROOT %Files %defattr (-,root,root) %doc *.txt ChangeLog %dir %{sgmlbase}/docbook/%{mltyp}-dtd-%{dtdver} %{sgmlbase}/docbook/%{mltyp}-dtd-%{dtdver} %{_sysconfdir}/sgml/xml-docbook.cat %ghost %config(noreplace) %{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat # rpmlint complains about this and indeed seems unnecesary # %ghost %config(noreplace) %{_sysconfdir}/sgml/catalog #fix buggy XML catalog unregistration which was present in postun script #for all versions before 1.0-10mdk %triggerpostun -- docbook-dtd412-xml < 1.0-10mdk CATALOG=%{sgmlbase}/docbook/xmlcatalog %{_bindir}/xmlcatalog --noout --add "delegatePublic" \ "-//OASIS//DTD DocBook XML" \ "file:///usr/share/sgml/docbook/xml-dtd-4.1.2/xmlcatalog" $CATALOG %{_bindir}/xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.1.2" \ "xml-dtd-4.1.2" $CATALOG %{_bindir}/xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.1.2" \ "xml-dtd-4.1.2" $CATALOG #fix old buggy postun %triggerpostun -- docbook-dtd412-xml < 1.0-15mdk if [ -e %{sgmlbase}/openjade/catalog ]; then %{_bindir}/xmlcatalog --sgml --noout --add \ %{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat \ %{sgmlbase}/openjade/catalog fi if [ -e %{sgmlbase}/docbook/dsssl-stylesheets/catalog ]; then %{_bindir}/xmlcatalog --sgml --noout --add \ %{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat \ %{sgmlbase}/docbook/dsssl-stylesheets/catalog fi %Post ## ## SGML catalog ## %{_bindir}/xmlcatalog --sgml --noout --add \ %{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat \ %{sgmlbase}/sgml-iso-entities-8879.1986/catalog %{_bindir}/xmlcatalog --sgml --noout --add \ %{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat \ %{sgmlbase}/docbook/%{mltyp}-dtd-%{dtdver}/catalog # The following lines are for the case in which the style sheets # were installed after another DTD but before this DTD if [ -e %{sgmlbase}/openjade/catalog ]; then %{_bindir}/xmlcatalog --sgml --noout --add \ %{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat \ %{sgmlbase}/openjade/catalog fi if [ -e %{sgmlbase}/docbook/dsssl-stylesheets/catalog ]; then %{_bindir}/xmlcatalog --sgml --noout --add \ %{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat \ %{sgmlbase}/docbook/dsssl-stylesheets/catalog fi ## ## XML catalog ## CATALOG=%{sgmlbase}/docbook/xmlcatalog %{_bindir}/xmlcatalog --noout --add "delegatePublic" \ "-//OASIS//DTD DocBook XML" \ "file:///usr/share/sgml/docbook/xml-dtd-4.1.2/xmlcatalog" $CATALOG %{_bindir}/xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.1.2" \ "xml-dtd-4.1.2" $CATALOG %{_bindir}/xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.1.2" \ "xml-dtd-4.1.2" $CATALOG %Postun # test xmlcatalog is available before using it... if [ -x %{_bindir}/xmlcatalog ]; then ## ## SGML catalog ## # Do not remove if upgrade if [ "$1" = "0" ]; then %{_bindir}/xmlcatalog --sgml --noout --del \ %{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat \ %{sgmlbase}/sgml-iso-entities-8879.1986/catalog %{_bindir}/xmlcatalog --sgml --noout --del \ %{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat \ %{sgmlbase}/docbook/%{mltyp}-dtd-%{dtdver}/catalog # The following lines are for the case in which the style sheets # were not uninstalled because there is still another DTD if [ -e %{sgmlbase}/openjade/catalog ]; then %{_bindir}/xmlcatalog --sgml --noout --del \ %{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat \ %{sgmlbase}/openjade/catalog fi if [ -e %{sgmlbase}/docbook/dsssl-stylesheets/catalog ]; then %{_bindir}/xmlcatalog --sgml --noout --del \ %{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat \ %{sgmlbase}/docbook/dsssl-stylesheets/catalog fi ## ## XML catalog ## CATALOG=%{sgmlbase}/docbook/xmlcatalog if [ -f $CATALOG ]; then %{_bindir}/xmlcatalog --noout --del \ "-//OASIS//DTD DocBook XML" $CATALOG %{_bindir}/xmlcatalog --noout --del \ "xml-dtd-4.1.2" $CATALOG fi fi fi %changelog * Tue Mar 21 2006 Camille Begnis <camille@mandriva.com> 1.0-18mdk - rebuild - change requires syntax * Tue Nov 23 2004 Camille Begnis <camille@mandrakesoft.com> 1.0-17mdk - added Prereq: libxml2-utils [Bug 12470] - remove unnecesary ghost file /etc/sgml/catalog * Mon Aug 16 2004 Camille Begnis <camille@mandrakesoft.com> 1.0-16mdk - rebuild * Mon Jul 21 2003 Frederic Crozat <fcrozat@mandrakesoft.com> - 1.0-15mdk - Add some ghost/config files to package - Fix upgrade * Fri Jul 18 2003 Frederic Crozat <fcrozat@mandrakesoft.com> - 1.0-14mdk - Fix uninstall : only unregister from existing catalog * Wed Jan 22 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.0-13mdk - better check xmlcatalog is executable * Wed Jan 22 2003 <camille@ke.mandrakesoft.com> 1.0-12mdk - Do not try to uninstall catalogs if xmlcatalog is no longer available * Thu Nov 07 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.0-11mdk - requires s/fileutils/coreutils/ - remove useless prefix * Thu Aug 29 2002 Frederic Crozat <fcrozat@mandrakesoft.com> 1.0-10mdk - Fix xml catalog registration when upgrading from all previous version * Mon Aug 19 2002 <camille@ke.mandrakesoft.com> 1.0-9mdk - Removed openjade requires. (fcrozat) * Thu Jan 24 2002 Camille Begnis <camille@mandrakesoft.com> 1.0-8mdk - use new openjade insalled in /usr/share/sgml/openjade/ * Thu Jan 24 2002 Camille Begnis <camille@mandrakesoft.com> 1.0-7mdk - use xmlcatalog from libxml-utils instead of install-catalog - add support for XML catalogs as supported by libxml2 (xsltproc) * Thu Nov 29 2001 Camille Begnis <camille@mandrakesoft.com> 1.0-6mdk - added dbcentx.patch to correct bad ISO entity filenames * Thu Sep 06 2001 Camille Begnis <camille@mandrakesoft.com> 1.0-5mdk - Suppress Requires : xml-common (included in sgml-common) * Mon Jun 11 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.0-4mdk - Merge patches from Abel Cheung: - s/Copyright/License/ - Simplify %%files - Source0 is not downloadable itself, it's just a re-compressed archive - Relativisation of symlinks now works with non-root compilation - Removed useless variable - Corrected file permissions - More macros - Rearrange BuildArch to bottom, no idea why source and patch refuses to be removed otherwise * Tue Mar 13 2001 Camille Begnis <camille@mandrakesoft.com> 1.0-3mdk - Redirect install-catalog output to /dev/null * Mon Jan 08 2001 Camille Begnis <camille@mandrakesoft.com> 1.0-2mdk - Add link to ISO entities * Thu Oct 19 2000 Camille Begnis <camille@mandrakesoft.com> 1.0-1mdk - New for mandrake