wok-6.x annotate mingw32-runtime/receipt @ rev 14311

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