1 # Contributor: dorphell <dorphell@archlinux.org>
2 # Contributor: Judd Vinet <jvinet@zeroflux.org>
9 pkgdesc="A widely used XML scheme for writing documentation and help"
10 url="https://www.oasis-open.org/docbook/"
14 install=docbook-xml.install
15 source=(https://docbook.org/xml/4.1.2/docbkx412.zip
17 noextract=(docbkx412.zip)
19 for _ver in ${_vers[@]}; do
20 source+=("https://docbook.org/xml/$_ver/docbook-xml-$_ver.zip")
21 noextract+=("docbook-xml-$_ver.zip")
24 sha512sums=('f700591a671694ca0ac51f5b5b7e825df5c0b3604b20baa6afd3aaafa7ce99470ca1c261781b105b42bfa5485c23217cf3db821b3fcf2ebdae9df07bb8ae4063'
25 'd852ab8e1442af4a91ffc32b9bb37377d98171dbc379cfd9787a2e06fc5c9b8ed04c5cd156ff5b7799973250011389456a3a3584ed4ae99362420c15235fcbb5'
26 '0c836346130d1e8f4e26e00959f6b4fd2c3c11269ba5cbf11cdc904724e189606f431c99cd5ab188877daa0eb44c58d0bc30556df3b51df480396818d61c4e0a'
27 'f5090fb74884bae3d4fac8a3c5060bffff5d6a74272de183c181a7642e4b91f4ed32ad028537d198010782c3d98575ce679672f76a9749ed124432195886a7cb'
28 '7df5af4df24e4618b09814e4e20c147c722962531f03a40c28cd60f1db16b4c330420adf96adb7d66ed6eda84046ee91b467fd6f6fbfac2201537e2080735d76'
29 '1ee282fe86c9282610ee72c0e1d1acfc03f1afb9dc67166f438f2703109046479edb6329313ecb2949db27993077e077d111501c10b8769ebb20719eb6213d27')
34 mkdir -p "$pkgdir/etc/xml"
35 xmlcatalog --noout --create "$pkgdir/etc/xml/docbook-xml"
37 mkdir docbook-xml-4.1.2
38 bsdtar -C docbook-xml-4.1.2 -xf docbkx412.zip
39 for ver in ${_vers[@]}; do
40 mkdir docbook-xml-$ver
41 bsdtar -C docbook-xml-$ver -xf docbook-xml-$ver.zip
44 for ver in 4.1.2 ${_vers[@]}; do
45 pushd docbook-xml-$ver
46 mkdir -p "$pkgdir/usr/share/xml/docbook/xml-dtd-$ver"
47 cp -dr docbook.cat *.dtd ent/ *.mod \
48 "$pkgdir/usr/share/xml/docbook/xml-dtd-$ver"
55 xmlcatalog --noout --add "public" \
56 "-//OASIS//DTD DocBook XML V$ver//EN" \
57 "http://www.oasis-open.org/docbook/xml/$ver/docbookx.dtd" \
58 "$pkgdir/etc/xml/docbook-xml"
59 xmlcatalog --noout --add "public" \
60 "-//OASIS//DTD DocBook$xml CALS Table Model V$ver//EN" \
61 "http://www.oasis-open.org/docbook/xml/$ver/calstblx.dtd" \
62 "$pkgdir/etc/xml/docbook-xml"
63 xmlcatalog --noout --add "public" \
64 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
65 "http://www.oasis-open.org/docbook/xml/$ver/soextblx.dtd" \
66 "$pkgdir/etc/xml/docbook-xml"
67 xmlcatalog --noout --add "public" \
68 "-//OASIS//ELEMENTS DocBook$xml Information Pool V$ver//EN" \
69 "http://www.oasis-open.org/docbook/xml/$ver/dbpoolx.mod" \
70 "$pkgdir/etc/xml/docbook-xml"
71 xmlcatalog --noout --add "public" \
72 "-//OASIS//ELEMENTS DocBook$xml Document Hierarchy V$ver//EN" \
73 "http://www.oasis-open.org/docbook/xml/$ver/dbhierx.mod" \
74 "$pkgdir/etc/xml/docbook-xml"
75 xmlcatalog --noout --add "public" \
76 "-//OASIS//ENTITIES DocBook$xml Additional General Entities V$ver//EN" \
77 "http://www.oasis-open.org/docbook/xml/$ver/dbgenent.mod" \
78 "$pkgdir/etc/xml/docbook-xml"
79 xmlcatalog --noout --add "public" \
80 "-//OASIS//ENTITIES DocBook$xml Notations V$ver//EN" \
81 "http://www.oasis-open.org/docbook/xml/$ver/dbnotnx.mod" \
82 "$pkgdir/etc/xml/docbook-xml"
83 xmlcatalog --noout --add "public" \
84 "-//OASIS//ENTITIES DocBook$xml Character Entities V$ver//EN" \
85 "http://www.oasis-open.org/docbook/xml/$ver/dbcentx.mod" \
86 "$pkgdir/etc/xml/docbook-xml"
89 xmlcatalog --noout --add "public" \
90 "-//OASIS//ELEMENTS DocBook XML HTML Tables V$ver//EN" \
91 "http://www.oasis-open.org/docbook/xml/$ver/htmltblx.mod" \
92 "$pkgdir/etc/xml/docbook-xml"
95 xmlcatalog --noout --add "rewriteSystem" \
96 "http://www.oasis-open.org/docbook/xml/$ver" \
97 "/usr/share/xml/docbook/xml-dtd-$ver" \
98 "$pkgdir/etc/xml/docbook-xml"
99 xmlcatalog --noout --add "rewriteURI" \
100 "http://www.oasis-open.org/docbook/xml/$ver" \
101 "/usr/share/xml/docbook/xml-dtd-$ver" \
102 "$pkgdir/etc/xml/docbook-xml"
107 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE
110 find "$pkgdir" -type f -exec chmod -c a-x {} +
111 chmod -Rc u=rwX,go=rX "$pkgdir"