wok view grep/receipt @ rev 18730

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