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