SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "file"

# SliTaz package receipt.

PACKAGE="file"
VERSION="5.41"
CATEGORY="system-tools"
SHORT_DESC="Determines file type using 'magic' numbers."
MAINTAINER="erjo@slitaz.org"
LICENSE="BSD"
WEB_SITE="https://github.com/file/file"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="ftp://ftp.astron.com/pub/file/$TARBALL"

DEPENDS="gcc-lib-base libmagic zlib"
BUILD_DEPENDS="gcc python python-setuptools zlib-dev"

HOST_ARCH="i486 arm x86_64"

# @maintainer: Please, update also: libmagic, libmagic-dev, python-magic.

# Handle cross compilation. python is installed in a ARM cook env.
case "$ARCH" in
    (arm)    BUILD_DEPENDS=""
        ;;
esac

# What is the latest version available today?
current_version()
{
    wget -O - $WEB_SITE/tags 2>/dev/null | \
    sed '/archive.*tar/!d;s|.*/[A-Za-z_-]*\(.*\).tar.*|\1|;s|_|.|g;q'
}

# Rules to configure and make the package.
compile_rules()
{
    sed -i 's/, has_debug_info = 1/, has_debug_info = 0/' \
        src/readelf.c

    ./configure                \
        CC=gcc                \
        --datarootdir=/usr/share    \
        $CONFIGURE_ARGS &&
    make &&
    make install &&
    cd python &&
    python setup.py build &&
    python setup.py install --root=$DESTDIR
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/share

    cp -a $install/usr/bin        $fs/usr
    cp -a $install/usr/share/misc    $fs/usr/share
}

# Be sure it as cross compile.
testsuite()
{
    readelf -h $install/usr/bin/file
}
6063 packages and 233209 files in current database (Sat Dec 21 00:00:03 2024)