SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "gzip"

# SliTaz package receipt.

PACKAGE="gzip"
VERSION="1.12"
CATEGORY="system-tools"
SHORT_DESC="GNU compression utilities (gzip and gunzip)"
MAINTAINER="erjo@slitaz.org"
LICENSE="GPL3"
TARBALL="$PACKAGE-$VERSION.tar.xz"
WEB_SITE="http://www.gnu.org/software/gzip/"
WGET_URL="http://ftp.gnu.org/gnu/gzip/$TARBALL"

DEPENDS="glibc-base"
BUILD_DEPENDS="glibc-dev"

current_version()
{
    wget -O - $(dirname $WGET_URL) 2>/dev/null | \
    sed '/tar/!d;s|.*gzip-\(.*\).tar.*".*|\1|' | sed '$!d'
}

# Rules to configure and make the package.
compile_rules()
{
    ./configure \
        --prefix=/usr \
        --infodir=/usr/share/info \
        --mandir=/usr/share/man \
        $CONFIGURE_ARGS &&
    make && make DESTDIR=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/bin
    cp -a $install/usr/bin/zgrep $fs/usr/bin
    cp -a $install/usr/bin/gzip $fs/usr/bin
    cp -a $install/usr/bin/gunzip $fs/usr/bin
}

# Pre and post install commands for Tazpkg.
# We must remove all Busybox symlink before installing.
pre_install()
{
    echo -n "Removing Busybox gzip and gunzip utilities... "
    rm -f "$1/bin/gzip" "$1/bin/gunzip"
    status
}

post_remove()
{
    echo -n "Restoring Busybox gzip and gunzip utilities... "
    ln -s busybox "$1/bin/gzip"
    ln -s busybox "$1/bin/gunzip"
    status
}
6047 packages and 209931 files in current database (Wed Jun 26 15:35:30 2024)