blob: e32257a89b743231715b1fa66a6ee62d1a5f530d (
plain)
1 # Description: An document type definitions for verification of XML data files against the DocBook rule set.
2 # URL: http://www.docbook.org/
3 # Maintainer: Matt Housh, jaeger at crux dot ninja
4 # Depends on: libxml2 unzip
5
6 name=docbook-xml
7 version=4.5
8 release=7
9 source=(http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip
10 http://www.docbook.org/xml/4.4/docbook-xml-4.4.zip
11 http://www.docbook.org/xml/4.3/docbook-xml-4.3.zip
12 http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip
13 http://www.docbook.org/xml/4.1.2/docbkx412.zip)
14
15 unpack_source() {
16 # similarly-named versions first
17 local DTDVERSION
18 for DTDVERSION in 4.5 4.4 4.3 4.2; do
19 install -d $SRC/$name-$DTDVERSION
20 unzip -q -d $SRC/$name-$DTDVERSION $PKGMK_SOURCE_DIR/$name-$DTDVERSION.zip
21 done
22
23 # now 4.1.2, named differently
24 install -d $SRC/$name-4.1.2
25 unzip -q -d $SRC/$name-4.1.2 $PKGMK_SOURCE_DIR/docbkx412.zip
26 }
27
28 build() {
29 # copy to proper locations
30 for DTDVERSION in 4.5 4.4 4.3 4.2 4.1.2
31 do
32 install -d $PKG/usr/share/xml/docbook/xml-dtd-$DTDVERSION
33 cp -a $SRC/$name-$DTDVERSION/{ent,docbook.cat,*.dtd,*.mod} \
34 $PKG/usr/share/xml/docbook/xml-dtd-$DTDVERSION/
35 done
36
37 find $PKG -type f \( -perm -g=r -o -perm -g=w \) -exec chmod -g=rw {} \+
38
39 # create initial docbook-xml catalog
40 install -d $PKG/etc/xml
41 xmlcatalog --noout --create $PKG/etc/xml/$name
42
43 # add each version to the initial catalog
44 #
45 # 4.5
46 xmlcatalog --noout --add "public" \
47 "-//OASIS//DTD DocBook XML V4.5//EN" \
48 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
49 $PKG/etc/xml/$name
50 xmlcatalog --noout --add "public" \
51 "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
52 "http://www.oasis-open.org/docbook/xml/4.5/calstblx.dtd" \
53 $PKG/etc/xml/$name
54 xmlcatalog --noout --add "public" \
55 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
56 "http://www.oasis-open.org/docbook/xml/4.5/soextblx.dtd" \
57 $PKG/etc/xml/$name
58 xmlcatalog --noout --add "public" \
59 "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
60 "http://www.oasis-open.org/docbook/xml/4.5/dbpoolx.mod" \
61 $PKG/etc/xml/$name
62 xmlcatalog --noout --add "public" \
63 "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
64 "http://www.oasis-open.org/docbook/xml/4.5/dbhierx.mod" \
65 $PKG/etc/xml/$name
66 xmlcatalog --noout --add "public" \
67 "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
68 "http://www.oasis-open.org/docbook/xml/4.5/htmltblx.mod" \
69 $PKG/etc/xml/$name
70 xmlcatalog --noout --add "public" \
71 "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
72 "http://www.oasis-open.org/docbook/xml/4.5/dbnotnx.mod" \
73 $PKG/etc/xml/$name
74 xmlcatalog --noout --add "public" \
75 "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
76 "http://www.oasis-open.org/docbook/xml/4.5/dbcentx.mod" \
77 $PKG/etc/xml/$name
78 xmlcatalog --noout --add "public" \
79 "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
80 "http://www.oasis-open.org/docbook/xml/4.5/dbgenent.mod" \
81 $PKG/etc/xml/$name
82 xmlcatalog --noout --add "rewriteSystem" \
83 "http://www.oasis-open.org/docbook/xml/4.5" \
84 "file:///usr/share/xml/docbook/xml-dtd-4.5" \
85 $PKG/etc/xml/$name
86 xmlcatalog --noout --add "rewriteURI" \
87 "http://www.oasis-open.org/docbook/xml/4.5" \
88 "file:///usr/share/xml/docbook/xml-dtd-4.5" \
89 $PKG/etc/xml/$name
90 # 4.4
91 xmlcatalog --noout --add "public" \
92 "-//OASIS//DTD DocBook XML V4.4//EN" \
93 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" \
94 $PKG/etc/xml/$name
95 xmlcatalog --noout --add "public" \
96 "-//OASIS//DTD DocBook CALS Table Model V4.4//EN" \
97 "http://www.oasis-open.org/docbook/xml/4.4/calstblx.dtd" \
98 $PKG/etc/xml/$name
99 xmlcatalog --noout --add "public" \
100 "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.4//EN" \
101 "http://www.oasis-open.org/docbook/xml/4.4/htmltblx.mod" \
102 $PKG/etc/xml/$name
103 xmlcatalog --noout --add "public" \
104 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
105 "http://www.oasis-open.org/docbook/xml/4.4/soextblx.dtd" \
106 $PKG/etc/xml/$name
107 xmlcatalog --noout --add "public" \
108 "-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN" \
109 "http://www.oasis-open.org/docbook/xml/4.4/dbpoolx.mod" \
110 $PKG/etc/xml/$name
111 xmlcatalog --noout --add "public" \
112 "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN" \
113 "http://www.oasis-open.org/docbook/xml/4.4/dbhierx.mod" \
114 $PKG/etc/xml/$name
115 xmlcatalog --noout --add "public" \
116 "-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" \
117 "http://www.oasis-open.org/docbook/xml/4.4/dbgenent.mod" \
118 $PKG/etc/xml/$name
119 xmlcatalog --noout --add "public" \
120 "-//OASIS//ENTITIES DocBook Notations V4.4//EN" \
121 "http://www.oasis-open.org/docbook/xml/4.4/dbnotnx.mod" \
122 $PKG/etc/xml/$name
123 xmlcatalog --noout --add "public" \
124 "-//OASIS//ENTITIES DocBook Character Entities V4.4//EN" \
125 "http://www.oasis-open.org/docbook/xml/4.4/dbcentx.mod" \
126 $PKG/etc/xml/$name
127 xmlcatalog --noout --add "rewriteSystem" \
128 "http://www.oasis-open.org/docbook/xml/4.4" \
129 "file:///usr/share/xml/docbook/xml-dtd-4.4" \
130 $PKG/etc/xml/$name
131 xmlcatalog --noout --add "rewriteURI" \
132 "http://www.oasis-open.org/docbook/xml/4.4" \
133 "file:///usr/share/xml/docbook/xml-dtd-4.4" \
134 $PKG/etc/xml/$name
135 # 4.3
136 xmlcatalog --noout --add "public" \
137 "-//OASIS//DTD DocBook XML V4.3//EN" \
138 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
139 $PKG/etc/xml/$name
140 xmlcatalog --noout --add "public" \
141 "-//OASIS//DTD DocBook CALS Table Model V4.3//EN" \
142 "http://www.oasis-open.org/docbook/xml/4.3/calstblx.dtd" \
143 $PKG/etc/xml/$name
144 xmlcatalog --noout --add "public" \
145 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
146 "http://www.oasis-open.org/docbook/xml/4.3/soextblx.dtd" \
147 $PKG/etc/xml/$name
148 xmlcatalog --noout --add "public" \
149 "-//OASIS//ELEMENTS DocBook Information Pool V4.3//EN" \
150 "http://www.oasis-open.org/docbook/xml/4.3/dbpoolx.mod" \
151 $PKG/etc/xml/$name
152 xmlcatalog --noout --add "public" \
153 "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3//EN" \
154 "http://www.oasis-open.org/docbook/xml/4.3/dbhierx.mod" \
155 $PKG/etc/xml/$name
156 xmlcatalog --noout --add "public" \
157 "-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" \
158 "http://www.oasis-open.org/docbook/xml/4.3/dbgenent.mod" \
159 $PKG/etc/xml/$name
160 xmlcatalog --noout --add "public" \
161 "-//OASIS//ENTITIES DocBook Notations V4.3//EN" \
162 "http://www.oasis-open.org/docbook/xml/4.3/dbnotnx.mod" \
163 $PKG/etc/xml/$name
164 xmlcatalog --noout --add "public" \
165 "-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" \
166 "http://www.oasis-open.org/docbook/xml/4.3/dbcentx.mod" \
167 $PKG/etc/xml/$name
168 xmlcatalog --noout --add "rewriteSystem" \
169 "http://www.oasis-open.org/docbook/xml/4.3" \
170 "file:///usr/share/xml/docbook/xml-dtd-4.3" \
171 $PKG/etc/xml/$name
172 xmlcatalog --noout --add "rewriteURI" \
173 "http://www.oasis-open.org/docbook/xml/4.3" \
174 "file:///usr/share/xml/docbook/xml-dtd-4.3" \
175 $PKG/etc/xml/$name
176 # 4.2
177 xmlcatalog --noout --add "public" \
178 "-//OASIS/DTD DocBook XML V4.2//EN" \
179 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" \
180 $PKG/etc/xml/$name
181 xmlcatalog --noout --add "public" \
182 "-//OASIS/DTD DocBook CALS Table Model V4.2//EN" \
183 "http://www.oasis-open.org/docbook/xml/4.2/calstblx.dtd" \
184 $PKG/etc/xml/$name
185 xmlcatalog --noout --add "public" \
186 "-//OASIS/DTD XML Exchange Table Model 19990315//EN" \
187 "http://www.oasis-open.org/docbook/xml/4.2/soextblx.dtd" \
188 $PKG/etc/xml/$name
189 xmlcatalog --noout --add "public" \
190 "-//OASIS/ELEMENTS DocBook Information Pool V4.2//EN" \
191 "http://www.oasis-open.org/docbook/xml/4.2/dbpoolx.mod" \
192 $PKG/etc/xml/$name
193 xmlcatalog --noout --add "public" \
194 "-//OASIS/ELEMENTS DocBook Document Hierarchy V4.2//EN" \
195 "http://www.oasis-open.org/docbook/xml/4.2/dbhierx.mod" \
196 $PKG/etc/xml/$name
197 xmlcatalog --noout --add "public" \
198 "-//OASIS/ENTITIES DocBook Additional General Entities V4.2//EN" \
199 "http://www.oasis-open.org/docbook/xml/4.2/dbgenent.mod" \
200 $PKG/etc/xml/$name
201 xmlcatalog --noout --add "public" \
202 "-//OASIS/ENTITIES DocBook Notations V4.2//EN" \
203 "http://www.oasis-open.org/docbook/xml/4.2/dbnotnx.mod" \
204 $PKG/etc/xml/$name
205 xmlcatalog --noout --add "public" \
206 "-//OASIS/ENTITIES DocBook Character Entities V4.2//EN" \
207 "http://www.oasis-open.org/docbook/xml/4.2/dbcentx.mod" \
208 $PKG/etc/xml/$name
209 xmlcatalog --noout --add "rewriteSystem" \
210 "http://www.oasis-open.org/docbook/xml/4.2" \
211 "file:///usr/share/xml/docbook/xml-dtd-4.2" \
212 $PKG/etc/xml/$name
213 xmlcatalog --noout --add "rewriteURI" \
214 "http://www.oasis-open.org/docbook/xml/4.2" \
215 "file:///usr/share/xml/docbook/xml-dtd-4.2" \
216 $PKG/etc/xml/$name
217 # 4.1.2
218 xmlcatalog --noout --add "public" \
219 "-//OASIS//DTD DocBook XML V4.1.2//EN" \
220 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" \
221 $PKG/etc/xml/$name
222 xmlcatalog --noout --add "public" \
223 "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \
224 "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \
225 $PKG/etc/xml/$name
226 xmlcatalog --noout --add "public" \
227 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
228 "http://www.oasis-open.org/docbook/xml/4.1.2/soextblx.dtd" \
229 $PKG/etc/xml/$name
230 xmlcatalog --noout --add "public" \
231 "-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" \
232 "http://www.oasis-open.org/docbook/xml/4.1.2/dbpoolx.mod" \
233 $PKG/etc/xml/$name
234 xmlcatalog --noout --add "public" \
235 "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" \
236 "http://www.oasis-open.org/docbook/xml/4.1.2/dbhierx.mod" \
237 $PKG/etc/xml/$name
238 xmlcatalog --noout --add "public" \
239 "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" \
240 "http://www.oasis-open.org/docbook/xml/4.1.2/dbgenent.mod" \
241 $PKG/etc/xml/$name
242 xmlcatalog --noout --add "public" \
243 "-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" \
244 "http://www.oasis-open.org/docbook/xml/4.1.2/dbnotnx.mod" \
245 $PKG/etc/xml/$name
246 xmlcatalog --noout --add "public" \
247 "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" \
248 "http://www.oasis-open.org/docbook/xml/4.1.2/dbcentx.mod" \
249 $PKG/etc/xml/$name
250 xmlcatalog --noout --add "rewriteSystem" \
251 "http://www.oasis-open.org/docbook/xml/4.1.2" \
252 "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \
253 $PKG/etc/xml/$name
254 xmlcatalog --noout --add "rewriteURI" \
255 "http://www.oasis-open.org/docbook/xml/4.1.2" \
256 "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \
257 $PKG/etc/xml/$name
258
259 rm $PKG/usr/share/xml/docbook/xml-dtd-4.{4,5}/ent/README
260 }
|