# HG changeset patch # User Christopher Rogers # Date 1295546839 0 # Node ID 94e1889a6838d0f05d7c7b0c4c6d5bcf422feceb # Parent 4af8ad8c803b2dea0943f934720adc2692f7ae79 Add pre_install and post_remove to gzip. This is to add the busybox soft links for gzip if gzip is uninstalled. diff -r 4af8ad8c803b -r 94e1889a6838 gzip-full/receipt --- a/gzip-full/receipt Fri Jan 21 01:07:16 2011 +0100 +++ b/gzip-full/receipt Thu Jan 20 18:07:19 2011 +0000 @@ -6,7 +6,6 @@ SHORT_DESC="Gzip full programs" MAINTAINER="erjo@slitaz.org" DEPENDS="gzip" -TARBALL="$PACKAGE-$VERSION.tar.gz" WEB_SITE="http://www.gnu.org/software/gzip/" WANTED="gzip" diff -r 4af8ad8c803b -r 94e1889a6838 gzip/receipt --- a/gzip/receipt Fri Jan 21 01:07:16 2011 +0100 +++ b/gzip/receipt Thu Jan 20 18:07:19 2011 +0000 @@ -31,3 +31,22 @@ cp -a $_pkg/usr/bin/gunzip $fs/usr/bin } +# Pre and post install commands for Tazpkg. +# We must remove all Busybox symlink before installing. +# +pre_install() +{ + local root + root=$1 + echo "Processing pre-install commands..." + echo -n "Removing all Busybox replaced utils... " + rm -f $root/bin/gzip + rm -f $root/bin/gunzip + status +} + +post_remove() +{ + ln -s /bin/busybox /bin/gzip + ln -s /bin/busybox /bin/gunzip +}