wok view grep/receipt @ rev 24336

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jan 28 18:19:21 2022 +0000 (2022-01-28)
parents cc3cefae8ca2
children 6c76b35274f9
line source
1 # SliTaz package receipt.
3 PACKAGE="grep"
4 VERSION="3.4"
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 DEPENDS="pcre"
15 BUILD_DEPENDS="pcre-dev"
17 # What is the latest version available today?
18 current_version()
19 {
20 wget -O - ${WGET_URL%/*} 2>/dev/null | \
21 sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 ./configure $CONFIGURE_ARGS &&
28 make -j 1 &&
29 make install
31 find $install/usr/share/man -type f -exec gzip -9 \{\} \;
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr/share
39 cp -a $install/usr/bin $fs
40 cp -a $install/usr/share/man $fs/usr/share
41 }
43 post_remove()
44 {
45 for i in grep egrep fgrep
46 do
47 ln -sf busybox "$1/bin/$i"
48 done
49 }