wok view grep/receipt @ rev 24789

grep: add post_install (install)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 21 09:36:52 2022 +0000 (2022-03-21)
parents 125ccb253e50
children 25f321eee88e
line source
1 # SliTaz package receipt.
3 PACKAGE="grep"
4 VERSION="3.7"
5 CATEGORY="development"
6 SHORT_DESC="GNU Global Regular Expression Print."
7 MAINTAINER="paul@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="https://www.gnu.org/software/grep/"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
14 SUGGESTED="grep-lang"
15 DEPENDS="pcre"
16 BUILD_DEPENDS="pcre-dev"
18 # What is the latest version available today?
19 current_version()
20 {
21 wget -O - ${WGET_URL%/*} 2>/dev/null | \
22 sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 ./configure $CONFIGURE_ARGS &&
29 make &&
30 make install
32 find $install/usr/share/man -type f -exec gzip -9 \{\} \;
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 cook_copy_folders bin
39 }
41 post_install()
42 {
43 for i in grep egrep fgrep
44 do
45 [ "$(readlink "$1/bin/$i")" = "busybox" ] &&
46 ln -sf "../usr/bin/$i" "$1/bin/$i"
47 done
48 }
50 post_remove()
51 {
52 for i in grep egrep fgrep
53 do
54 ln -sf busybox "$1/bin/$i"
55 done
56 }