wok view file/receipt @ rev 25037

Up glza (0.11.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 21 21:38:29 2022 +0000 (23 months ago)
parents b569b85b0fb9
children c370be1be30e
line source
1 # SliTaz package receipt.
3 PACKAGE="file"
4 VERSION="5.41"
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="gcc83-lib-base libmagic zlib"
15 BUILD_DEPENDS="gcc83 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 ;;
25 esac
27 # What is the latest version available today?
28 current_version()
29 {
30 wget -O - $WEB_SITE/tags 2>/dev/null | \
31 sed '/archive.*tar/!d;s|.*/[A-Za-z_-]*\(.*\).tar.*|\1|;s|_|.|g;q'
32 }
34 # Rules to configure and make the package.
35 compile_rules()
36 {
37 sed -i 's/, has_debug_info = 1/, has_debug_info = 0/' \
38 src/readelf.c
40 ./configure \
41 CC=gcc-83 \
42 --datarootdir=/usr/share \
43 $CONFIGURE_ARGS &&
44 make &&
45 make install &&
46 cd python &&
47 python setup.py build &&
48 python setup.py install --root=$DESTDIR
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 mkdir -p $fs/usr/share
56 cp -a $install/usr/bin $fs/usr
57 cp -a $install/usr/share/misc $fs/usr/share
58 }
60 # Be sure it as cross compile.
61 testsuite()
62 {
63 readelf -h $install/usr/bin/file
64 }