wok annotate gawk/receipt @ rev 24436

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 13 13:09:42 2022 +0000 (2022-02-13)
parents 72dc2894e87b
children 4f7327b96a5a
rev   line source
pankso@70 1 # SliTaz package receipt.
pankso@70 2
pankso@70 3 PACKAGE="gawk"
Hans-G?nter@22805 4 VERSION="5.0.1"
pankso@204 5 CATEGORY="development"
pankso@70 6 SHORT_DESC="GNU awk to handle simple data-reformatting."
pankso@70 7 MAINTAINER="pankso@slitaz.org"
pascal@15201 8 LICENSE="GPL3"
Hans-G?nter@20948 9 WEB_SITE="https://www.gnu.org/software/gawk/"
Hans-G?nter@20948 10
pankso@70 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@70 12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pankso@70 13
slaxemulator@10348 14 DEPENDS=""
pascal@19115 15 BUILD_DEPENDS=""
Hans-G?nter@22805 16
Hans-G?nter@20948 17 HOST_ARCH="i486 arm"
slaxemulator@10348 18
pascal@24336 19 # What is the latest version available today?
pascal@24336 20 current_version()
pascal@24336 21 {
pascal@24336 22 wget -O - ${WGET_URL%/*} 2>/dev/null | \
pascal@24336 23 sed "/doc/d;/ps/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
pascal@24336 24 }
pascal@24336 25
gokhlayeh@8179 26 # Rules to compile & install the temporary toolchain.
gokhlayeh@8179 27 cook_tmp_toolchain()
gokhlayeh@8179 28 {
Hans-G?nter@20948 29 ./configure &&
Hans-G?nter@20948 30 make -j 1 &&
Hans-G?nter@20948 31 make install
gokhlayeh@8179 32 }
gokhlayeh@8179 33
pankso@70 34 # Rules to configure and make the package.
pankso@70 35 compile_rules()
pankso@70 36 {
Hans-G?nter@22805 37 ./configure \
Hans-G?nter@22805 38 --libexecdir=/usr/lib \
slaxemulator@10285 39 $CONFIGURE_ARGS &&
Hans-G?nter@20948 40 make -j 1 &&
Hans-G?nter@20948 41 make install
pankso@70 42 }
pankso@70 43
pankso@70 44 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@70 45 genpkg_rules()
pankso@70 46 {
pankso@70 47 mkdir -p $fs/usr/share/locale
Hans-G?nter@22805 48
Hans-G?nter@22805 49 # Set list of wanted locales in LOCALE_PACK
Hans-G?nter@22805 50 . $WOK/slitaz-i18n/stuff/locale-pack.conf
Hans-G?nter@22805 51
Hans-G?nter@22805 52 # Copy message files in wanted languages, if available
Hans-G?nter@22805 53 for locale in $LOCALE_PACK
Hans-G?nter@22805 54 do
Hans-G?nter@22805 55 [ -d $install/usr/share/locale/$locale ] || continue
Hans-G?nter@20948 56 cp -a $install/usr/share/locale/$locale $fs/usr/share/locale
Hans-G?nter@22805 57 done
Hans-G?nter@20948 58
Hans-G?nter@20948 59 cp -a $install/usr/bin $fs/usr
pankso@70 60
Hans-G?nter@20948 61 cp -a $install/usr/share/awk $fs/usr/share
pankso@70 62 }
pankso@70 63
rcx@3535 64 # Pre and post install commands for Tazpkg.
rcx@3535 65 # We must remove all Busybox symlink before installing.
pankso@73 66 pre_install()
pankso@70 67 {
pascal@18730 68 rm -f "$1/usr/bin/awk"
pankso@70 69 }
pankso@70 70
rcx@3535 71 post_remove()
rcx@3535 72 {
pascal@18730 73 ln -s /bin/busybox "$1/usr/bin/awk"
rcx@3535 74 }