%define name docbook-dtd31-sgml %define version 1.0 %define release 5mdk %define dtdver 3.1 %define mltyp sgml %define sgmlbase %{_datadir}/sgml Name : %{name} Version : %{version} Release : %{release} Group : Publishing Summary : SGML document type definition for DocBook %{dtdver}. License : Distributable URL : http://www.oasis-open.org/docbook/ Provides : docbook-dtd-sgml Prereq : sgml-common >= 0.6.3-2mdk BuildRoot : %{_tmppath}/%{name}-buildroot Prefix : %{_prefix} # Zip file downloadable at http://www.oasis-open.org/docbook/sgml/%{dtdver}/ Source0 : docbk31.tar.bz2 Patch0 : %{name}-%{version}.catalog.patch.bz2 BuildArch : noarch %Description The DocBook Document Type Definition (DTD) describes the syntax of technical documentation texts (articles, books and manual pages). This syntax is SGML-compliant and is developed by the OASIS consortium. This is the version %{dtdver} of this DTD. %Prep %setup %patch -p1 %Build %Install rm -rf $RPM_BUILD_ROOT DESTDIR=$RPM_BUILD_ROOT%{sgmlbase}/docbook/sgml-dtd-%{dtdver} mkdir -p $DESTDIR install *.dcl $DESTDIR install docbook.cat $DESTDIR/catalog install *.dtd $DESTDIR install *.mod $DESTDIR %Clean rm -rf $RPM_BUILD_ROOT %Files %defattr (0644,root,root,0755) %doc *.txt ChangeLog %{sgmlbase}/docbook/sgml-dtd-%{dtdver} %Post /usr/bin/xmlcatalog --sgml --noout --add \ /etc/sgml/%{mltyp}-docbook-%{dtdver}.cat \ /usr/share/sgml/sgml-iso-entities-8879.1986/catalog /usr/bin/xmlcatalog --sgml --noout --add \ /etc/sgml/%{mltyp}-docbook-%{dtdver}.cat \ /usr/share/sgml/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 /usr/share/sgml/docbook/dsssl-stylesheets/catalog ]; then /usr/bin/xmlcatalog --sgml --noout --add \ /etc/sgml/%{mltyp}-docbook-%{dtdver}.cat \ /usr/share/sgml/openjade-%{openjadever}/catalog /usr/bin/xmlcatalog --sgml --noout --add \ /etc/sgml/%{mltyp}-docbook-%{dtdver}.cat \ /usr/share/sgml/docbook/dsssl-stylesheets/catalog fi %Postun # Do not remove if upgrade if [ "$1" = "0" ]; then /usr/bin/xmlcatalog --sgml --noout --del \ /etc/sgml/%{mltyp}-docbook-%{dtdver}.cat \ /usr/share/sgml/sgml-iso-entities-8879.1986/catalog /usr/bin/xmlcatalog --sgml --noout --del \ /etc/sgml/%{mltyp}-docbook-%{dtdver}.cat \ /usr/share/sgml/docbook/%{mltyp}-dtd-%{dtdver}/catalog fi # The following lines are for the case in which the style sheets # were not uninstalled because there is still another DTD if [ -e /usr/share/sgml/docbook/dsssl-stylesheets/catalog ]; then /usr/bin/xmlcatalog --sgml --noout --del \ /etc/sgml/%{mltyp}-docbook-%{dtdver}.cat \ /usr/share/sgml/openjade-%{openjadever}/catalog /usr/bin/xmlcatalog --sgml --noout --del \ /etc/sgml/%{mltyp}-docbook-%{dtdver}.cat \ /usr/share/sgml/docbook/dsssl-stylesheets/catalog fi %changelog * Thu Jan 24 2002 Camille Begnis <camille@mandrakesoft.com> 1.0-5mdk - use xmlcatalog from libxml-utils instead of install-catalog * 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 - Corrected file permissions - Removed useless variable - 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 * Thu Oct 19 2000 Camille Begnis <camille@mandrakesoft.com> 1.0-2mdk - put DTD version in %%{dtdver} * Wed Aug 23 2000 Camille Begnis <camille@mandrakesoft.com> 1.0-1mdk - adapt spec from Eric Bischoff <ebisch@cybercable.tm.fr> - Obsoletes docbook - Pre-LSB compliance