wok annotate file/receipt @ rev 24545
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Feb 24 19:32:16 2022 +0000 (2022-02-24) |
parents | fa097cfdd98e |
children | ff86a04c1516 |
rev | line source |
---|---|
erjo@170 | 1 # SliTaz package receipt. |
erjo@170 | 2 |
erjo@170 | 3 PACKAGE="file" |
Hans-G?nter@22758 | 4 VERSION="5.38" |
pankso@211 | 5 CATEGORY="system-tools" |
Hans-G?nter@20919 | 6 SHORT_DESC="Determines file type using 'magic' numbers." |
erjo@784 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15379 | 8 LICENSE="BSD" |
pascal@20947 | 9 WEB_SITE="https://github.com/file/file" |
Hans-G?nter@20919 | 10 |
erjo@170 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
slaxemulator@11289 | 12 WGET_URL="ftp://ftp.astron.com/pub/file/$TARBALL" |
pankso@12982 | 13 |
Hans-G?nter@22758 | 14 DEPENDS="libmagic zlib" |
Hans-G?nter@22758 | 15 BUILD_DEPENDS="python python-setuptools zlib-dev" |
Hans-G?nter@22758 | 16 |
Hans-G?nter@20919 | 17 HOST_ARCH="i486 arm" |
erjo@170 | 18 |
Hans-G?nter@20919 | 19 # @maintainer: Please, update also: libmagic, libmagic-dev, python-magic. |
al@17217 | 20 |
pankso@15953 | 21 # Handle cross compilation. python is installed in a ARM cook env. |
pankso@15953 | 22 case "$ARCH" in |
pankso@15953 | 23 arm) BUILD_DEPENDS="" ;; |
pankso@15953 | 24 esac |
pankso@15953 | 25 |
pascal@24308 | 26 # What is the latest version available today? |
pascal@24308 | 27 current_version() |
pascal@24308 | 28 { |
pascal@24308 | 29 wget -O - $WEB_SITE/tags 2>/dev/null | \ |
pascal@24308 | 30 sed '/archive.*tar/!d;s|.*/[A-Za-z_-]*\(.*\).tar.*|\1|;s|_|.|g;q' |
pascal@24308 | 31 } |
pascal@24308 | 32 |
erjo@170 | 33 # Rules to configure and make the package. |
erjo@170 | 34 compile_rules() |
erjo@170 | 35 { |
Hans-G?nter@22758 | 36 sed -i 's/, has_debug_info = 1/, has_debug_info = 0/' \ |
Hans-G?nter@22758 | 37 src/readelf.c |
Hans-G?nter@22758 | 38 |
Hans-G?nter@22758 | 39 ./configure \ |
Hans-G?nter@22758 | 40 --datarootdir=/usr/share \ |
pankso@12982 | 41 $CONFIGURE_ARGS && |
Hans-G?nter@20919 | 42 make -j 1 && |
Hans-G?nter@20919 | 43 make install && |
pascal@14901 | 44 cd python && |
pascal@14901 | 45 python setup.py build && |
pascal@14901 | 46 python setup.py install --root=$DESTDIR |
erjo@170 | 47 } |
erjo@170 | 48 |
erjo@170 | 49 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@170 | 50 genpkg_rules() |
erjo@170 | 51 { |
pankso@12982 | 52 mkdir -p $fs/usr/share |
Hans-G?nter@22758 | 53 |
Hans-G?nter@22758 | 54 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@22758 | 55 cp -a $install/usr/share/misc $fs/usr/share |
erjo@170 | 56 } |
pankso@15953 | 57 |
pankso@15953 | 58 # Be sure it as cross compile. |
pankso@15953 | 59 testsuite() |
pankso@15953 | 60 { |
pankso@15953 | 61 readelf -h $install/usr/bin/file |
pankso@15953 | 62 } |