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.
38 # Update directories at the scriptlets if there will be any changes.
61 # Define a bash function to extract the files
62 function macro_extract()
64 mkdir -pv %{DIR_APP}/$2
65 cd %{DIR_APP}/$2 && unzip %{DIR_DL}/$1
69 macro_extract docbk30.zip 3.0-sgml
70 macro_extract docbk31.zip 3.1-sgml
71 macro_extract docbk40.zip 4.0-sgml
72 macro_extract docbk41.zip 4.1-sgml
73 macro_extract docbkx412.zip 4.1.2-xml
74 macro_extract docbook-4.2.zip 4.2-sgml
75 macro_extract docbook-xml-4.2.zip 4.2-xml
76 macro_extract docbook-4.3.zip 4.3-sgml
77 macro_extract docbook-xml-4.3.zip 4.3-xml
78 macro_extract docbook-4.4.zip 4.4-sgml
79 macro_extract docbook-xml-4.4.zip 4.4-xml
80 macro_extract docbook-4.5.zip 4.5-sgml
81 macro_extract docbook-xml-4.5.zip 4.5-xml
83 # Convert all catalog files to unix format
84 cd %{DIR_APP} && dos2unix */docbook.cat
88 sed -e's,\(NAMELEN\s\+\)44\(\s\*\)\?,\1256,' -i.namelen */docbook.dcl
89 sed -i 's/\r//' */*.txt
91 chmod -R a+rX,g-w,o-w .
94 build = # Nothing to do
98 mkdir -pv %{BUILDROOT}/etc/sgml
99 for fmt in sgml xml; do
100 ln -svf $fmt-docbook-4.5.cat %{BUILDROOT}/etc/sgml/$fmt-docbook.cat
103 for dir in %{directories}; do
104 fmt=${dir#*-}; ver=${dir%%-*}
106 DESTDIR=%{BUILDROOT}/usr/share/sgml/docbook/$fmt-dtd-$ver
109 sgml) mkdir -pv $DESTDIR; install -v *.dcl $DESTDIR ;;
110 xml) mkdir -pv $DESTDIR/ent; install -v ent/* $DESTDIR/ent ;;
112 install -v *.dtd *.mod $DESTDIR
113 install -v docbook.cat $DESTDIR/catalog
114 touch %{BUILDROOT}/etc/sgml/${dir#*-}-docbook-$ver.cat
129 # Install catalog files.
130 for dir in %{directories}; do
133 /usr/bin/xmlcatalog --sgml --noout --add /etc/sgml/${fmt}-docbook-${ver}.cat \
134 /usr/share/sgml/docbook/${fmt}-dtd-${ver}/catalog > /dev/null 2>/dev/null
135 /usr/bin/xmlcatalog --sgml --noout --add /etc/sgml/${fmt}-docbook-${ver}.cat \
136 /usr/share/sgml/sgml-iso-entities-8879.1986/catalog > /dev/null 2>/dev/null
139 # Create XML catalog.
140 for dir in %{directories}; do
144 if [ $fmt = xml -a -w /usr/share/sgml/docbook/xmlcatalog ]; then
145 while read f desc; do
146 case $ver in 4.[45]) f={$f/-/} ;; esac
147 /usr/bin/xmlcatalog --noout --add public "$desc" /usr/share/sgml/docbook/${fmt}-dtd-${ver}/${f} \
148 /etc/sgml/docbook/xmlcatalog /dev/null 2>/dev/null
150 ent/iso-pub.ent ISO 8879:1986//ENTITIES Publishing//EN
151 ent/iso-grk1.ent ISO 8879:1986//ENTITIES Greek Letters//EN
152 dbpoolx.mod -//OASIS//ELEMENTS DocBook XML Information Pool V${ver}//EN
153 ent/iso-box.ent ISO 8879:1986//ENTITIES Box and Line Drawing//EN
154 docbookx.dtd -//OASIS//DTD DocBook XML V${ver}//EN
155 ent/iso-grk3.ent ISO 8879:1986//ENTITIES Greek Symbols//EN
156 ent/iso-amsn.ent ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN
157 ent/iso-num.ent ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN
158 dbcentx.mod -//OASIS//ENTITIES DocBook XML Character Entities V${ver}//EN
159 ent/iso-grk4.ent ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN
160 dbnotnx.mod -//OASIS//ENTITIES DocBook XML Notations V${ver}//EN
161 ent/iso-dia.ent ISO 8879:1986//ENTITIES Diacritical Marks//EN
162 ent/iso-grk2.ent ISO 8879:1986//ENTITIES Monotoniko Greek//EN
163 dbgenent.mod -//OASIS//ENTITIES DocBook XML Additional General Entities V${ver}//EN
164 dbhierx.mod -//OASIS//ELEMENTS DocBook XML Document Hierarchy V${vers}//EN
165 ent/iso-amsa.ent ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN
166 ent/iso-amso.ent ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN
167 ent/iso-cyr1.ent ISO 8879:1986//ENTITIES Russian Cyrillic//EN
168 ent/iso-tech.ent ISO 8879:1986//ENTITIES General Technical//EN
169 ent/iso-amsc.ent ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN
170 soextblx.dtd -//OASIS//DTD XML Exchange Table Model 19990315//EN
171 calstblx.dtd -//OASIS//DTD DocBook XML CALS Table Model V${ver}//EN
172 ent/iso-lat1.ent ISO 8879:1986//ENTITIES Added Latin 1//EN
173 ent/iso-amsb.ent ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN
174 ent/iso-lat2.ent ISO 8879:1986//ENTITIES Added Latin 2//EN
175 ent/iso-amsr.ent ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN
176 ent/iso-cyr2.ent ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN
179 for f in System URI; do
180 /usr/bin/xmlcatalog --noout --add rewrite${f} "http://www.oasis-open.org/docbook/xml/${ver}" \
181 /usr/share/sgml/docbook/${fmt}-dtd-${ver} /etc/sgml/docbook/xmlcatalog > /dev/null 2>/dev/null
195 # Finally, make sure everything in /etc/sgml is readable!
196 chmod a+r /etc/sgml/*
200 # remove entries only on removal of package
201 if [ "$1" = 0 ]; then
232 for dir in %{directories}; do
233 fmt=${dir#*-} ver=${dir%%-*}
236 # Update the centralized catalog corresponding to this version of the DTD
237 /usr/bin/xmlcatalog --noout --sgml --del /etc/sgml/catalog /etc/sgml/$fmt-docbook-$ver.cat
238 rm -f /etc/sgml/$fmt-docbook-$ver.cat
241 if [ $fmt = xml -a -w /usr/share/sgml/docbook/xmlcatalog ]; then
242 for f in $entities; do
243 case $ver in 4.[45]) f=${f/-/} ;; esac
244 /usr/bin/xmlcatalog --noout --del /usr/share/sgml/docbook/$fmt-dtd-$ver/$f /usr/share/sgml/docbook/xmlcatalog
246 /usr/bin/xmlcatalog --noout --del /usr/share/sgml/docbook/$fmt-dtd-$ver /usr/share/sgml/docbook/xmlcatalog
250 # See the comment attached to this command in the postin scriptlet.