wok-current annotate pkg-config/receipt @ rev 24569
sokojs: add shrink.sh (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Feb 26 18:46:53 2022 +0000 (2022-02-26) |
parents | 8a3a69c4b4d6 |
children | 448c5bd8df33 |
rev | line source |
---|---|
pankso@28 | 1 # SliTaz package receipt. |
pankso@28 | 2 |
pankso@28 | 3 PACKAGE="pkg-config" |
pascal@22507 | 4 VERSION="0.29.2" |
pankso@200 | 5 CATEGORY="development" |
pankso@28 | 6 SHORT_DESC="Free desktop packages manager." |
pankso@28 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15000 | 8 LICENSE="GPL2" |
pankso@28 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@28 | 10 WEB_SITE="http://pkgconfig.freedesktop.org/wiki/" |
pankso@28 | 11 WGET_URL="http://pkgconfig.freedesktop.org/releases/$TARBALL" |
pankso@16465 | 12 HOST_ARCH="i486 arm" |
pankso@28 | 13 |
slaxemulator@10425 | 14 DEPENDS="glibc-base" |
pascal@15262 | 15 BUILD_DEPENDS="gcc libtool" |
slaxemulator@10425 | 16 |
pankso@15983 | 17 # Handle cross compilation. |
pankso@15983 | 18 case "$ARCH" in |
pankso@15983 | 19 arm) BUILD_DEPENDS="" ;; |
pankso@15983 | 20 esac |
pankso@15983 | 21 |
pascal@24453 | 22 # What is the latest version available today? |
pascal@24453 | 23 current_version() |
pascal@24453 | 24 { |
pascal@24453 | 25 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \ |
pascal@24453 | 26 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q |
pascal@24453 | 27 } |
pascal@24453 | 28 |
pankso@28 | 29 # Rules to configure and make the package. |
pankso@28 | 30 compile_rules() |
pankso@28 | 31 { |
pascal@22541 | 32 sed -i 's/\$(LN).*pkg-config\$(EXEEXT) \$(host_tool)/echo \1/' Makefile* |
pankso@15983 | 33 case "$ARCH" in |
pankso@15983 | 34 arm) |
pankso@15983 | 35 ./configure \ |
pankso@15983 | 36 --program-prefix=$TOOLPREFIX \ |
pankso@15983 | 37 --build=i486-slitaz-linux \ |
pankso@15983 | 38 --host=arm-slitaz-linux-gnueabi \ |
pankso@15983 | 39 --cache-file=arm-linux.cache ;; |
pankso@15983 | 40 *) |
pankso@15983 | 41 ./configure \ |
pankso@15983 | 42 --program-prefix=$TOOLPREFIX \ |
pankso@15983 | 43 --build=$HOST_SYSTEM \ |
pascal@22512 | 44 --host=$HOST_SYSTEM ;; |
pankso@15983 | 45 esac && |
pankso@10303 | 46 make && make install |
pankso@28 | 47 } |
pankso@28 | 48 |
pankso@28 | 49 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@28 | 50 genpkg_rules() |
pankso@28 | 51 { |
pankso@28 | 52 mkdir -p $fs/usr/share |
pascal@15000 | 53 cp -a $install/usr/bin $fs/usr |
pascal@15000 | 54 cp -a $install/usr/share/aclocal $fs/usr/share |
pankso@10303 | 55 # This is the default pkg-config so make a symling for package that dont |
pankso@10303 | 56 # cross compile or search for /usr/bin/pkg-config. |
pankso@10303 | 57 cd $fs/usr/bin && ln -s ${TOOLPREFIX}pkg-config pkg-config |
pankso@28 | 58 } |