1 %define openjadever 1.3.2
2 %define version_list "{3,4}.{0,1}-sgml 4.1.2-xml 4.{2,3,4,5}-{sgml,xml}"
7 Group: Applications/Text
9 Summary: SGML and XML document type definitions for DocBook
11 License: Freely redistributable without restriction
12 URL: http://www.oasis-open.org/docbook/
13 Source0: %{name}-%{version}.tar.bz2
15 Requires(post): libxml2 >= 2.4.8
16 Requires(post): /bin/chmod
17 Requires(postun): libxml2 >= 2.4.8
18 Requires: sgml-common >= 0.6.3
19 Requires: xml-common >= 0.6.3
21 Provides: docbook-dtd-xml = %{version}-%{release}
22 Provides: docbook-dtd-sgml = %{version}-%{release}
23 Provides: docbook-dtd30-sgml = %{version}-%{release}
24 Provides: docbook-dtd31-sgml = %{version}-%{release}
25 Provides: docbook-dtd40-sgml = %{version}-%{release}
26 Provides: docbook-dtd41-sgml = %{version}-%{release}
27 Provides: docbook-dtd412-xml = %{version}-%{release}
28 Provides: docbook-dtd42-sgml = %{version}-%{release}
29 Provides: docbook-dtd42-xml = %{version}-%{release}
30 Provides: docbook-dtd43-sgml = %{version}-%{release}
31 Provides: docbook-dtd43-xml = %{version}-%{release}
32 Provides: docbook-dtd44-sgml = %{version}-%{release}
33 Provides: docbook-dtd44-xml = %{version}-%{release}
34 Provides: docbook-dtd45-sgml = %{version}-%{release}
35 Provides: docbook-dtd45-xml = %{version}-%{release}
39 The DocBook Document Type Definition (DTD) describes the syntax of
40 technical documentation texts (articles, books and manual pages).
41 This syntax is XML-compliant and is developed by the OASIS consortium.
42 This package contains SGML and XML versions of the DocBook DTD.
48 if [ `id -u` -eq 0 ]; then
50 chmod -R a+rX,g-w,o-w .
61 mkdir -p %{buildroot}/etc/sgml
62 for fmt in sgml xml; do
63 ln -s $fmt-docbook-4.5-%{version}-%{release}.cat \
64 %{buildroot}/etc/sgml/$fmt-docbook.cat
67 eval set %{version_list}
71 fmt=${dir#*-} vvr=${dir%%-*}-%{version}-%{release}
72 DESTDIR=%{buildroot}/usr/share/sgml/docbook/$fmt-dtd-$vvr
74 sgml) mkdir -p $DESTDIR ; install *.dcl $DESTDIR ;;
75 xml) mkdir -p $DESTDIR/ent ; install ent/* $DESTDIR/ent ;;
77 install *.dtd *.mod $DESTDIR
78 install docbook.cat $DESTDIR/catalog
81 touch %{buildroot}/etc/sgml/$fmt-docbook-$vvr.cat
88 catcmd='/usr/bin/xmlcatalog --noout'
89 xmlcatalog=/usr/share/sgml/docbook/xmlcatalog
91 ## Clean up pre-docbook-dtds mess caused by broken trigger.
92 for v in 3.0 3.1 4.0 4.1 4.2
94 if [ -f /etc/sgml/sgml-docbook-$v.cat ]
96 $catcmd --sgml --del /etc/sgml/sgml-docbook-$v.cat \
97 /usr/share/sgml/openjade-1.3.1/catalog 2>/dev/null
101 # The STYLESHEETS/catalog command is for the case in which the style sheets
102 # were installed after another DTD but before this DTD
103 for STYLESHEETS in /usr/share/sgml/docbook/dsssl-stylesheets-*; do : ; done
105 *-"*") STYLESHEETS= ;;
107 eval set %{version_list}
110 fmt=${dir#*-} ver=${dir%%-*} vvr=$ver-%{version}-%{release}
111 sgmldir=/usr/share/sgml/docbook/$fmt-dtd-$vvr
113 # Update the centralized catalog corresponding to this version of the DTD
114 for cat_dir in /usr/share/sgml/sgml-iso-entities-8879.1986 $sgmldir $STYLESHEETS; do
115 $catcmd --sgml --add /etc/sgml/$fmt-docbook-$vvr.cat $cat_dir/catalog
118 if [ $fmt = xml -a -w $xmlcatalog ]; then
119 while read f desc; do
120 case $ver in 4.[45]) f=${f/-/} ;; esac
121 $catcmd --add public "$desc" $sgmldir/$f $xmlcatalog
123 ent/iso-pub.ent ISO 8879:1986//ENTITIES Publishing//EN
124 ent/iso-grk1.ent ISO 8879:1986//ENTITIES Greek Letters//EN
125 dbpoolx.mod -//OASIS//ELEMENTS DocBook XML Information Pool V$ver//EN
126 ent/iso-box.ent ISO 8879:1986//ENTITIES Box and Line Drawing//EN
127 docbookx.dtd -//OASIS//DTD DocBook XML V$ver//EN
128 ent/iso-grk3.ent ISO 8879:1986//ENTITIES Greek Symbols//EN
129 ent/iso-amsn.ent ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN
130 ent/iso-num.ent ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN
131 dbcentx.mod -//OASIS//ENTITIES DocBook XML Character Entities V$ver//EN
132 ent/iso-grk4.ent ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN
133 dbnotnx.mod -//OASIS//ENTITIES DocBook XML Notations V$ver//EN
134 ent/iso-dia.ent ISO 8879:1986//ENTITIES Diacritical Marks//EN
135 ent/iso-grk2.ent ISO 8879:1986//ENTITIES Monotoniko Greek//EN
136 dbgenent.mod -//OASIS//ENTITIES DocBook XML Additional General Entities V$ver//EN
137 dbhierx.mod -//OASIS//ELEMENTS DocBook XML Document Hierarchy V$ver//EN
138 ent/iso-amsa.ent ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN
139 ent/iso-amso.ent ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN
140 ent/iso-cyr1.ent ISO 8879:1986//ENTITIES Russian Cyrillic//EN
141 ent/iso-tech.ent ISO 8879:1986//ENTITIES General Technical//EN
142 ent/iso-amsc.ent ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN
143 soextblx.dtd -//OASIS//DTD XML Exchange Table Model 19990315//EN
144 calstblx.dtd -//OASIS//DTD DocBook XML CALS Table Model V$ver//EN
145 ent/iso-lat1.ent ISO 8879:1986//ENTITIES Added Latin 1//EN
146 ent/iso-amsb.ent ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN
147 ent/iso-lat2.ent ISO 8879:1986//ENTITIES Added Latin 2//EN
148 ent/iso-amsr.ent ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN
149 ent/iso-cyr2.ent ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN
151 for f in System URI; do
152 $catcmd --add rewrite$f "http://www.oasis-open.org/docbook/xml/$ver" \
158 # Historic versions of this scriptlet contained the following comment:
160 # Fix up SGML super catalog so that there isn't an XML DTD before an
161 # SGML one. We need to do this (*sigh*) because xmlcatalog messes up
162 # the order of the lines, and SGML tools don't like to see XML things
163 # they aren't expecting.
165 # But the code that followed just found the first XML DTD and the first
166 # SGML DTD, swappinmg these two lines if the XML one preceded.
167 # But that only ensures that there is an SGML DTD before all XML ones.
168 # No one complained, so either this was enough, or the buggy SGML tools
169 # are long dead, or their users do not use bugzilla.
170 # Anyway, the following code, introduced in 1.0-46, does better: it ensures
171 # that all XML DTDs are after all SGML ones, by moving them to the end.
181 # Finally, make sure everything in /etc/sgml is readable!
182 /bin/chmod a+r /etc/sgml/*
185 catcmd='/usr/bin/xmlcatalog --noout'
186 xmlcatalog=/usr/share/sgml/docbook/xmlcatalog
216 eval set %{version_list}
219 fmt=${dir#*-} ver=${dir%%-*} vvr=$ver-%{version}-%{release}
220 sgmldir=/usr/share/sgml/docbook/$fmt-dtd-$vvr
222 # Update the centralized catalog corresponding to this version of the DTD
223 $catcmd --sgml --del /etc/sgml/catalog /etc/sgml/$fmt-docbook-$vvr.cat
224 rm -f /etc/sgml/$fmt-docbook-$vvr.cat
226 if [ $fmt = xml -a -w $xmlcatalog ]; then
227 for f in $entities; do
228 case $ver in 4.[45]) f=${f/-/} ;; esac
229 $catcmd --del $sgmldir/$f $xmlcatalog
231 $catcmd --del $sgmldir $xmlcatalog
235 # See the comment attached to this command in the %%post scriptlet.
247 %defattr (0644,root,root,0755)
248 # in upstream tarballs there are a lot of files with 0755 permissions
249 # but they don't need to be; 0644 is enough for every file in tarball
250 %doc --parents 3.1-sgml/ChangeLog 4.1-sgml/ChangeLog */*.txt
251 %config(noreplace) /etc/sgml/sgml-docbook.cat
252 %config(noreplace) /etc/sgml/xml-docbook.cat
253 %{_datadir}/sgml/docbook/*ml-dtd-*-%{version}-%{release}
254 %ghost %config(noreplace) /etc/sgml/*ml-docbook-*-%{version}-%{release}.cat