SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "optipng"

# SliTaz package receipt.

PACKAGE="optipng"
VERSION="0.7.7"
CATEGORY="utilities"
TAGS="image compression"
SHORT_DESC="A command line tool to compress and optimize PNG images."
MAINTAINER="pankso@slitaz.org"
LICENSE="zlib/libpng"
WEB_SITE="https://optipng.sourceforge.net/"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"

DEPENDS="libpng+apng"
BUILD_DEPENDS="libpng+apng-dev zlib-dev"

# What is the latest version available today?
current_version()
{
    wget -O - https://sourceforge.net/projects/optipng/files/OptiPNG/ 2>/dev/null | \
    sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
    sed '/scope="row/!d;/tar/!d;s|.*/optipng-||;s|.tar.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
    sed -i 's|prefix)/man|prefix)/share/man|' configure

    ./configure        \
        -prefix=/usr    \
        -with-system-libpng &&
    make &&
    make test &&
    make install
}

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

    cp -a $src/LICENSE.txt    $fs/usr/share/licenses/$PACKAGE.txt
    cp -a $install/usr/bin    $fs/usr
}
6047 packages and 209931 files in current database (Wed Jun 26 15:35:30 2024)