wok-next diff 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 diff
     1.1 --- a/docbook-xsl/receipt	Mon Sep 10 00:52:53 2018 +0300
     1.2 +++ b/docbook-xsl/receipt	Sat Nov 21 14:32:44 2020 +0100
     1.3 @@ -7,21 +7,27 @@
     1.4  MAINTAINER="paul@slitaz.org"
     1.5  LICENSE="MIT"
     1.6  WEB_SITE="https://github.com/docbook/xslt10-stylesheets"
     1.7 +HOST_ARCH="any"
     1.8  LFS="http://www.linuxfromscratch.org/blfs/view/svn/pst/docbook-xsl.html"
     1.9  
    1.10  TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.11 -WGET_URL="https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F$VERSION/$TARBALL"
    1.12 +WGET_URL="$WEB_SITE/releases/download/release%2F$VERSION/$TARBALL"
    1.13  
    1.14  compile_rules() {
    1.15 -	mkdir -p $install/usr/share/xml/docbook/stylesheet/docbook-xsl/
    1.16 +	dest="$install/usr/share/xml/docbook/stylesheet/docbook-xsl"
    1.17 +	mkdir -p $dest
    1.18  
    1.19 -	cp -R \
    1.20 -		VERSION assembly common eclipse epub epub3 extensions fo highlighting \
    1.21 -		html htmlhelp images javahelp lib manpages params profiling roundtrip \
    1.22 -		slides template tests tools webhelp website xhtml xhtml-1_1 xhtml5 \
    1.23 -		$install/usr/share/xml/docbook/stylesheet/docbook-xsl/ &&
    1.24 +	cp VERSION VERSION.xsl $dest
    1.25  
    1.26 -	ln -s VERSION $install/usr/share/xml/docbook/stylesheet/docbook-xsl/VERSION.xsl &&
    1.27 +	for i in assembly common eclipse epub epub3 fo highlighting html htmlhelp \
    1.28 +		javahelp lib manpages params profiling roundtrip template website \
    1.29 +		xhtml xhtml-1_1 xhtml5; do
    1.30 +		mkdir -p $dest/$i
    1.31 +		cp $i/*.xml $i/*.xsl $i/*.dtd $i/*.ent $dest/$i/ 2>/dev/null
    1.32 +	done
    1.33 +	find $install -type f -name build.xml -delete
    1.34 +
    1.35 +	mkdir -p $install/etc/xml/
    1.36  
    1.37  	cook_pick_docs README RELEASE-NOTES* NEWS*
    1.38  }
    1.39 @@ -32,32 +38,23 @@
    1.40  }
    1.41  
    1.42  post_install() {
    1.43 -	if [ -n "$1" ]; then
    1.44 -		mv -f "$1/etc/resolv.conf" "$1/etc/recolv.conf.$$" 2>/dev/null
    1.45 -		cp /etc/resolv.conf "$1/etc/resolv.conf"
    1.46 -	fi
    1.47 +	local U="http://docbook.sourceforge.net/release/xsl"
    1.48 +	local F="file:///usr/share/xml/docbook/stylesheet/docbook-xsl"
    1.49 +	local C="/etc/xml/catalog"
    1.50  
    1.51 -	U="http://docbook.sourceforge.net/release/xsl"
    1.52 -	F="/usr/share/xml/docbook/stylesheet/docbook-xsl"
    1.53 -	C="/etc/xml/catalog"
    1.54 +	# Create a /etc/xml/catalog if it absent
    1.55 +	[ -s "$1/etc/xml/catalog" ] || chroot "$1/" xmlcatalog --noout --create "$C"
    1.56  
    1.57 -	# Create a /etc/xml/catalog file
    1.58 -	mkdir -p "$1/etc/xml"
    1.59 -	if [ ! -f "$1/etc/xml/catalog" ]; then
    1.60 -		chroot "$1/" xmlcatalog --noout --create "$C"
    1.61 -	fi &&
    1.62 +	# Remove the catalog items prior to upgrading
    1.63 +	chroot "$1/" xmlcatalog --noout --del "$F" "$C"
    1.64  
    1.65 -	chroot "$1/" xmlcatalog --noout --add rewriteSystem "$U/$VERSION" "$F" $C &&
    1.66 -	chroot "$1/" xmlcatalog --noout --add rewriteURI    "$U/$VERSION" "$F" $C &&
    1.67 -	chroot "$1/" xmlcatalog --noout --add rewriteSystem "$U/current"  "$F" $C &&
    1.68 +	chroot "$1/" xmlcatalog --noout --add rewriteSystem "$U/$VERSION" "$F" $C
    1.69 +	chroot "$1/" xmlcatalog --noout --add rewriteURI    "$U/$VERSION" "$F" $C
    1.70 +	chroot "$1/" xmlcatalog --noout --add rewriteSystem "$U/current"  "$F" $C
    1.71  	chroot "$1/" xmlcatalog --noout --add rewriteURI    "$U/current"  "$F" $C
    1.72 +}
    1.73  
    1.74 -#	# link nwalsh dir
    1.75 -#	ln -sf docbook-xsl "$1/usr/share/xml/docbook/stylesheet/nwalsh"
    1.76 -
    1.77 -	if [ -n "$1" ]; then
    1.78 -		mv -f "$1/etc/resolv.conf.$$" "$1/etc/recolv.conf" 2>/dev/null
    1.79 -	fi
    1.80 -
    1.81 -	:
    1.82 +# In most cases xmlcatalog unavailable at this point, use sed instead
    1.83 +post_remove() {
    1.84 +	sed -i '/file:\/\/\/usr\/share\/xml\/docbook\/stylesheet\/docbook-xsl/d' "$1/etc/xml/catalog"
    1.85  }