1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
11 groups = Applications/Text
12 url = http://www.oasis-open.org/docbook/
13 license = Copyright only
14 summary = SGML and XML document type definitions for DocBook.
17 The DocBook Document Type Definition (DTD) describes the syntax of
18 technical documentation texts (articles, books and manual pages).
19 This syntax is XML-compliant and is developed by the OASIS consortium.
20 This package contains SGML and XML versions of the DocBook DTD.
23 # Update version as runtime dependency if changes.
24 version_openjade = 1.3.2
41 # Update directories at the scriptlets if there will be any changes.
64 # Define a bash function to extract the files
65 function macro_extract()
67 mkdir -pv %{DIR_APP}/$2
68 cd %{DIR_APP}/$2 && unzip %{DIR_DL}/$1
72 macro_extract docbk30.zip 3.0-sgml
73 macro_extract docbk31.zip 3.1-sgml
74 macro_extract docbk40.zip 4.0-sgml
75 macro_extract docbk41.zip 4.1-sgml
76 macro_extract docbkx412.zip 4.1.2-xml
77 macro_extract docbook-4.2.zip 4.2-sgml
78 macro_extract docbook-xml-4.2.zip 4.2-xml
79 macro_extract docbook-4.3.zip 4.3-sgml
80 macro_extract docbook-xml-4.3.zip 4.3-xml
81 macro_extract docbook-4.4.zip 4.4-sgml
82 macro_extract docbook-xml-4.4.zip 4.4-xml
83 macro_extract docbook-4.5.zip 4.5-sgml
84 macro_extract docbook-xml-4.5.zip 4.5-xml
86 # Convert all catalog files to unix format
87 cd %{DIR_APP} && dos2unix */docbook.cat
91 sed -e's,\(NAMELEN\s\+\)44\(\s\*\)\?,\1256,' -i.namelen */docbook.dcl
92 sed -i 's/\r//' */*.txt
94 chmod -R a+rX,g-w,o-w .
97 build = # Nothing to do
101 mkdir -pv %{BUILDROOT}/etc/sgml
102 for fmt in sgml xml; do
103 ln -svf $fmt-docbook-4.5.cat %{BUILDROOT}/etc/sgml/$fmt-docbook.cat
106 for dir in %{directories}; do
107 fmt=${dir#*-}; ver=${dir%%-*}
109 DESTDIR=%{BUILDROOT}/usr/share/sgml/docbook/$fmt-dtd-$ver
112 sgml) mkdir -pv $DESTDIR; install -v *.dcl $DESTDIR ;;
113 xml) mkdir -pv $DESTDIR/ent; install -v ent/* $DESTDIR/ent ;;
115 install -v *.dtd *.mod $DESTDIR
116 install -v docbook.cat $DESTDIR/catalog
117 touch %{BUILDROOT}/etc/sgml/${dir#*-}-docbook-$ver.cat
125 openjade=%{version_openjade}
130 openjade=%{version_openjade} \
134 # Install catalog files.
135 for dir in %{directories}; do
138 /usr/bin/xmlcatalog --sgml --noout --add /etc/sgml/${fmt}-docbook-${ver}.cat \
139 /usr/share/sgml/docbook/${fmt}-dtd-${ver}/catalog > /dev/null 2>/dev/null
140 /usr/bin/xmlcatalog --sgml --noout --add /etc/sgml/${fmt}-docbook-${ver}.cat \
141 /usr/share/sgml/sgml-iso-entities-8879.1986/catalog > /dev/null 2>/dev/null
144 # The STYLESHEETS/catalog command is for the case in which the style sheets
145 # were installed after another DTD but before this DTD
146 for STYLESHEETS in /usr/share/sgml/docbook/dsssl-stylesheets-*; do : ; done
148 *-"*") STYLESHEETS= ;;
151 for dir in %{directories}; do
156 # Update the centralized catalog corresponding to this version of the DTD
157 for cat_dir in /usr/share/sgml/sgml-iso-entities-8879.1986 /usr/share/sgml/docbook/$fmt-dtd-$ver $STYLESHEETS; do
158 /usr/bin/xmlcatalog --sgml --noout --add /etc/sgml/$fmt-docbook-$ver.cat $cat_dir/catalog > /dev/null 2>/dev/null
162 if [ $fmt = xml -a -w /usr/share/sgml/docbook/xmlcatalog ]; then
163 while read f desc; do
164 case $vers in 4.[45]) f=${f/-/} ;; esac
165 /usr/bin/xmlcatalog --add public "$desc" /usr/share/sgml/docbook/$fmt-dtd-$ver/$f /usr/share/sgml/docbook/xmlcatalog > /dev/null 2>/dev/null
167 ent/iso-pub.ent ISO 8879:1986//ENTITIES Publishing//EN
168 ent/iso-grk1.ent ISO 8879:1986//ENTITIES Greek Letters//EN
169 dbpoolx.mod -//OASIS//ELEMENTS DocBook XML Information Pool V$vers//EN
170 ent/iso-box.ent ISO 8879:1986//ENTITIES Box and Line Drawing//EN
171 docbookx.dtd -//OASIS//DTD DocBook XML V$vers//EN
172 ent/iso-grk3.ent ISO 8879:1986//ENTITIES Greek Symbols//EN
173 ent/iso-amsn.ent ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN
174 ent/iso-num.ent ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN
175 dbcentx.mod -//OASIS//ENTITIES DocBook XML Character Entities V$vers//EN
176 ent/iso-grk4.ent ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN
177 dbnotnx.mod -//OASIS//ENTITIES DocBook XML Notations V$vers//EN
178 ent/iso-dia.ent ISO 8879:1986//ENTITIES Diacritical Marks//EN
179 ent/iso-grk2.ent ISO 8879:1986//ENTITIES Monotoniko Greek//EN
180 dbgenent.mod -//OASIS//ENTITIES DocBook XML Additional General Entities V$vers//EN
181 dbhierx.mod -//OASIS//ELEMENTS DocBook XML Document Hierarchy V$vers//EN
182 ent/iso-amsa.ent ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN
183 ent/iso-amso.ent ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN
184 ent/iso-cyr1.ent ISO 8879:1986//ENTITIES Russian Cyrillic//EN
185 ent/iso-tech.ent ISO 8879:1986//ENTITIES General Technical//EN
186 ent/iso-amsc.ent ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN
187 soextblx.dtd -//OASIS//DTD XML Exchange Table Model 19990315//EN
188 calstblx.dtd -//OASIS//DTD DocBook XML CALS Table Model V$vers//EN
189 ent/iso-lat1.ent ISO 8879:1986//ENTITIES Added Latin 1//EN
190 ent/iso-amsb.ent ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN
191 ent/iso-lat2.ent ISO 8879:1986//ENTITIES Added Latin 2//EN
192 ent/iso-amsr.ent ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN
193 ent/iso-cyr2.ent ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN
196 for f in System URI; do
197 /usr/bin/xmlcatalog --add rewrite$f "http://www.oasis-open.org/docbook/xml/$vers" \
198 /usr/share/sgml/docbook/$fmt-dtd-$ver /usr/share/sgml/docbook/xmlcatalog > /dev/null 2>/dev/null
212 # Finally, make sure everything in /etc/sgml is readable!
213 chmod a+r /etc/sgml/*
217 # remove entries only on removal of package
218 if [ "$1" = 0 ]; then
249 for dir in %{directories}; do
250 fmt=${dir#*-} ver=${dir%%-*}
253 # Update the centralized catalog corresponding to this version of the DTD
254 /usr/bin/xmlcatalog --noout --sgml --del /etc/sgml/catalog /etc/sgml/$fmt-docbook-$ver.cat
255 rm -f /etc/sgml/$fmt-docbook-$ver.cat
258 if [ $fmt = xml -a -w /usr/share/sgml/docbook/xmlcatalog ]; then
259 for f in $entities; do
260 case $ver in 4.[45]) f=${f/-/} ;; esac
261 /usr/bin/xmlcatalog --noout --del /usr/share/sgml/docbook/$fmt-dtd-$ver/$f /usr/share/sgml/docbook/xmlcatalog
263 /usr/bin/xmlcatalog --noout --del /usr/share/sgml/docbook/$fmt-dtd-$ver /usr/share/sgml/docbook/xmlcatalog
267 # See the comment attached to this command in the postin scriptlet.