wok-undigest annotate mingw32-w32api/receipt @ rev 418

collectd-bind: fix compile_rules ?
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 31 14:55:34 2011 +0200 (2011-08-31)
parents
children 7fb1fcf86f13
rev   line source
pankso@251 1 # SliTaz package receipt.
pankso@251 2
pankso@251 3 PACKAGE="mingw32-w32api"
pankso@251 4 SOURCE="w32api"
pankso@251 5 VERSION="3.13-mingw32"
pankso@251 6 CATEGORY="development"
pankso@251 7 SHORT_DESC="MinGW32 w32api."
pankso@251 8 MAINTAINER="rcx@zoominternet.net"
pankso@251 9 DEPENDS=""
pankso@251 10 BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c"
pankso@251 11 TARBALL="$SOURCE-$VERSION-src.tar.gz"
pankso@251 12 WEB_SITE="http://www.mingw.org/"
pankso@251 13 WGET_URL="$SF_MIRROR/mingw/$TARBALL"
pankso@251 14 MINGW32_ID="i586-pc-mingw32"
pankso@251 15
pankso@251 16 # Configuration only needs included if we're in the build/wok environment
pankso@251 17 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
pankso@251 18 . $WOK/mingw32-toolchain/stuff/mingw32.conf
pankso@251 19 fi
pankso@251 20
pankso@251 21 # Rules to configure and make the package.
pankso@251 22 compile_rules()
pankso@251 23 {
pankso@251 24 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
pankso@251 25 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
pankso@251 26 return 1
pankso@251 27 fi
pankso@251 28
pankso@251 29 rm -f -r $src/binutils
pankso@251 30 mkdir -p $SOURCE-$VERSION-build
pankso@251 31 cd $SOURCE-$VERSION-build
pankso@251 32
pankso@251 33 # NOTE: DESTDIR not handled correctly; have to fudge --prefix
pankso@251 34 $src/configure \
pankso@251 35 --prefix=$src/_pkg/usr \
pankso@251 36 --host=$MINGW32_TARGET \
pankso@251 37 --build=$BUILD_HOST &&
pankso@251 38 make CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386}" LDFLAGS="-s" &&
pankso@251 39 make DESTDIR=$src/_pkg install
pankso@251 40 }
pankso@251 41
pankso@251 42 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@251 43 genpkg_rules()
pankso@251 44 {
pankso@251 45 mkdir -p $fs$MINGW32_ROOT
pankso@251 46 cp -a $_pkg/usr/lib $fs$MINGW32_ROOT
pankso@251 47 }
pankso@251 48
pankso@251 49 # Rules to setup after installation
pankso@251 50 post_install()
pankso@251 51 {
pankso@251 52 # Archives get stripped during packaging; need to run ranlib
pankso@251 53 local root
pankso@251 54 root=$1
pankso@251 55 find $root/usr/$MINGW32_ID/lib/ -name *.a -exec $MINGW32_ID-ranlib {} \;
pankso@251 56 }
pankso@251 57
pankso@251 58 # Rules to clean the package
pankso@251 59 clean_wok()
pankso@251 60 {
pankso@251 61 rm -r $SOURCE-$VERSION-build
pankso@251 62 }