wok view docbook-xml/receipt @ rev 18730
Quote root dir in post_install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Dec 20 15:13:45 2015 +0100 (2015-12-20) |
parents | eb8067417980 |
children | ed8073aa8cf0 |
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="http://www.oasis-open.org/docbook/"
11 WGET_URL="http://www.docbook.org/xml/$VERSION/$TARBALL"
13 DEPENDS="libxml2-tools libxml2 docbook-xml-412 docbook-xml-42 docbook-xml-43 docbook-xml-44"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 mkdir -p $DESTDIR/usr/share/xml/docbook/xml-dtd-${VERSION}
20 cp -dRf docbook.cat *.dtd ent/ *.mod \
21 $DESTDIR/usr/share/xml/docbook/xml-dtd-${VERSION}
23 }
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 genpkg_rules()
27 {
28 mkdir -p $fs
29 cp -a $install/usr $fs
30 }
32 post_install()
33 {
34 [ -d "$1/etc/xml" ] || mkdir -p "$1/etc/xml"
35 if [ -f "$1/etc/xml/docbook-xml" ]; then
36 chroot "$1/" xmlcatalog --noout /etc/xml/docbook-xml
37 else
38 chroot "$1/" xmlcatalog --noout --create /etc/xml/docbook-xml
39 fi
40 echo -n "Processing post-install commands..."
42 if [ "$1" ]; then
43 mv -f "$1/etc/resolv.conf" "$1/etc/recolv.conf.$$" 2> /dev/null
44 cp /etc/resolv.conf "$1/etc/resolv.conf"
45 fi
46 # V4.1.2
47 chroot "$1/" xmlcatalog --noout --add "public" \
48 "-//OASIS//DTD DocBook XML V4.1.2//EN" \
49 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" \
50 "/etc//xml/docbook-xml"
51 chroot "$1/" xmlcatalog --noout --add "public" \
52 "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \
53 "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \
54 "/etc/xml/docbook-xml"
55 chroot "$1/" xmlcatalog --noout --add "public" \
56 "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \
57 "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \
58 "/etc/xml/docbook-xml"
59 chroot "$1/" xmlcatalog --noout --add "public" \
60 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
61 "http://www.oasis-open.org/docbook/xml/4.1.2/soextblx.dtd" \
62 "/etc/xml/docbook-xml"
63 chroot "$1/" xmlcatalog --noout --add "public" \
64 "-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" \
65 "http://www.oasis-open.org/docbook/xml/4.1.2/dbpoolx.mod" \
66 "/etc/xml/docbook-xml"
67 chroot "$1/" xmlcatalog --noout --add "public" \
68 "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" \
69 "http://www.oasis-open.org/docbook/xml/4.1.2/dbhierx.mod" \
70 "/etc/xml/docbook-xml"
71 chroot "$1/" xmlcatalog --noout --add "public" \
72 "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" \
73 "http://www.oasis-open.org/docbook/xml/4.1.2/dbgenent.mod" \
74 "/etc/xml/docbook-xml"
75 chroot "$1/" xmlcatalog --noout --add "public" \
76 "-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" \
77 "http://www.oasis-open.org/docbook/xml/4.1.2/dbnotnx.mod" \
78 "/etc/xml/docbook-xml"
79 chroot "$1/" xmlcatalog --noout --add "public" \
80 "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" \
81 "http://www.oasis-open.org/docbook/xml/4.1.2/dbcentx.mod" \
82 "/etc/xml/docbook-xml"
83 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" \
84 "http://www.oasis-open.org/docbook/xml/4.1.2" \
85 "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \
86 "/etc/xml/docbook-xml"
87 chroot "$1/" xmlcatalog --noout --add "rewriteURI" \
88 "http://www.oasis-open.org/docbook/xml/4.1.2" \
89 "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \
90 "/etc/xml/docbook-xml"
92 # V4.2
93 chroot "$1/" xmlcatalog --noout --add "public" \
94 "-//OASIS//DTD DocBook XML V4.2//EN" \
95 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" \
96 "/etc/xml/docbook-xml"
97 chroot "$1/" xmlcatalog --noout --add "public" \
98 "-//OASIS//DTD DocBook CALS Table Model V4.2//EN" \
99 "http://www.oasis-open.org/docbook/xml/4.2/calstblx.dtd" \
100 "/etc/xml/docbook-xml"
101 chroot "$1/" xmlcatalog --noout --add "public" \
102 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
103 "http://www.oasis-open.org/docbook/xml/4.2/soextblx.dtd" \
104 "/etc/xml/docbook-xml"
105 chroot "$1/" xmlcatalog --noout --add "public" \
106 "-//OASIS//ELEMENTS DocBook Information Pool V4.2//EN" \
107 "http://www.oasis-open.org/docbook/xml/4.2/dbpoolx.mod" \
108 "/etc/xml/docbook-xml"
109 chroot "$1/" xmlcatalog --noout --add "public" \
110 "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.2//EN" \
111 "http://www.oasis-open.org/docbook/xml/4.2/dbhierx.mod" \
112 "/etc/xml/docbook-xml"
113 chroot "$1/" xmlcatalog --noout --add "public" \
114 "-//OASIS//ENTITIES DocBook Additional General Entities V4.2//EN" \
115 "http://www.oasis-open.org/docbook/xml/4.2/dbgenent.mod" \
116 "/etc/xml/docbook-xml"
117 chroot "$1/" xmlcatalog --noout --add "public" \
118 "-//OASIS//ENTITIES DocBook Notations V4.2//EN" \
119 "http://www.oasis-open.org/docbook/xml/4.2/dbnotnx.mod" \
120 "/etc/xml/docbook-xml"
121 chroot "$1/" xmlcatalog --noout --add "public" \
122 "-//OASIS//ENTITIES DocBook Character Entities V4.2//EN" \
123 "http://www.oasis-open.org/docbook/xml/4.2/dbcentx.mod" \
124 "/etc/xml/docbook-xml"
125 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" \
126 "http://www.oasis-open.org/docbook/xml/4.2" \
127 "file:///usr/share/xml/docbook/xml-dtd-4.2" \
128 "/etc/xml/docbook-xml"
129 chroot "$1/" xmlcatalog --noout --add "rewriteURI" \
130 "http://www.oasis-open.org/docbook/xml/4.2" \
131 "file:///usr/share/xml/docbook/xml-dtd-4.2" \
132 "/etc/xml/docbook-xml"
134 # V4.3
135 chroot "$1/" xmlcatalog --noout --add "public" \
136 "-//OASIS//DTD DocBook XML V4.3//EN" \
137 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
138 "/etc/xml/docbook-xml"
139 chroot "$1/" xmlcatalog --noout --add "public" \
140 "-//OASIS//DTD DocBook CALS Table Model V4.3//EN" \
141 "http://www.oasis-open.org/docbook/xml/4.3/calstblx.dtd" \
142 "/etc/xml/docbook-xml"
143 chroot "$1/" xmlcatalog --noout --add "public" \
144 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
145 "http://www.oasis-open.org/docbook/xml/4.3/soextblx.dtd" \
146 "/etc/xml/docbook-xml"
147 chroot "$1/" xmlcatalog --noout --add "public" \
148 "-//OASIS//ELEMENTS DocBook Information Pool V4.3//EN" \
149 "http://www.oasis-open.org/docbook/xml/4.3/dbpoolx.mod" \
150 "/etc/xml/docbook-xml"
151 chroot "$1/" xmlcatalog --noout --add "public" \
152 "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3//EN" \
153 "http://www.oasis-open.org/docbook/xml/4.3/dbhierx.mod" \
154 "/etc/xml/docbook-xml"
155 chroot "$1/" xmlcatalog --noout --add "public" \
156 "-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" \
157 "http://www.oasis-open.org/docbook/xml/4.3/dbgenent.mod" \
158 "/etc/xml/docbook-xml"
159 chroot "$1/" xmlcatalog --noout --add "public" \
160 "-//OASIS//ENTITIES DocBook Notations V4.3//EN" \
161 "http://www.oasis-open.org/docbook/xml/4.3/dbnotnx.mod" \
162 "/etc/xml/docbook-xml"
163 chroot "$1/" xmlcatalog --noout --add "public" \
164 "-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" \
165 "http://www.oasis-open.org/docbook/xml/4.3/dbcentx.mod" \
166 "/etc/xml/docbook-xml"
167 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" \
168 "http://www.oasis-open.org/docbook/xml/4.3" \
169 "file:///usr/share/xml/docbook/xml-dtd-4.3" \
170 "/etc/xml/docbook-xml"
171 chroot "$1/" xmlcatalog --noout --add "rewriteURI" \
172 "http://www.oasis-open.org/docbook/xml/4.3" \
173 "file:///usr/share/xml/docbook/xml-dtd-4.3" \
174 "/etc/xml/docbook-xml"
176 # V4.4
177 chroot "$1/" xmlcatalog --noout --add "public" \
178 "-//OASIS//DTD DocBook XML V4.4//EN" \
179 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" \
180 "/etc/xml/docbook-xml"
181 chroot "$1/" xmlcatalog --noout --add "public" \
182 "-//OASIS//DTD DocBook CALS Table Model V4.4//EN" \
183 "http://www.oasis-open.org/docbook/xml/4.4/calstblx.dtd" \
184 "/etc/xml/docbook-xml"
185 chroot "$1/" xmlcatalog --noout --add "public" \
186 "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.4//EN" \
187 "http://www.oasis-open.org/docbook/xml/4.4/htmltblx.mod" \
188 "/etc/xml/docbook-xml"
189 chroot "$1/" xmlcatalog --noout --add "public" \
190 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
191 "http://www.oasis-open.org/docbook/xml/4.4/soextblx.dtd" \
192 "/etc/xml/docbook-xml"
193 chroot "$1/" xmlcatalog --noout --add "public" \
194 "-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN" \
195 "http://www.oasis-open.org/docbook/xml/4.4/dbpoolx.mod" \
196 "/etc/xml/docbook-xml"
197 chroot "$1/" xmlcatalog --noout --add "public" \
198 "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN" \
199 "http://www.oasis-open.org/docbook/xml/4.4/dbhierx.mod" \
200 "/etc/xml/docbook-xml"
201 chroot "$1/" xmlcatalog --noout --add "public" \
202 "-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" \
203 "http://www.oasis-open.org/docbook/xml/4.4/dbgenent.mod" \
204 "/etc/xml/docbook-xml"
205 chroot "$1/" xmlcatalog --noout --add "public" \
206 "-//OASIS//ENTITIES DocBook Notations V4.4//EN" \
207 "http://www.oasis-open.org/docbook/xml/4.4/dbnotnx.mod" \
208 "/etc/xml/docbook-xml"
209 chroot "$1/" xmlcatalog --noout --add "public" \
210 "-//OASIS//ENTITIES DocBook Character Entities V4.4//EN" \
211 "http://www.oasis-open.org/docbook/xml/4.4/dbcentx.mod" \
212 "/etc/xml/docbook-xml"
213 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" \
214 "http://www.oasis-open.org/docbook/xml/4.4" \
215 "file:///usr/share/xml/docbook/xml-dtd-4.4" \
216 "/etc/xml/docbook-xml"
217 chroot "$1/" xmlcatalog --noout --add "rewriteURI" \
218 "http://www.oasis-open.org/docbook/xml/4.4" \
219 "file:///usr/share/xml/docbook/xml-dtd-4.4" \
220 "/etc/xml/docbook-xml"
222 # V4.5
223 chroot "$1/" xmlcatalog --noout --add "public" \
224 "-//OASIS//DTD DocBook XML V4.5//EN" \
225 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
226 "/etc/xml/docbook-xml"
227 chroot "$1/" xmlcatalog --noout --add "public" \
228 "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
229 "file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \
230 "/etc/xml/docbook-xml"
231 chroot "$1/" xmlcatalog --noout --add "public" \
232 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
233 "file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \
234 "/etc/xml/docbook-xml"
235 chroot "$1/" xmlcatalog --noout --add "public" \
236 "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
237 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \
238 "/etc/xml/docbook-xml"
239 chroot "$1/" xmlcatalog --noout --add "public" \
240 "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
241 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \
242 "/etc/xml/docbook-xml"
243 chroot "$1/" xmlcatalog --noout --add "public" \
244 "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
245 "file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \
246 "/etc/xml/docbook-xml"
247 chroot "$1/" xmlcatalog --noout --add "public" \
248 "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
249 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \
250 "/etc/xml/docbook-xml"
251 chroot "$1/" xmlcatalog --noout --add "public" \
252 "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
253 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \
254 "/etc/xml/docbook-xml"
255 chroot "$1/" xmlcatalog --noout --add "public" \
256 "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
257 "file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \
258 "/etc/xml/docbook-xml"
259 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" \
260 "http://www.oasis-open.org/docbook/xml/4.5" \
261 "file:///usr/share/xml/docbook/xml-dtd-4.5" \
262 "/etc/xml/docbook-xml"
263 chroot "$1/" xmlcatalog --noout --add "rewriteURI" \
264 "http://www.oasis-open.org/docbook/xml/4.5" \
265 "file:///usr/share/xml/docbook/xml-dtd-4.5" \
266 "/etc/xml/docbook-xml"
268 if [ -f "$1/etc/xml/catalog" ]; then
269 xmlcatalog --noout "$1/etc/xml/catalog"
270 else
271 xmlcatalog --noout --create "$1/etc/xml/catalog"
272 fi
273 chroot "$1/" xmlcatalog --noout --add "delegatePublic" \
274 "-//OASIS//ENTITIES DocBook XML" \
275 "file:///etc/xml/docbook-xml" \
276 "/etc/xml/catalog"
277 chroot "$1/" xmlcatalog --noout --add "delegatePublic" \
278 "-//OASIS//DTD DocBook XML" \
279 "file:///etc/xml/docbook-xml" \
280 "/etc/xml/catalog"
281 chroot "$1/" xmlcatalog --noout --add "delegateSystem" \
282 "http://www.oasis-open.org/docbook/" \
283 "file:///etc/xml/docbook-xml" \
284 "/etc/xml/catalog"
285 chroot "$1/" xmlcatalog --noout --add "delegateURI" \
286 "http://www.oasis-open.org/docbook/" \
287 "file:///etc/xml/docbook-xml" \
288 "/etc/xml/catalog"
289 if [ "$1" ]; then
290 mv -f "$1/etc/resolv.conf.$$" "$1/etc/recolv.conf" 2> /dev/null
291 fi
292 }
294 post_remove()
295 {
296 xmlcatalog --noout --del file:///etc/xml/docbook-xml "$1/etc/xml/catalog"
297 }