archrelease: copy trunk to extra-x86_64
[arch-packages.git] / docbook-xsl / repos / extra-any / docbook-xsl.install
blobcdbc0c9d42c7ae934fb293f2006d0cfc3030a0e7
1 _xmlcatalog() {
2   xmlcatalog --noout "$@" etc/xml/catalog
5 post_install() {
6   [[ -f etc/xml/catalog ]] || _xmlcatalog --create
8   local ver x new=${1%-*}
10   for ver in $new current; do
11     for x in rewriteSystem rewriteURI; do
12       _xmlcatalog --add $x http://cdn.docbook.org/release/xsl/$ver \
13         /usr/share/xml/docbook/xsl-stylesheets-$new
15       _xmlcatalog --add $x http://cdn.docbook.org/release/xsl-nons/$ver \
16         /usr/share/xml/docbook/xsl-stylesheets-$new-nons
18       _xmlcatalog --add $x http://docbook.sourceforge.net/release/xsl-ns/$ver \
19         /usr/share/xml/docbook/xsl-stylesheets-$new
21       _xmlcatalog --add $x http://docbook.sourceforge.net/release/xsl/$ver \
22         /usr/share/xml/docbook/xsl-stylesheets-$new-nons
23     done
24   done
27 post_upgrade() {
28   post_remove $2
29   post_install $1
32 post_remove() {
33   local old=${1%-*}
34   _xmlcatalog --del /usr/share/xml/docbook/xsl-stylesheets-$old
35   if (( $(vercmp $1 1.79.2-5) >= 0 )); then
36     _xmlcatalog --del /usr/share/xml/docbook/xsl-stylesheets-$old-nons
37   fi
40 # vim:set ft=sh sw=2 et: