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