wok annotate libpng/receipt @ rev 24973

Up zsh (5.8.1)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 01 15:03:44 2022 +0000 (2022-05-01)
parents 8e57efb79b16
children d3556b8f5c3d
rev   line source
pankso@23 1 # SliTaz package receipt.
pankso@23 2
pankso@23 3 PACKAGE="libpng"
psychomaniak@19438 4 VERSION="1.2.56"
pankso@23 5 CATEGORY="x-window"
pankso@23 6 SHORT_DESC="PNG images library."
pankso@23 7 MAINTAINER="pankso@slitaz.org"
pascal@15375 8 LICENSE="zlib/libpng"
psychomaniak@19439 9 TARBALL="$PACKAGE-$VERSION.tar.xz"
pankso@23 10 WEB_SITE="http://libpng.org/pub/png/libpng.html"
devl547@11336 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pankso@15945 12 HOST_ARCH="i486 arm"
pankso@11812 13
pascal@2476 14 DEPENDS="zlib"
slaxemulator@11816 15 BUILD_DEPENDS="pkg-config gawk zlib-dev"
pankso@23 16
pankso@15945 17 # Handle cross compilation.
pankso@15945 18 case "$ARCH" in
pankso@15945 19 arm) BUILD_DEPENDS="" ;;
pankso@15945 20 esac
pankso@15945 21
pascal@24071 22 current_version()
pascal@24071 23 {
pascal@24071 24 wget -O - https://sourceforge.net/projects/libpng/files/ 2>/dev/null | \
pascal@24071 25 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24071 26 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24071 27 sed "/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|;q"
pascal@24071 28 }
pascal@24071 29
pankso@23 30 # Rules to configure and make the package.
pankso@23 31 compile_rules()
pankso@23 32 {
devl547@11336 33 cd $src
devl547@11336 34 ./configure \
devl547@11336 35 --enable-shared \
devl547@11336 36 --prefix=/usr \
devl547@11336 37 --mandir=/usr/share/man \
devl547@11336 38 $CONFIGURE_ARGS &&
devl547@11336 39 make &&
devl547@11336 40 make DESTDIR=$DESTDIR install
devl547@11336 41
devl547@11336 42 cd contrib/pngminus
devl547@11336 43 make PNGLIB="-L$DESTDIR/usr/lib -lpng" -f makefile.std png2pnm pnm2png
devl547@11336 44 mkdir -p $DESTDIR/usr/bin
devl547@11336 45 cp -a png2pnm pnm2png $DESTDIR/usr/bin
pankso@23 46 }
pankso@23 47
pankso@23 48 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@23 49 genpkg_rules()
pankso@23 50 {
pankso@908 51 mkdir -p $fs/usr/lib
pankso@11812 52 cp -a $install/usr/lib/libpng*.so* $fs/usr/lib
pankso@11812 53 cp -a $install/usr/bin $fs/usr
pankso@23 54 }