wok-next annotate docbook-xsl/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents d3730d754d47
children
rev   line source
al@20443 1 # SliTaz package receipt v2.
slaxemulator@6984 2
slaxemulator@6984 3 PACKAGE="docbook-xsl"
al@20964 4 VERSION="1.79.2"
slaxemulator@6984 5 CATEGORY="development"
al@20443 6 SHORT_DESC="DocBook XSL stylesheets"
slaxemulator@6984 7 MAINTAINER="paul@slitaz.org"
pascal@15579 8 LICENSE="MIT"
al@20964 9 WEB_SITE="https://github.com/docbook/xslt10-stylesheets"
al@21011 10 HOST_ARCH="any"
al@20964 11 LFS="http://www.linuxfromscratch.org/blfs/view/svn/pst/docbook-xsl.html"
al@19607 12
slaxemulator@6984 13 TARBALL="$PACKAGE-$VERSION.tar.bz2"
al@21011 14 WGET_URL="$WEB_SITE/releases/download/release%2F$VERSION/$TARBALL"
slaxemulator@6984 15
al@20443 16 compile_rules() {
al@21011 17 dest="$install/usr/share/xml/docbook/stylesheet/docbook-xsl"
al@21011 18 mkdir -p $dest
pascal@15579 19
al@21011 20 cp VERSION VERSION.xsl $dest
al@18741 21
al@21011 22 for i in assembly common eclipse epub epub3 fo highlighting html htmlhelp \
al@21011 23 javahelp lib manpages params profiling roundtrip template website \
al@21011 24 xhtml xhtml-1_1 xhtml5; do
al@21011 25 mkdir -p $dest/$i
al@21011 26 cp $i/*.xml $i/*.xsl $i/*.dtd $i/*.ent $dest/$i/ 2>/dev/null
al@21011 27 done
al@21011 28 find $install -type f -name build.xml -delete
al@21011 29
al@21011 30 mkdir -p $install/etc/xml/
al@19607 31
al@20443 32 cook_pick_docs README RELEASE-NOTES* NEWS*
slaxemulator@6984 33 }
slaxemulator@6984 34
al@20443 35 genpkg_rules() {
al@20443 36 copy @std
al@20443 37 DEPENDS="docbook-xml libxml2-tools libxslt"
al@20443 38 }
al@20443 39
al@20443 40 post_install() {
al@21011 41 local U="http://docbook.sourceforge.net/release/xsl"
al@21011 42 local F="file:///usr/share/xml/docbook/stylesheet/docbook-xsl"
al@21011 43 local C="/etc/xml/catalog"
slaxemulator@6984 44
al@21011 45 # Create a /etc/xml/catalog if it absent
al@21011 46 [ -s "$1/etc/xml/catalog" ] || chroot "$1/" xmlcatalog --noout --create "$C"
al@19607 47
al@21011 48 # Remove the catalog items prior to upgrading
al@21011 49 chroot "$1/" xmlcatalog --noout --del "$F" "$C"
slaxemulator@6984 50
al@21011 51 chroot "$1/" xmlcatalog --noout --add rewriteSystem "$U/$VERSION" "$F" $C
al@21011 52 chroot "$1/" xmlcatalog --noout --add rewriteURI "$U/$VERSION" "$F" $C
al@21011 53 chroot "$1/" xmlcatalog --noout --add rewriteSystem "$U/current" "$F" $C
al@20443 54 chroot "$1/" xmlcatalog --noout --add rewriteURI "$U/current" "$F" $C
al@21011 55 }
slaxemulator@6984 56
al@21011 57 # In most cases xmlcatalog unavailable at this point, use sed instead
al@21011 58 post_remove() {
al@21011 59 sed -i '/file:\/\/\/usr\/share\/xml\/docbook\/stylesheet\/docbook-xsl/d' "$1/etc/xml/catalog"
slaxemulator@6984 60 }