wok-next annotate grep/receipt @ rev 17502

grep: fix busybox paths
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jan 08 10:35:01 2015 +0100 (2015-01-08)
parents 2b9f96603415
children 04239f2844c3
rev   line source
paul@7100 1 # SliTaz package receipt.
paul@7100 2
paul@7100 3 PACKAGE="grep"
slaxemulator@13083 4 VERSION="2.11"
paul@7100 5 CATEGORY="development"
paul@7100 6 SHORT_DESC="GNU Global Regular Expression Print."
paul@7100 7 MAINTAINER="paul@slitaz.org"
pascal@14999 8 LICENSE="GPL3"
slaxemulator@11681 9 TARBALL="$PACKAGE-$VERSION.tar.xz"
paul@7100 10 WEB_SITE="http://www.gnu.org/software/grep/"
paul@7100 11 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
paul@7100 12
slaxemulator@11681 13 DEPENDS="pcre"
slaxemulator@11681 14 BUILD_DEPENDS="pcre-dev"
slaxemulator@11681 15
paul@7100 16 # Rules to configure and make the package.
paul@7100 17 compile_rules()
paul@7100 18 {
paul@7100 19 cd $src
slaxemulator@10089 20 ./configure $CONFIGURE_ARGS &&
slaxemulator@10089 21 make && make install
paul@7100 22 }
paul@7100 23
paul@7100 24 # Rules to gen a SliTaz package suitable for Tazpkg.
paul@7100 25 genpkg_rules()
paul@7100 26 {
paul@7100 27 mkdir -p $fs/usr
pascal@14999 28 cp -a $install/usr/bin $fs/usr
paul@7100 29 }
paul@7100 30
slaxemulator@7187 31 # Pre and post install commands for Tazpkg.
slaxemulator@7187 32 # We must remove all Busybox symlink before installing.
slaxemulator@7187 33 #
slaxemulator@7187 34 pre_install()
slaxemulator@7187 35 {
slaxemulator@7187 36 local root
slaxemulator@7187 37 root=$1
slaxemulator@7187 38 echo "Processing pre-install commands..."
slaxemulator@7187 39 echo -n "Removing all Busybox replaced utils... "
pascal@17502 40 for i in grep egrep fgrep ; do
pascal@17502 41 rm -f $root$(busybox grep bin/$i$ \
pascal@17502 42 $root/var/lib/tazpkg/installed/busybox/files.list)
pascal@17502 43 done
slaxemulator@7187 44 status
slaxemulator@7187 45 }
slaxemulator@7187 46
slaxemulator@7187 47 post_remove()
slaxemulator@7187 48 {
pascal@17502 49 for i in grep egrep fgrep ; do
pascal@17502 50 ln -s /bin/busybox $root$(busybox grep bin/$i$ \
pascal@17502 51 $root/var/lib/tazpkg/installed/busybox/files.list)
pascal@17502 52 done
slaxemulator@7187 53 }