wok view 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
line source
1 # SliTaz package receipt.
3 PACKAGE="file"
4 VERSION="5.38"
5 CATEGORY="system-tools"
6 SHORT_DESC="Determines file type using 'magic' numbers."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="https://github.com/file/file"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="ftp://ftp.astron.com/pub/file/$TARBALL"
14 DEPENDS="libmagic zlib"
15 BUILD_DEPENDS="python python-setuptools zlib-dev"
17 HOST_ARCH="i486 arm"
19 # @maintainer: Please, update also: libmagic, libmagic-dev, python-magic.
21 # Handle cross compilation. python is installed in a ARM cook env.
22 case "$ARCH" in
23 arm) BUILD_DEPENDS="" ;;
24 esac
26 # What is the latest version available today?
27 current_version()
28 {
29 wget -O - $WEB_SITE/tags 2>/dev/null | \
30 sed '/archive.*tar/!d;s|.*/[A-Za-z_-]*\(.*\).tar.*|\1|;s|_|.|g;q'
31 }
33 # Rules to configure and make the package.
34 compile_rules()
35 {
36 sed -i 's/, has_debug_info = 1/, has_debug_info = 0/' \
37 src/readelf.c
39 ./configure \
40 --datarootdir=/usr/share \
41 $CONFIGURE_ARGS &&
42 make -j 1 &&
43 make install &&
44 cd python &&
45 python setup.py build &&
46 python setup.py install --root=$DESTDIR
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 mkdir -p $fs/usr/share
54 cp -a $install/usr/bin $fs/usr
55 cp -a $install/usr/share/misc $fs/usr/share
56 }
58 # Be sure it as cross compile.
59 testsuite()
60 {
61 readelf -h $install/usr/bin/file
62 }