wok-current view docbook-xml/receipt @ rev 25728

Merge wok for both arch and few updates
author Stanislas Leduc <shann@slitaz.org>
date Thu Dec 05 08:39:45 2024 +0000 (5 weeks ago)
parents 73f36875e5a7
children
line source
1 # SliTaz package receipt.
3 PACKAGE="docbook-xml"
4 VERSION="4.5"
5 CATEGORY="development"
6 SHORT_DESC="A widely used XML scheme for writing documentation and help. (version 4.5)"
7 MAINTAINER="slaxemulator@gmail.com"
8 LICENSE="MIT"
9 TARBALL="$PACKAGE-$VERSION.zip"
10 WEB_SITE="https://docbook.org/"
11 WGET_URL="https://www.docbook.org/xml/$VERSION/$TARBALL"
13 DEPENDS="libxml2-tools libxml2 docbook-xml-412 docbook-xml-42 docbook-xml-43 docbook-xml-44"
15 HOST_ARCH="i486 x86_64"
17 # What is the latest version available today?
18 current_version()
19 {
20 wget -O - http://www.docbook.org/xml/ 2>/dev/null | \
21 sed 's|<li>|&\n|g' | sed '/>4\.5/!d;/[0-9][Cb]/d;s|.*">||;s|/<.*||' | sort -Vr | sed q
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 mkdir -p $DESTDIR/usr/share/xml/docbook/xml-dtd-$VERSION
28 cp -dRf docbook.cat *.dtd ent/ *.mod \
29 $DESTDIR/usr/share/xml/docbook/xml-dtd-$VERSION
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs
36 cp -a $install/usr $fs
37 }
39 post_install()
40 {
41 [ -d "$1/etc/xml" ] || mkdir -p "$1/etc/xml"
42 if [ -f "$1/etc/xml/docbook-xml" ]; then
43 chroot "$1/" xmlcatalog --noout /etc/xml/docbook-xml
44 else
45 chroot "$1/" xmlcatalog --noout --create /etc/xml/docbook-xml
46 fi
48 if [ "$1" ]; then
49 mv -f "$1/etc/resolv.conf" "$1/etc/recolv.conf.$$" 2> /dev/null
50 cp /etc/resolv.conf "$1/etc/resolv.conf"
51 fi
53 # V4.1.2
54 chroot "$1/" xmlcatalog --noout --add "public" \
55 "-//OASIS//DTD DocBook XML V4.1.2//EN" \
56 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" \
57 "/etc//xml/docbook-xml"
58 chroot "$1/" xmlcatalog --noout --add "public" \
59 "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \
60 "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \
61 "/etc/xml/docbook-xml"
62 chroot "$1/" xmlcatalog --noout --add "public" \
63 "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \
64 "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \
65 "/etc/xml/docbook-xml"
66 chroot "$1/" xmlcatalog --noout --add "public" \
67 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
68 "http://www.oasis-open.org/docbook/xml/4.1.2/soextblx.dtd" \
69 "/etc/xml/docbook-xml"
70 chroot "$1/" xmlcatalog --noout --add "public" \
71 "-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" \
72 "http://www.oasis-open.org/docbook/xml/4.1.2/dbpoolx.mod" \
73 "/etc/xml/docbook-xml"
74 chroot "$1/" xmlcatalog --noout --add "public" \
75 "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" \
76 "http://www.oasis-open.org/docbook/xml/4.1.2/dbhierx.mod" \
77 "/etc/xml/docbook-xml"
78 chroot "$1/" xmlcatalog --noout --add "public" \
79 "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" \
80 "http://www.oasis-open.org/docbook/xml/4.1.2/dbgenent.mod" \
81 "/etc/xml/docbook-xml"
82 chroot "$1/" xmlcatalog --noout --add "public" \
83 "-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" \
84 "http://www.oasis-open.org/docbook/xml/4.1.2/dbnotnx.mod" \
85 "/etc/xml/docbook-xml"
86 chroot "$1/" xmlcatalog --noout --add "public" \
87 "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" \
88 "http://www.oasis-open.org/docbook/xml/4.1.2/dbcentx.mod" \
89 "/etc/xml/docbook-xml"
90 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" \
91 "http://www.oasis-open.org/docbook/xml/4.1.2" \
92 "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \
93 "/etc/xml/docbook-xml"
94 chroot "$1/" xmlcatalog --noout --add "rewriteURI" \
95 "http://www.oasis-open.org/docbook/xml/4.1.2" \
96 "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \
97 "/etc/xml/docbook-xml"
99 # V4.2
100 chroot "$1/" xmlcatalog --noout --add "public" \
101 "-//OASIS//DTD DocBook XML V4.2//EN" \
102 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" \
103 "/etc/xml/docbook-xml"
104 chroot "$1/" xmlcatalog --noout --add "public" \
105 "-//OASIS//DTD DocBook CALS Table Model V4.2//EN" \
106 "http://www.oasis-open.org/docbook/xml/4.2/calstblx.dtd" \
107 "/etc/xml/docbook-xml"
108 chroot "$1/" xmlcatalog --noout --add "public" \
109 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
110 "http://www.oasis-open.org/docbook/xml/4.2/soextblx.dtd" \
111 "/etc/xml/docbook-xml"
112 chroot "$1/" xmlcatalog --noout --add "public" \
113 "-//OASIS//ELEMENTS DocBook Information Pool V4.2//EN" \
114 "http://www.oasis-open.org/docbook/xml/4.2/dbpoolx.mod" \
115 "/etc/xml/docbook-xml"
116 chroot "$1/" xmlcatalog --noout --add "public" \
117 "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.2//EN" \
118 "http://www.oasis-open.org/docbook/xml/4.2/dbhierx.mod" \
119 "/etc/xml/docbook-xml"
120 chroot "$1/" xmlcatalog --noout --add "public" \
121 "-//OASIS//ENTITIES DocBook Additional General Entities V4.2//EN" \
122 "http://www.oasis-open.org/docbook/xml/4.2/dbgenent.mod" \
123 "/etc/xml/docbook-xml"
124 chroot "$1/" xmlcatalog --noout --add "public" \
125 "-//OASIS//ENTITIES DocBook Notations V4.2//EN" \
126 "http://www.oasis-open.org/docbook/xml/4.2/dbnotnx.mod" \
127 "/etc/xml/docbook-xml"
128 chroot "$1/" xmlcatalog --noout --add "public" \
129 "-//OASIS//ENTITIES DocBook Character Entities V4.2//EN" \
130 "http://www.oasis-open.org/docbook/xml/4.2/dbcentx.mod" \
131 "/etc/xml/docbook-xml"
132 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" \
133 "http://www.oasis-open.org/docbook/xml/4.2" \
134 "file:///usr/share/xml/docbook/xml-dtd-4.2" \
135 "/etc/xml/docbook-xml"
136 chroot "$1/" xmlcatalog --noout --add "rewriteURI" \
137 "http://www.oasis-open.org/docbook/xml/4.2" \
138 "file:///usr/share/xml/docbook/xml-dtd-4.2" \
139 "/etc/xml/docbook-xml"
141 # V4.3
142 chroot "$1/" xmlcatalog --noout --add "public" \
143 "-//OASIS//DTD DocBook XML V4.3//EN" \
144 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
145 "/etc/xml/docbook-xml"
146 chroot "$1/" xmlcatalog --noout --add "public" \
147 "-//OASIS//DTD DocBook CALS Table Model V4.3//EN" \
148 "http://www.oasis-open.org/docbook/xml/4.3/calstblx.dtd" \
149 "/etc/xml/docbook-xml"
150 chroot "$1/" xmlcatalog --noout --add "public" \
151 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
152 "http://www.oasis-open.org/docbook/xml/4.3/soextblx.dtd" \
153 "/etc/xml/docbook-xml"
154 chroot "$1/" xmlcatalog --noout --add "public" \
155 "-//OASIS//ELEMENTS DocBook Information Pool V4.3//EN" \
156 "http://www.oasis-open.org/docbook/xml/4.3/dbpoolx.mod" \
157 "/etc/xml/docbook-xml"
158 chroot "$1/" xmlcatalog --noout --add "public" \
159 "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3//EN" \
160 "http://www.oasis-open.org/docbook/xml/4.3/dbhierx.mod" \
161 "/etc/xml/docbook-xml"
162 chroot "$1/" xmlcatalog --noout --add "public" \
163 "-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" \
164 "http://www.oasis-open.org/docbook/xml/4.3/dbgenent.mod" \
165 "/etc/xml/docbook-xml"
166 chroot "$1/" xmlcatalog --noout --add "public" \
167 "-//OASIS//ENTITIES DocBook Notations V4.3//EN" \
168 "http://www.oasis-open.org/docbook/xml/4.3/dbnotnx.mod" \
169 "/etc/xml/docbook-xml"
170 chroot "$1/" xmlcatalog --noout --add "public" \
171 "-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" \
172 "http://www.oasis-open.org/docbook/xml/4.3/dbcentx.mod" \
173 "/etc/xml/docbook-xml"
174 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" \
175 "http://www.oasis-open.org/docbook/xml/4.3" \
176 "file:///usr/share/xml/docbook/xml-dtd-4.3" \
177 "/etc/xml/docbook-xml"
178 chroot "$1/" xmlcatalog --noout --add "rewriteURI" \
179 "http://www.oasis-open.org/docbook/xml/4.3" \
180 "file:///usr/share/xml/docbook/xml-dtd-4.3" \
181 "/etc/xml/docbook-xml"
183 # V4.4
184 chroot "$1/" xmlcatalog --noout --add "public" \
185 "-//OASIS//DTD DocBook XML V4.4//EN" \
186 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" \
187 "/etc/xml/docbook-xml"
188 chroot "$1/" xmlcatalog --noout --add "public" \
189 "-//OASIS//DTD DocBook CALS Table Model V4.4//EN" \
190 "http://www.oasis-open.org/docbook/xml/4.4/calstblx.dtd" \
191 "/etc/xml/docbook-xml"
192 chroot "$1/" xmlcatalog --noout --add "public" \
193 "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.4//EN" \
194 "http://www.oasis-open.org/docbook/xml/4.4/htmltblx.mod" \
195 "/etc/xml/docbook-xml"
196 chroot "$1/" xmlcatalog --noout --add "public" \
197 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
198 "http://www.oasis-open.org/docbook/xml/4.4/soextblx.dtd" \
199 "/etc/xml/docbook-xml"
200 chroot "$1/" xmlcatalog --noout --add "public" \
201 "-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN" \
202 "http://www.oasis-open.org/docbook/xml/4.4/dbpoolx.mod" \
203 "/etc/xml/docbook-xml"
204 chroot "$1/" xmlcatalog --noout --add "public" \
205 "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN" \
206 "http://www.oasis-open.org/docbook/xml/4.4/dbhierx.mod" \
207 "/etc/xml/docbook-xml"
208 chroot "$1/" xmlcatalog --noout --add "public" \
209 "-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" \
210 "http://www.oasis-open.org/docbook/xml/4.4/dbgenent.mod" \
211 "/etc/xml/docbook-xml"
212 chroot "$1/" xmlcatalog --noout --add "public" \
213 "-//OASIS//ENTITIES DocBook Notations V4.4//EN" \
214 "http://www.oasis-open.org/docbook/xml/4.4/dbnotnx.mod" \
215 "/etc/xml/docbook-xml"
216 chroot "$1/" xmlcatalog --noout --add "public" \
217 "-//OASIS//ENTITIES DocBook Character Entities V4.4//EN" \
218 "http://www.oasis-open.org/docbook/xml/4.4/dbcentx.mod" \
219 "/etc/xml/docbook-xml"
220 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" \
221 "http://www.oasis-open.org/docbook/xml/4.4" \
222 "file:///usr/share/xml/docbook/xml-dtd-4.4" \
223 "/etc/xml/docbook-xml"
224 chroot "$1/" xmlcatalog --noout --add "rewriteURI" \
225 "http://www.oasis-open.org/docbook/xml/4.4" \
226 "file:///usr/share/xml/docbook/xml-dtd-4.4" \
227 "/etc/xml/docbook-xml"
229 # V4.5
230 chroot "$1/" xmlcatalog --noout --add "public" \
231 "-//OASIS//DTD DocBook XML V4.5//EN" \
232 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
233 "/etc/xml/docbook-xml"
234 chroot "$1/" xmlcatalog --noout --add "public" \
235 "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
236 "file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \
237 "/etc/xml/docbook-xml"
238 chroot "$1/" xmlcatalog --noout --add "public" \
239 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
240 "file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \
241 "/etc/xml/docbook-xml"
242 chroot "$1/" xmlcatalog --noout --add "public" \
243 "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
244 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \
245 "/etc/xml/docbook-xml"
246 chroot "$1/" xmlcatalog --noout --add "public" \
247 "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
248 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \
249 "/etc/xml/docbook-xml"
250 chroot "$1/" xmlcatalog --noout --add "public" \
251 "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
252 "file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \
253 "/etc/xml/docbook-xml"
254 chroot "$1/" xmlcatalog --noout --add "public" \
255 "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
256 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \
257 "/etc/xml/docbook-xml"
258 chroot "$1/" xmlcatalog --noout --add "public" \
259 "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
260 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \
261 "/etc/xml/docbook-xml"
262 chroot "$1/" xmlcatalog --noout --add "public" \
263 "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
264 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \
265 "/etc/xml/docbook-xml"
266 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" \
267 "http://www.oasis-open.org/docbook/xml/4.5" \
268 "file:///usr/share/xml/docbook/xml-dtd-4.5" \
269 "/etc/xml/docbook-xml"
270 chroot "$1/" xmlcatalog --noout --add "rewriteURI" \
271 "http://www.oasis-open.org/docbook/xml/4.5" \
272 "file:///usr/share/xml/docbook/xml-dtd-4.5" \
273 "/etc/xml/docbook-xml"
275 if [ -f "$1/etc/xml/catalog" ]; then
276 chroot "$1/" xmlcatalog --noout /etc/xml/catalog
277 else
278 chroot "$1/" xmlcatalog --noout --create /etc/xml/catalog
279 fi
281 chroot "$1/" xmlcatalog --noout --add "delegatePublic" \
282 "-//OASIS//ENTITIES DocBook XML" \
283 "file:///etc/xml/docbook-xml" \
284 "/etc/xml/catalog"
285 chroot "$1/" xmlcatalog --noout --add "delegatePublic" \
286 "-//OASIS//DTD DocBook XML" \
287 "file:///etc/xml/docbook-xml" \
288 "/etc/xml/catalog"
289 chroot "$1/" xmlcatalog --noout --add "delegateSystem" \
290 "http://www.oasis-open.org/docbook/" \
291 "file:///etc/xml/docbook-xml" \
292 "/etc/xml/catalog"
293 chroot "$1/" xmlcatalog --noout --add "delegateURI" \
294 "http://www.oasis-open.org/docbook/" \
295 "file:///etc/xml/docbook-xml" \
296 "/etc/xml/catalog"
297 if [ -n "$1" ]; then
298 mv -f "$1/etc/resolv.conf.$$" "$1/etc/recolv.conf" 2> /dev/null
299 fi
300 }
302 post_remove()
303 {
304 xmlcatalog --noout --del file:///etc/xml/docbook-xml "$1/etc/xml/catalog"
305 }