# 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 }