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