wok-6.x annotate diffutils/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 | 3a83121a1137 |
children | 73d8fca57fa5 |
rev | line source |
---|---|
pascal@2083 | 1 # SliTaz package receipt. |
pascal@2083 | 2 |
pascal@2083 | 3 PACKAGE="diffutils" |
Hans-G?nter@20830 | 4 VERSION="3.7" |
pascal@2083 | 5 CATEGORY="development" |
pascal@2083 | 6 SHORT_DESC="Show differences between two files." |
pascal@2083 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15579 | 8 LICENSE="GPL3" |
Hans-G?nter@20830 | 9 WEB_SITE="http://www.gnu.org/software/diffutils/" |
Hans-G?nter@20830 | 10 |
devl547@17654 | 11 TARBALL="$PACKAGE-$VERSION.tar.xz" |
pascal@2083 | 12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL" |
pascal@2083 | 13 |
pascal@24336 | 14 # What is the latest version available today? |
pascal@24336 | 15 current_version() |
pascal@24336 | 16 { |
pascal@24336 | 17 wget -O - ${WGET_URL%/*} 2>/dev/null | \ |
pascal@24336 | 18 sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q |
pascal@24336 | 19 } |
pascal@24336 | 20 |
pascal@2083 | 21 # Rules to configure and make the package. |
pascal@2083 | 22 compile_rules() |
pascal@2083 | 23 { |
devl547@17654 | 24 sed -i 's:= @mkdir_p@:= /bin/mkdir -p:' po/Makefile.in.in |
Hans-G?nter@20830 | 25 |
Hans-G?nter@20830 | 26 ./configure \ |
Hans-G?nter@20830 | 27 --prefix=/usr \ |
Hans-G?nter@20830 | 28 $CONFIGURE_ARGS && |
pascal@2083 | 29 make && |
slaxemulator@11098 | 30 make DESTDIR=$DESTDIR install |
pascal@2083 | 31 } |
pascal@2083 | 32 |
pascal@2083 | 33 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@2083 | 34 genpkg_rules() |
pascal@2083 | 35 { |
pascal@2083 | 36 mkdir -p $fs/usr |
pascal@15579 | 37 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@20830 | 38 |
Hans-G?nter@20830 | 39 # Localisations: |
Hans-G?nter@20830 | 40 for lang in da de fr id it pt_BR ro ru; do |
Hans-G?nter@20830 | 41 mkdir -p $fs/usr/share/locale/$lang/LC_MESSAGES |
Hans-G?nter@20830 | 42 cp -a $install/usr/share/locale/$lang/LC_MESSAGES/diffutils.mo \ |
Hans-G?nter@20830 | 43 $fs/usr/share/locale/$lang/LC_MESSAGES/diffutils.mo |
Hans-G?nter@20830 | 44 done |
Hans-G?nter@20830 | 45 |
pascal@2083 | 46 } |
pascal@8875 | 47 |
pascal@8875 | 48 # Overlap busybox |
pascal@8875 | 49 pre_install() |
pascal@8875 | 50 { |
pascal@18730 | 51 rm -f "$1/usr/bin/diff" |
pascal@18730 | 52 rm -f "$1/usr/bin/cmp" |
pascal@8875 | 53 } |
pascal@8875 | 54 |
pascal@8875 | 55 post_remove() |
pascal@8875 | 56 { |
pascal@18730 | 57 ln -s /bin/busybox "$1/usr/bin/diff" |
pascal@18730 | 58 ln -s /bin/busybox "$1/usr/bin/cmp" |
pascal@8875 | 59 } |