wok-current rev 8061

Add pre_install and post_remove to gzip. This is to add the busybox soft links for gzip if gzip is uninstalled.
author Christopher Rogers <slaxemulator@gmail.com>
date Thu Jan 20 18:07:19 2011 +0000 (2011-01-20)
parents 4af8ad8c803b
children 6222200efb6f
files gzip-full/receipt gzip/receipt
line diff
     1.1 --- a/gzip-full/receipt	Fri Jan 21 01:07:16 2011 +0100
     1.2 +++ b/gzip-full/receipt	Thu Jan 20 18:07:19 2011 +0000
     1.3 @@ -6,7 +6,6 @@
     1.4  SHORT_DESC="Gzip full programs"
     1.5  MAINTAINER="erjo@slitaz.org"
     1.6  DEPENDS="gzip"
     1.7 -TARBALL="$PACKAGE-$VERSION.tar.gz"
     1.8  WEB_SITE="http://www.gnu.org/software/gzip/"
     1.9  WANTED="gzip"
    1.10  
     2.1 --- a/gzip/receipt	Fri Jan 21 01:07:16 2011 +0100
     2.2 +++ b/gzip/receipt	Thu Jan 20 18:07:19 2011 +0000
     2.3 @@ -31,3 +31,22 @@
     2.4  	cp -a $_pkg/usr/bin/gunzip $fs/usr/bin
     2.5  }
     2.6  
     2.7 +# Pre and post install commands for Tazpkg.
     2.8 +# We must remove all Busybox symlink before installing.
     2.9 +#
    2.10 +pre_install()
    2.11 +{
    2.12 +	local root
    2.13 +	root=$1
    2.14 +	echo "Processing pre-install commands..."
    2.15 +	echo -n "Removing all Busybox replaced utils... "
    2.16 +	rm -f $root/bin/gzip
    2.17 +	rm -f $root/bin/gunzip
    2.18 +	status
    2.19 +}
    2.20 +
    2.21 +post_remove()
    2.22 +{
    2.23 +	ln -s /bin/busybox /bin/gzip
    2.24 +	ln -s /bin/busybox /bin/gunzip
    2.25 +}