SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "grep"

# SliTaz package receipt.

PACKAGE="grep"
VERSION="3.7"
CATEGORY="development"
SHORT_DESC="GNU Global Regular Expression Print."
MAINTAINER="paul@slitaz.org"
LICENSE="GPL3"
WEB_SITE="https://www.gnu.org/software/grep/"

TARBALL="$PACKAGE-$VERSION.tar.xz"
WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"

SUGGESTED="grep-lang"
DEPENDS="pcre"
BUILD_DEPENDS="pcre-dev"

# What is the latest version available today?
current_version()
{
    wget -O - ${WGET_URL%/*} 2>/dev/null | \
    sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
    ./configure $CONFIGURE_ARGS &&
    make &&
    make install

    find $install/usr/share/man -type f -exec gzip -9 \{\} \;
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    cook_copy_folders    bin
}

# Pre and post install commands for Tazpkg.
post_install()
{
    for i in grep egrep fgrep
      do
        [ "$(readlink "$1/bin/$i")" = "busybox" ] &&
        ln -sf "../usr/bin/$i" "$1/bin/$i"
      done
}

pre_remove()
{
    for i in grep egrep fgrep
      do
        ln -sf busybox "$1/bin/$i"
      done
}
6047 packages and 205722 files in current database (Sun Jun 16 09:23:30 2024)