wok-6.x annotate 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 |
rev | line source |
---|---|
paul@7100 | 1 # SliTaz package receipt. |
paul@7100 | 2 |
paul@7100 | 3 PACKAGE="grep" |
Hans-G?nter@22880 | 4 VERSION="3.4" |
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" |
Hans-G?nter@21000 | 9 WEB_SITE="https://www.gnu.org/software/grep/" |
Hans-G?nter@21000 | 10 |
slaxemulator@11681 | 11 TARBALL="$PACKAGE-$VERSION.tar.xz" |
paul@7100 | 12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL" |
paul@7100 | 13 |
slaxemulator@11681 | 14 DEPENDS="pcre" |
slaxemulator@11681 | 15 BUILD_DEPENDS="pcre-dev" |
slaxemulator@11681 | 16 |
pascal@24336 | 17 # What is the latest version available today? |
pascal@24336 | 18 current_version() |
pascal@24336 | 19 { |
pascal@24336 | 20 wget -O - ${WGET_URL%/*} 2>/dev/null | \ |
pascal@24336 | 21 sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q |
pascal@24336 | 22 } |
pascal@24336 | 23 |
paul@7100 | 24 # Rules to configure and make the package. |
paul@7100 | 25 compile_rules() |
paul@7100 | 26 { |
al@18741 | 27 ./configure $CONFIGURE_ARGS && |
Hans-G?nter@21000 | 28 make -j 1 && |
Hans-G?nter@21000 | 29 make install |
al@19222 | 30 |
al@19222 | 31 find $install/usr/share/man -type f -exec gzip -9 \{\} \; |
paul@7100 | 32 } |
paul@7100 | 33 |
paul@7100 | 34 # Rules to gen a SliTaz package suitable for Tazpkg. |
paul@7100 | 35 genpkg_rules() |
paul@7100 | 36 { |
al@19222 | 37 mkdir -p $fs/usr/share |
Hans-G?nter@22880 | 38 |
Hans-G?nter@21000 | 39 cp -a $install/usr/bin $fs |
Hans-G?nter@21000 | 40 cp -a $install/usr/share/man $fs/usr/share |
paul@7100 | 41 } |
paul@7100 | 42 |
slaxemulator@7187 | 43 post_remove() |
slaxemulator@7187 | 44 { |
Hans-G?nter@22880 | 45 for i in grep egrep fgrep |
Hans-G?nter@22880 | 46 do |
al@18999 | 47 ln -sf busybox "$1/bin/$i" |
Hans-G?nter@22880 | 48 done |
slaxemulator@7187 | 49 } |