wok view pkg-config/receipt @ rev 24453

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