wok-next 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 33dc3c330cc7
children b5f2a6ab88b6
files docbook-dsssl/receipt docbook-sgml/receipt docbook-sgml3/receipt docbook-xml/receipt docbook-xsl-ns/receipt docbook-xsl/receipt
line diff
     1.1 --- a/docbook-dsssl/receipt	Fri Oct 12 16:40:30 2018 +0300
     1.2 +++ b/docbook-dsssl/receipt	Sat Oct 13 14:45:44 2018 +0300
     1.3 @@ -7,24 +7,29 @@
     1.4  MAINTAINER="al.bobylev@gmail.com"
     1.5  LICENSE="custom"
     1.6  WEB_SITE="http://docbook.sourceforge.net/"
     1.7 +HOST_ARCH="any"
     1.8  
     1.9  TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.10  WGET_URL="$SF_MIRROR/docbook/$TARBALL"
    1.11  
    1.12  compile_rules() {
    1.13 -	mkdir -p \
    1.14 -		$install/usr/bin \
    1.15 -		$install/usr/share/man/man1 \
    1.16 -		$install/usr/share/sgml/docbook/dsssl-stylesheets-$VERSION
    1.17 +	install -Dm755 bin/collateindex.pl $install/usr/bin/collateindex.pl
    1.18  
    1.19 -	install -m755 bin/collateindex.pl   $install/usr/bin &&
    1.20 -	install -m644 bin/collateindex.pl.1 $install/usr/share/man/man1 &&
    1.21 -	cp -R * $install/usr/share/sgml/docbook/dsssl-stylesheets-$VERSION
    1.22 +	mkdir -p $install/usr/share/sgml/docbook/dsssl-stylesheets-$VERSION
    1.23 +	cp -R *  $install/usr/share/sgml/docbook/dsssl-stylesheets-$VERSION
    1.24 +
    1.25 +	cook_pick_manpages bin/collateindex.pl.1
    1.26 +	cook_pick_docs BUGS ChangeLog README RELEASE-NOTES.* WhatsNew
    1.27 +
    1.28 +	# clean
    1.29 +	cd $install/usr/share/sgml/docbook/dsssl-stylesheets-$VERSION
    1.30 +	rm BUGS ChangeLog README RELEASE-NOTES.* WhatsNew
    1.31 +	rmdir doc/ docsrc/
    1.32  }
    1.33  
    1.34  genpkg_rules() {
    1.35 -	copy bin/ *.dcl *.dtd *.gml *.dsl *.ent *.sgm *.mod *.css *.js \
    1.36 -	frames/*.htm *.gif catalog VERSION
    1.37 +	copy @std
    1.38 +	find $fs -type f -name ChangeLog -delete
    1.39  	DEPENDS="sgml-common"
    1.40  }
    1.41  
    1.42 @@ -34,9 +39,9 @@
    1.43  	local p3="/usr/share/sgml/docbook/dsssl-stylesheets-$VERSION"
    1.44  
    1.45  	touch  "$1/etc/sgml/catalog"
    1.46 -	chroot "$1/" install-catalog --remove $p1 $p3/catalog >/dev/null
    1.47 +	chroot "$1/" install-catalog --remove $p1 $p3/catalog        >/dev/null
    1.48  	chroot "$1/" install-catalog --remove $p1 $p3/common/catalog >/dev/null
    1.49 -	chroot "$1/" install-catalog --remove $p2 $p1 >/dev/null
    1.50 +	chroot "$1/" install-catalog --remove $p2 $p1                >/dev/null
    1.51  }
    1.52  
    1.53  post_install() {
    1.54 @@ -48,7 +53,7 @@
    1.55  	[ -e "$1$p1" -a -e "$1$p2" ] && pre_remove
    1.56  
    1.57  	touch "$1/etc/sgml/catalog" "$1$p1" "$1$p2"
    1.58 -	chroot "$1/" install-catalog --add $p1 $p3/catalog >/dev/null
    1.59 +	chroot "$1/" install-catalog --add $p1 $p3/catalog        >/dev/null
    1.60  	chroot "$1/" install-catalog --add $p1 $p3/common/catalog >/dev/null
    1.61 -	chroot "$1/" install-catalog --add $p2 $p1 >/dev/null
    1.62 +	chroot "$1/" install-catalog --add $p2 $p1                >/dev/null
    1.63  }
     2.1 --- a/docbook-sgml/receipt	Fri Oct 12 16:40:30 2018 +0300
     2.2 +++ b/docbook-sgml/receipt	Sat Oct 13 14:45:44 2018 +0300
     2.3 @@ -7,13 +7,13 @@
     2.4  MAINTAINER="al.bobylev@gmail.com"
     2.5  LICENSE="MIT"
     2.6  WEB_SITE="https://docbook.org/sgml/"
     2.7 +HOST_ARCH="any"
     2.8  
     2.9  TARBALL="docbook-$VERSION.zip"
    2.10 -WGET_URL="http://www.docbook.org/sgml/$VERSION/$TARBALL"
    2.11 +WGET_URL="https://docbook.org/sgml/$VERSION/$TARBALL"
    2.12  
    2.13  compile_rules() {
    2.14 -	sed -i -e '/ISO 8879/d' \
    2.15 -		-e '/gml/d' docbook.cat
    2.16 +	sed -i '/ISO 8879/d; /gml/d' docbook.cat
    2.17  
    2.18  	local dtd="$install/usr/share/sgml/docbook/sgml-dtd-$VERSION"
    2.19  
    2.20 @@ -49,8 +49,8 @@
    2.21  	local p3="/etc/sgml/sgml-docbook.cat"
    2.22  
    2.23  	touch  "$1/etc/sgml/catalog"
    2.24 -	chroot "$1/" install-catalog --remove $p1 $p2 > /dev/null
    2.25 -	chroot "$1/" install-catalog --remove $p1 $p3 > /dev/null
    2.26 +	chroot "$1/" install-catalog --remove $p1 $p2 >/dev/null
    2.27 +	chroot "$1/" install-catalog --remove $p1 $p3 >/dev/null
    2.28  }
    2.29  
    2.30  post_install() {
    2.31 @@ -62,6 +62,6 @@
    2.32  	[ -e "$1$p1" ] && pre_remove
    2.33  
    2.34  	touch "$1/etc/sgml/catalog" "$1$p1"
    2.35 -	chroot "$1/" install-catalog --add $p1 $p2 > /dev/null
    2.36 -	chroot "$1/" install-catalog --add $p1 $p3 > /dev/null
    2.37 +	chroot "$1/" install-catalog --add $p1 $p2 >/dev/null
    2.38 +	chroot "$1/" install-catalog --add $p1 $p3 >/dev/null
    2.39  }
     3.1 --- a/docbook-sgml3/receipt	Fri Oct 12 16:40:30 2018 +0300
     3.2 +++ b/docbook-sgml3/receipt	Sat Oct 13 14:45:44 2018 +0300
     3.3 @@ -7,14 +7,14 @@
     3.4  MAINTAINER="al.bobylev@gmail.com"
     3.5  LICENSE="MIT"
     3.6  WEB_SITE="https://docbook.org/sgml/"
     3.7 +HOST_ARCH="any"
     3.8  REPOLOGY="docbook-sgml"
     3.9  
    3.10  TARBALL="docbk31.zip"
    3.11 -WGET_URL="http://www.docbook.org/sgml/3.1/$TARBALL"
    3.12 +WGET_URL="https://docbook.org/sgml/3.1/$TARBALL"
    3.13  
    3.14  compile_rules() {
    3.15 -	sed -i -e '/ISO 8879/d' \
    3.16 -		-e 's|DTDDECL "-//OASIS//DTD DocBook V3.1//EN"|SGMLDECL|g' \
    3.17 +	sed -i '/ISO 8879/d; s|DTDDECL "-//OASIS//DTD DocBook V3.1//EN"|SGMLDECL|g' \
    3.18  		docbook.cat
    3.19  
    3.20  	local dtd="$install/usr/share/sgml/docbook/sgml-dtd-$VERSION"
     4.1 --- a/docbook-xml/receipt	Fri Oct 12 16:40:30 2018 +0300
     4.2 +++ b/docbook-xml/receipt	Sat Oct 13 14:45:44 2018 +0300
     4.3 @@ -260,27 +260,24 @@
     4.4  }
     4.5  
     4.6  post_install() {
     4.7 -	[ -d "$1/etc/xml/catalog" ] &&
     4.8 -	chroot "$1/" xmlcatalog --noout --del file:///etc/xml/docbook-xml /etc/xml/catalog
     4.9 +	local F="file:///etc/xml/docbook-xml"
    4.10 +	local C="/etc/xml/catalog"
    4.11  
    4.12 -	chroot "$1/" xmlcatalog --noout --add "delegatePublic" \
    4.13 -		"-//OASIS//ENTITIES DocBook XML" \
    4.14 -		"file:///etc/xml/docbook-xml" \
    4.15 -		"/etc/xml/catalog"
    4.16 -	chroot "$1/" xmlcatalog --noout --add "delegatePublic" \
    4.17 -		"-//OASIS//DTD DocBook XML" \
    4.18 -		"file:///etc/xml/docbook-xml" \
    4.19 -		"/etc/xml/catalog"
    4.20 -	chroot "$1/" xmlcatalog --noout --add "delegateSystem" \
    4.21 -		"http://www.oasis-open.org/docbook/" \
    4.22 -		"file:///etc/xml/docbook-xml" \
    4.23 -		"/etc/xml/catalog"
    4.24 -	chroot "$1/" xmlcatalog --noout --add "delegateURI" \
    4.25 -		"http://www.oasis-open.org/docbook/" \
    4.26 -		"file:///etc/xml/docbook-xml" \
    4.27 -		"/etc/xml/catalog"
    4.28 +	# Create a /etc/xml/catalog if it absent
    4.29 +	[ -s "$1/etc/xml/catalog" ] ||
    4.30 +	chroot "$1/" xmlcatalog --noout --create "$C"
    4.31 +
    4.32 +	# Remove the catalog items prior to upgrading
    4.33 +	chroot "$1/" xmlcatalog --noout --del "$F" "$C"
    4.34 +
    4.35 +	chroot "$1/" xmlcatalog --noout --add "delegatePublic" "-//OASIS//ENTITIES DocBook XML"     "$F" "$C"
    4.36 +	chroot "$1/" xmlcatalog --noout --add "delegatePublic" "-//OASIS//DTD DocBook XML"          "$F" "$C"
    4.37 +	chroot "$1/" xmlcatalog --noout --add "delegateSystem" "http://www.oasis-open.org/docbook/" "$F" "$C"
    4.38 +	chroot "$1/" xmlcatalog --noout --add "delegateURI"    "http://www.oasis-open.org/docbook/" "$F" "$C"
    4.39  }
    4.40  
    4.41 +# In most cases xmlcatalog unavailable at this point, use sed instead of:
    4.42 +# chroot "$1/" xmlcatalog --noout --del file:///etc/xml/docbook-xml /etc/xml/catalog
    4.43  post_remove() {
    4.44 -	chroot "$1/" xmlcatalog --noout --del file:///etc/xml/docbook-xml /etc/xml/catalog
    4.45 +	sed -i '/file:\/\/\/etc\/xml\/docbook-xml/d' "$1/etc/xml/catalog"
    4.46  }
     5.1 --- a/docbook-xsl-ns/receipt	Fri Oct 12 16:40:30 2018 +0300
     5.2 +++ b/docbook-xsl-ns/receipt	Sat Oct 13 14:45:44 2018 +0300
     5.3 @@ -1,77 +1,52 @@
     5.4 -# SliTaz package receipt.
     5.5 +# SliTaz package receipt v2.
     5.6  
     5.7  PACKAGE="docbook-xsl-ns"
     5.8  VERSION="1.79.1"
     5.9  CATEGORY="development"
    5.10 -SHORT_DESC="DocBook XSL (namespaced) stylesheets."
    5.11 +SHORT_DESC="DocBook XSL-NS stylesheets"
    5.12  MAINTAINER="paul@slitaz.org"
    5.13  LICENSE="MIT"
    5.14  WEB_SITE="http://docbook.sourceforge.net/"
    5.15 +HOST_ARCH="any"
    5.16  
    5.17  TARBALL="$PACKAGE-$VERSION.tar.bz2"
    5.18  WGET_URL="$SF_MIRROR/docbook/$TARBALL"
    5.19  
    5.20 -DEPENDS="libxml2-tools libxslt"
    5.21 +compile_rules() {
    5.22 +	dest="$install/usr/share/xml/docbook/stylesheet/docbook-xsl-ns"
    5.23 +	mkdir -p $dest
    5.24  
    5.25 -# Rules to gen a SliTaz package suitable for Tazpkg.
    5.26 -genpkg_rules()
    5.27 -{
    5.28 -	cd $src
    5.29 -	pkgroot=$fs/usr/share/xml/docbook/stylesheet/$PACKAGE
    5.30 -	install -dm755 $pkgroot/common
    5.31 -	install -dm755 $pkgroot/params
    5.32 +	cp VERSION VERSION.xsl $dest
    5.33  
    5.34 -	for fn in xml xsl dtd ent; do
    5.35 -		install -m644 common/*.${fn} $pkgroot/common/
    5.36 +	for i in assembly common eclipse epub epub3 fo highlighting html htmlhelp \
    5.37 +		javahelp lib manpages params profiling roundtrip template website \
    5.38 +		xhtml xhtml-1_1 xhtml5; do
    5.39 +		mkdir -p $dest/$i
    5.40 +		cp $i/*.xml $i/*.xsl $i/*.dtd $i/*.ent $dest/$i/ 2>/dev/null
    5.41  	done
    5.42 +	find $install -type f -name build.xml -delete
    5.43  
    5.44 -	for fn in fo highlighting html roundtrip; do
    5.45 -		install -dm755 ${pkgroot}/${fn}
    5.46 -		install -m644 ${fn}/*.xml ${pkgroot}/${fn}/
    5.47 -		install -m644 ${fn}/*.xsl ${pkgroot}/${fn}/
    5.48 -	done
    5.49 +	mkdir -p $install/etc/xml/
    5.50  
    5.51 -	for fn in eclipse htmlhelp javahelp lib manpages profiling template website xhtml xhtml-1_1; do
    5.52 -		install -dm755 ${pkgroot}/${fn}
    5.53 -		install -m644 ${fn}/*.xsl ${pkgroot}/${fn}/
    5.54 -	done
    5.55 +	cook_pick_docs README RELEASE-NOTES* NEWS*
    5.56  }
    5.57  
    5.58 -# Pre and post install commands for Tazpkg.
    5.59 -post_install()
    5.60 -{
    5.61 -	if [ "$1" ]; then
    5.62 -		mv -f "$1/etc/resolv.conf" "$1/etc/recolv.conf.$$" 2>/dev/null
    5.63 -		cp /etc/resolv.conf "$1/etc/resolv.conf"
    5.64 -	fi
    5.65 +genpkg_rules() {
    5.66 +	copy @std
    5.67 +	DEPENDS="libxml2-tools libxslt"
    5.68 +}
    5.69  
    5.70 -	# Create a /etc/xml/catalog file
    5.71 -	if [ ! -d "$1/etc/xml" ]; then install -v -m755 -d "$1/etc/xml"; fi &&
    5.72 -	if [ ! -f "$1/etc/xml/catalog" ]; then
    5.73 -		chroot "$1/" xmlcatalog --noout --create /etc/xml/catalog
    5.74 -	fi &&
    5.75 +post_install() {
    5.76 +	local U="http://docbook.sourceforge.net/release/xsl-ns"
    5.77 +	local F="file:///usr/share/xml/docbook/stylesheet/docbook-xsl-ns/catalog.xml"
    5.78 +	local C="/etc/xml/catalog"
    5.79  
    5.80 -	chroot "$1/" xmlcatalog --noout --add "rewriteSystem" \
    5.81 -		"http://docbook.sourceforge.net/release/xsl-ns/$VERSION" \
    5.82 -		"/usr/share/xml/docbook/stylesheet/$PACKAGE/catalog.xml" \
    5.83 -	/etc/xml/catalog &&
    5.84 +	# Create a /etc/xml/catalog if it absent
    5.85 +	mkdir -p "$1/etc/xml/"
    5.86 +	[ -s "$1/etc/xml/catalog" ] || chroot "$1/" xmlcatalog --noout --create "$C"
    5.87  
    5.88 -	chroot "$1/" xmlcatalog --noout --add "rewriteURI" \
    5.89 -		"http://docbook.sourceforge.net/release/xsl-ns/$VERSION" \
    5.90 -		"/usr/share/xml/docbook/stylesheet/$PACKAGE/catalog.xml" \
    5.91 -	/etc/xml/catalog &&
    5.92 -
    5.93 -	chroot "$1/" xmlcatalog --noout --add "rewriteSystem" \
    5.94 -		"http://docbook.sourceforge.net/release/xsl-ns/current" \
    5.95 -		"/usr/share/xml/docbook/stylesheet/$PACKAGE/catalog.xml" \
    5.96 -	/etc/xml/catalog &&
    5.97 -
    5.98 -	chroot "$1/" xmlcatalog --noout --add "rewriteURI" \
    5.99 -		"http://docbook.sourceforge.net/release/xsl-ns/current" \
   5.100 -		"/usr/share/xml/docbook/stylesheet/$PACKAGE/catalog.xml" \
   5.101 -	/etc/xml/catalog
   5.102 -
   5.103 -	if [ "$1" ]; then
   5.104 -		mv -f "$1/etc/resolv.conf.$$" "$1/etc/recolv.conf" 2>/dev/null
   5.105 -	fi
   5.106 +	chroot "$1/" xmlcatalog --noout --add "rewriteSystem" "$U/$VERSION" "$F" "$C"
   5.107 +	chroot "$1/" xmlcatalog --noout --add "rewriteURI"    "$U/$VERSION" "$F" "$C"
   5.108 +	chroot "$1/" xmlcatalog --noout --add "rewriteSystem" "$U/current"  "$F" "$C"
   5.109 +	chroot "$1/" xmlcatalog --noout --add "rewriteURI"    "$U/current"  "$F" "$C"
   5.110  }
     6.1 --- a/docbook-xsl/receipt	Fri Oct 12 16:40:30 2018 +0300
     6.2 +++ b/docbook-xsl/receipt	Sat Oct 13 14:45:44 2018 +0300
     6.3 @@ -7,21 +7,27 @@
     6.4  MAINTAINER="paul@slitaz.org"
     6.5  LICENSE="MIT"
     6.6  WEB_SITE="https://github.com/docbook/xslt10-stylesheets"
     6.7 +HOST_ARCH="any"
     6.8  LFS="http://www.linuxfromscratch.org/blfs/view/svn/pst/docbook-xsl.html"
     6.9  
    6.10  TARBALL="$PACKAGE-$VERSION.tar.bz2"
    6.11 -WGET_URL="https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F$VERSION/$TARBALL"
    6.12 +WGET_URL="$WEB_SITE/releases/download/release%2F$VERSION/$TARBALL"
    6.13  
    6.14  compile_rules() {
    6.15 -	mkdir -p $install/usr/share/xml/docbook/stylesheet/docbook-xsl/
    6.16 +	dest="$install/usr/share/xml/docbook/stylesheet/docbook-xsl"
    6.17 +	mkdir -p $dest
    6.18  
    6.19 -	cp -R \
    6.20 -		VERSION assembly common eclipse epub epub3 extensions fo highlighting \
    6.21 -		html htmlhelp images javahelp lib manpages params profiling roundtrip \
    6.22 -		slides template tests tools webhelp website xhtml xhtml-1_1 xhtml5 \
    6.23 -		$install/usr/share/xml/docbook/stylesheet/docbook-xsl/ &&
    6.24 +	cp VERSION VERSION.xsl $dest
    6.25  
    6.26 -	ln -s VERSION $install/usr/share/xml/docbook/stylesheet/docbook-xsl/VERSION.xsl &&
    6.27 +	for i in assembly common eclipse epub epub3 fo highlighting html htmlhelp \
    6.28 +		javahelp lib manpages params profiling roundtrip template website \
    6.29 +		xhtml xhtml-1_1 xhtml5; do
    6.30 +		mkdir -p $dest/$i
    6.31 +		cp $i/*.xml $i/*.xsl $i/*.dtd $i/*.ent $dest/$i/ 2>/dev/null
    6.32 +	done
    6.33 +	find $install -type f -name build.xml -delete
    6.34 +
    6.35 +	mkdir -p $install/etc/xml/
    6.36  
    6.37  	cook_pick_docs README RELEASE-NOTES* NEWS*
    6.38  }
    6.39 @@ -32,32 +38,23 @@
    6.40  }
    6.41  
    6.42  post_install() {
    6.43 -	if [ -n "$1" ]; then
    6.44 -		mv -f "$1/etc/resolv.conf" "$1/etc/recolv.conf.$$" 2>/dev/null
    6.45 -		cp /etc/resolv.conf "$1/etc/resolv.conf"
    6.46 -	fi
    6.47 +	local U="http://docbook.sourceforge.net/release/xsl"
    6.48 +	local F="file:///usr/share/xml/docbook/stylesheet/docbook-xsl"
    6.49 +	local C="/etc/xml/catalog"
    6.50  
    6.51 -	U="http://docbook.sourceforge.net/release/xsl"
    6.52 -	F="/usr/share/xml/docbook/stylesheet/docbook-xsl"
    6.53 -	C="/etc/xml/catalog"
    6.54 +	# Create a /etc/xml/catalog if it absent
    6.55 +	[ -s "$1/etc/xml/catalog" ] || chroot "$1/" xmlcatalog --noout --create "$C"
    6.56  
    6.57 -	# Create a /etc/xml/catalog file
    6.58 -	mkdir -p "$1/etc/xml"
    6.59 -	if [ ! -f "$1/etc/xml/catalog" ]; then
    6.60 -		chroot "$1/" xmlcatalog --noout --create "$C"
    6.61 -	fi &&
    6.62 +	# Remove the catalog items prior to upgrading
    6.63 +	chroot "$1/" xmlcatalog --noout --del "$F" "$C"
    6.64  
    6.65 -	chroot "$1/" xmlcatalog --noout --add rewriteSystem "$U/$VERSION" "$F" $C &&
    6.66 -	chroot "$1/" xmlcatalog --noout --add rewriteURI    "$U/$VERSION" "$F" $C &&
    6.67 -	chroot "$1/" xmlcatalog --noout --add rewriteSystem "$U/current"  "$F" $C &&
    6.68 +	chroot "$1/" xmlcatalog --noout --add rewriteSystem "$U/$VERSION" "$F" $C
    6.69 +	chroot "$1/" xmlcatalog --noout --add rewriteURI    "$U/$VERSION" "$F" $C
    6.70 +	chroot "$1/" xmlcatalog --noout --add rewriteSystem "$U/current"  "$F" $C
    6.71  	chroot "$1/" xmlcatalog --noout --add rewriteURI    "$U/current"  "$F" $C
    6.72 +}
    6.73  
    6.74 -#	# link nwalsh dir
    6.75 -#	ln -sf docbook-xsl "$1/usr/share/xml/docbook/stylesheet/nwalsh"
    6.76 -
    6.77 -	if [ -n "$1" ]; then
    6.78 -		mv -f "$1/etc/resolv.conf.$$" "$1/etc/recolv.conf" 2>/dev/null
    6.79 -	fi
    6.80 -
    6.81 -	:
    6.82 +# In most cases xmlcatalog unavailable at this point, use sed instead
    6.83 +post_remove() {
    6.84 +	sed -i '/file:\/\/\/usr\/share\/xml\/docbook\/stylesheet\/docbook-xsl/d' "$1/etc/xml/catalog"
    6.85  }