%define name docbook-dtd31-sgml %define version 1.0 %define release 9mdk %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}-%{version}-buildroot # 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 -q %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 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sgml touch $RPM_BUILD_ROOT%{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat touch $RPM_BUILD_ROOT%{_sysconfdir}/sgml/catalog %clean rm -rf $RPM_BUILD_ROOT %Files %defattr (0644,root,root,0755) %doc *.txt ChangeLog %ghost %config(noreplace) %{_sysconfdir}/sgml/%{mltyp}-docbook-%{dtdver}.cat %ghost %config(noreplace) %{_sysconfdir}/sgml/catalog %{sgmlbase}/docbook/sgml-dtd-%{dtdver} #fix old broken postun %triggerpostun -- docbook-dtd31-sgml < 1.0-8mdk 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 %{_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 %Postun # Do not remove if upgrade if [ "$1" = "0" -a -x %{_bindir}/xmlcatalog ]; 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 fi %changelog * Thu Apr 22 2004 Frederic Crozat <fcrozat@mandrakesoft.com> 1.0-9mdk - Fix uninstall when xmlcatalog is no longer present * Mon Jul 21 2003 Frederic Crozat <fcrozat@mandrakesoft.com> - 1.0-8mdk - Add some ghost/config files to package - Fix upgrade - Use more macros * Mon May 5 2003 <camille@ke.mandrakesoft.com> 1.0-7mdk - rebuild * Tue Mar 21 2002 Camille Begnis <camille@mandrakesoft.com> 1.0-6mdk - remove old {openjadever} not used anymore (Thanks fcrozat) * 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