wok-next view docbook-xml/receipt @ rev 21031
Random updates
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Nov 03 15:42:26 2018 +0200 (2018-11-03) |
parents | a20a093a9790 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="docbook-xml"
4 VERSION="4.5"
5 CATEGORY="development"
6 SHORT_DESC="A widely used XML scheme for writing documentation and help"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="MIT"
9 WEB_SITE="http://www.oasis-open.org/docbook/"
10 HOST_ARCH="any"
12 BUILD_DEPENDS="libxml2-tools"
14 compile_rules() {
15 for ver in 4.1.2 4.2 4.3 4.4 4.5; do
16 case $ver in
17 4.1.2) file="docbkx412.zip";;
18 *) file="docbook-xml-$ver.zip";;
19 esac
21 [ -e "$SRC/$file" ] || wget -P "$SRC" https://docbook.org/xml/$ver/$file
22 mkdir -p $src/$ver
23 unzip -q $SRC/$file -d $src/$ver
25 mkdir -p $install/usr/share/xml/docbook/xml-dtd-$ver/
26 cd $src/$ver
27 cp -r docbook.cat *.dtd ent/ *.mod $install/usr/share/xml/docbook/xml-dtd-$ver/
28 done
29 cd $src
31 find $install -type f -exec chmod 644 '{}' \;
32 find $install -type d -exec chmod 755 '{}' \;
34 mkdir -p $install/etc/xml/
35 export XML_CATALOG_FILES=""
36 xmlcatalog --noout --create $install/etc/xml/docbook-xml
38 # V4.1.2
39 xmlcatalog --noout --add "public" \
40 "-//OASIS//DTD DocBook XML V4.1.2//EN" \
41 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" \
42 "$install/etc/xml/docbook-xml"
43 xmlcatalog --noout --add "public" \
44 "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \
45 "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \
46 "$install/etc/xml/docbook-xml"
47 xmlcatalog --noout --add "public" \
48 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
49 "http://www.oasis-open.org/docbook/xml/4.1.2/soextblx.dtd" \
50 "$install/etc/xml/docbook-xml"
51 xmlcatalog --noout --add "public" \
52 "-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" \
53 "http://www.oasis-open.org/docbook/xml/4.1.2/dbpoolx.mod" \
54 "$install/etc/xml/docbook-xml"
55 xmlcatalog --noout --add "public" \
56 "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" \
57 "http://www.oasis-open.org/docbook/xml/4.1.2/dbhierx.mod" \
58 "$install/etc/xml/docbook-xml"
59 xmlcatalog --noout --add "public" \
60 "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" \
61 "http://www.oasis-open.org/docbook/xml/4.1.2/dbgenent.mod" \
62 "$install/etc/xml/docbook-xml"
63 xmlcatalog --noout --add "public" \
64 "-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" \
65 "http://www.oasis-open.org/docbook/xml/4.1.2/dbnotnx.mod" \
66 "$install/etc/xml/docbook-xml"
67 xmlcatalog --noout --add "public" \
68 "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" \
69 "http://www.oasis-open.org/docbook/xml/4.1.2/dbcentx.mod" \
70 "$install/etc/xml/docbook-xml"
71 xmlcatalog --noout --add "rewriteSystem" \
72 "http://www.oasis-open.org/docbook/xml/4.1.2" \
73 "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \
74 "$install/etc/xml/docbook-xml"
75 xmlcatalog --noout --add "rewriteURI" \
76 "http://www.oasis-open.org/docbook/xml/4.1.2" \
77 "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \
78 "$install/etc/xml/docbook-xml"
80 # V4.2
81 xmlcatalog --noout --add "public" \
82 "-//OASIS//DTD DocBook XML V4.2//EN" \
83 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" \
84 "$install/etc/xml/docbook-xml"
85 xmlcatalog --noout --add "public" \
86 "-//OASIS//DTD DocBook CALS Table Model V4.2//EN" \
87 "http://www.oasis-open.org/docbook/xml/4.2/calstblx.dtd" \
88 "$install/etc/xml/docbook-xml"
89 xmlcatalog --noout --add "public" \
90 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
91 "http://www.oasis-open.org/docbook/xml/4.2/soextblx.dtd" \
92 "$install/etc/xml/docbook-xml"
93 xmlcatalog --noout --add "public" \
94 "-//OASIS//ELEMENTS DocBook Information Pool V4.2//EN" \
95 "http://www.oasis-open.org/docbook/xml/4.2/dbpoolx.mod" \
96 "$install/etc/xml/docbook-xml"
97 xmlcatalog --noout --add "public" \
98 "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.2//EN" \
99 "http://www.oasis-open.org/docbook/xml/4.2/dbhierx.mod" \
100 "$install/etc/xml/docbook-xml"
101 xmlcatalog --noout --add "public" \
102 "-//OASIS//ENTITIES DocBook Additional General Entities V4.2//EN" \
103 "http://www.oasis-open.org/docbook/xml/4.2/dbgenent.mod" \
104 "$install/etc/xml/docbook-xml"
105 xmlcatalog --noout --add "public" \
106 "-//OASIS//ENTITIES DocBook Notations V4.2//EN" \
107 "http://www.oasis-open.org/docbook/xml/4.2/dbnotnx.mod" \
108 "$install/etc/xml/docbook-xml"
109 xmlcatalog --noout --add "public" \
110 "-//OASIS//ENTITIES DocBook Character Entities V4.2//EN" \
111 "http://www.oasis-open.org/docbook/xml/4.2/dbcentx.mod" \
112 "$install/etc/xml/docbook-xml"
113 xmlcatalog --noout --add "rewriteSystem" \
114 "http://www.oasis-open.org/docbook/xml/4.2" \
115 "file:///usr/share/xml/docbook/xml-dtd-4.2" \
116 "$install/etc/xml/docbook-xml"
117 xmlcatalog --noout --add "rewriteURI" \
118 "http://www.oasis-open.org/docbook/xml/4.2" \
119 "file:///usr/share/xml/docbook/xml-dtd-4.2" \
120 "$install/etc/xml/docbook-xml"
122 # V4.3
123 xmlcatalog --noout --add "public" \
124 "-//OASIS//DTD DocBook XML V4.3//EN" \
125 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
126 "$install/etc/xml/docbook-xml"
127 xmlcatalog --noout --add "public" \
128 "-//OASIS//DTD DocBook CALS Table Model V4.3//EN" \
129 "http://www.oasis-open.org/docbook/xml/4.3/calstblx.dtd" \
130 "$install/etc/xml/docbook-xml"
131 xmlcatalog --noout --add "public" \
132 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
133 "http://www.oasis-open.org/docbook/xml/4.3/soextblx.dtd" \
134 "$install/etc/xml/docbook-xml"
135 xmlcatalog --noout --add "public" \
136 "-//OASIS//ELEMENTS DocBook Information Pool V4.3//EN" \
137 "http://www.oasis-open.org/docbook/xml/4.3/dbpoolx.mod" \
138 "$install/etc/xml/docbook-xml"
139 xmlcatalog --noout --add "public" \
140 "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3//EN" \
141 "http://www.oasis-open.org/docbook/xml/4.3/dbhierx.mod" \
142 "$install/etc/xml/docbook-xml"
143 xmlcatalog --noout --add "public" \
144 "-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" \
145 "http://www.oasis-open.org/docbook/xml/4.3/dbgenent.mod" \
146 "$install/etc/xml/docbook-xml"
147 xmlcatalog --noout --add "public" \
148 "-//OASIS//ENTITIES DocBook Notations V4.3//EN" \
149 "http://www.oasis-open.org/docbook/xml/4.3/dbnotnx.mod" \
150 "$install/etc/xml/docbook-xml"
151 xmlcatalog --noout --add "public" \
152 "-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" \
153 "http://www.oasis-open.org/docbook/xml/4.3/dbcentx.mod" \
154 "$install/etc/xml/docbook-xml"
155 xmlcatalog --noout --add "rewriteSystem" \
156 "http://www.oasis-open.org/docbook/xml/4.3" \
157 "file:///usr/share/xml/docbook/xml-dtd-4.3" \
158 "$install/etc/xml/docbook-xml"
159 xmlcatalog --noout --add "rewriteURI" \
160 "http://www.oasis-open.org/docbook/xml/4.3" \
161 "file:///usr/share/xml/docbook/xml-dtd-4.3" \
162 "$install/etc/xml/docbook-xml"
164 # V4.4
165 xmlcatalog --noout --add "public" \
166 "-//OASIS//DTD DocBook XML V4.4//EN" \
167 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" \
168 "$install/etc/xml/docbook-xml"
169 xmlcatalog --noout --add "public" \
170 "-//OASIS//DTD DocBook CALS Table Model V4.4//EN" \
171 "http://www.oasis-open.org/docbook/xml/4.4/calstblx.dtd" \
172 "$install/etc/xml/docbook-xml"
173 xmlcatalog --noout --add "public" \
174 "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.4//EN" \
175 "http://www.oasis-open.org/docbook/xml/4.4/htmltblx.mod" \
176 "$install/etc/xml/docbook-xml"
177 xmlcatalog --noout --add "public" \
178 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
179 "http://www.oasis-open.org/docbook/xml/4.4/soextblx.dtd" \
180 "$install/etc/xml/docbook-xml"
181 xmlcatalog --noout --add "public" \
182 "-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN" \
183 "http://www.oasis-open.org/docbook/xml/4.4/dbpoolx.mod" \
184 "$install/etc/xml/docbook-xml"
185 xmlcatalog --noout --add "public" \
186 "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN" \
187 "http://www.oasis-open.org/docbook/xml/4.4/dbhierx.mod" \
188 "$install/etc/xml/docbook-xml"
189 xmlcatalog --noout --add "public" \
190 "-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" \
191 "http://www.oasis-open.org/docbook/xml/4.4/dbgenent.mod" \
192 "$install/etc/xml/docbook-xml"
193 xmlcatalog --noout --add "public" \
194 "-//OASIS//ENTITIES DocBook Notations V4.4//EN" \
195 "http://www.oasis-open.org/docbook/xml/4.4/dbnotnx.mod" \
196 "$install/etc/xml/docbook-xml"
197 xmlcatalog --noout --add "public" \
198 "-//OASIS//ENTITIES DocBook Character Entities V4.4//EN" \
199 "http://www.oasis-open.org/docbook/xml/4.4/dbcentx.mod" \
200 "$install/etc/xml/docbook-xml"
201 xmlcatalog --noout --add "rewriteSystem" \
202 "http://www.oasis-open.org/docbook/xml/4.4" \
203 "file:///usr/share/xml/docbook/xml-dtd-4.4" \
204 "$install/etc/xml/docbook-xml"
205 xmlcatalog --noout --add "rewriteURI" \
206 "http://www.oasis-open.org/docbook/xml/4.4" \
207 "file:///usr/share/xml/docbook/xml-dtd-4.4" \
208 "$install/etc/xml/docbook-xml"
210 # V4.5
211 xmlcatalog --noout --add "public" \
212 "-//OASIS//DTD DocBook XML V4.5//EN" \
213 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
214 "$install/etc/xml/docbook-xml"
215 xmlcatalog --noout --add "public" \
216 "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
217 "file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \
218 "$install/etc/xml/docbook-xml"
219 xmlcatalog --noout --add "public" \
220 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
221 "file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \
222 "$install/etc/xml/docbook-xml"
223 xmlcatalog --noout --add "public" \
224 "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
225 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \
226 "$install/etc/xml/docbook-xml"
227 xmlcatalog --noout --add "public" \
228 "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
229 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \
230 "$install/etc/xml/docbook-xml"
231 xmlcatalog --noout --add "public" \
232 "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
233 "file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \
234 "$install/etc/xml/docbook-xml"
235 xmlcatalog --noout --add "public" \
236 "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
237 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \
238 "$install/etc/xml/docbook-xml"
239 xmlcatalog --noout --add "public" \
240 "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
241 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \
242 "$install/etc/xml/docbook-xml"
243 xmlcatalog --noout --add "public" \
244 "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
245 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \
246 "$install/etc/xml/docbook-xml"
247 xmlcatalog --noout --add "rewriteSystem" \
248 "http://www.oasis-open.org/docbook/xml/4.5" \
249 "file:///usr/share/xml/docbook/xml-dtd-4.5" \
250 "$install/etc/xml/docbook-xml"
251 xmlcatalog --noout --add "rewriteURI" \
252 "http://www.oasis-open.org/docbook/xml/4.5" \
253 "file:///usr/share/xml/docbook/xml-dtd-4.5" \
254 "$install/etc/xml/docbook-xml"
255 }
257 genpkg_rules() {
258 copy @std
259 DEPENDS="libxml2-tools libxml2"
260 }
262 post_install() {
263 local F="file:///etc/xml/docbook-xml"
264 local C="/etc/xml/catalog"
266 # Create a /etc/xml/catalog if it absent
267 [ -s "$1/etc/xml/catalog" ] ||
268 chroot "$1/" xmlcatalog --noout --create "$C"
270 # Remove the catalog items prior to upgrading
271 chroot "$1/" xmlcatalog --noout --del "$F" "$C"
273 chroot "$1/" xmlcatalog --noout --add "delegatePublic" "-//OASIS//ENTITIES DocBook XML" "$F" "$C"
274 chroot "$1/" xmlcatalog --noout --add "delegatePublic" "-//OASIS//DTD DocBook XML" "$F" "$C"
275 chroot "$1/" xmlcatalog --noout --add "delegateSystem" "http://www.oasis-open.org/docbook/" "$F" "$C"
276 chroot "$1/" xmlcatalog --noout --add "delegateURI" "http://www.oasis-open.org/docbook/" "$F" "$C"
277 }
279 # In most cases xmlcatalog unavailable at this point, use sed instead of:
280 # chroot "$1/" xmlcatalog --noout --del file:///etc/xml/docbook-xml /etc/xml/catalog
281 post_remove() {
282 sed -i '/file:\/\/\/etc\/xml\/docbook-xml/d' "$1/etc/xml/catalog"
283 }