wok annotate mingw32-runtime/receipt @ rev 3561

Add: mingw32
author Matthew Sheets <rcx@zoominternet.net>
date Wed Jun 24 10:32:56 2009 +0000 (2009-06-24)
parents
children 05b5a901936b
rev   line source
rcx@3561 1 # SliTaz package receipt.
rcx@3561 2
rcx@3561 3 PACKAGE="mingw32-runtime"
rcx@3561 4 SOURCE="mingwrt"
rcx@3561 5 VERSION="3.15.2-mingw32"
rcx@3561 6 CATEGORY="development"
rcx@3561 7 SHORT_DESC="MinGW32 runtime."
rcx@3561 8 MAINTAINER="rcx@zoominternet.net"
rcx@3561 9 DEPENDS="mingw32-w32api"
rcx@3561 10 BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c mingw32-w32api"
rcx@3561 11 TARBALL="$SOURCE-$VERSION-src.tar.gz"
rcx@3561 12 WEB_SITE="http://www.mingw.org/"
rcx@3561 13 WGET_URL="$SF_MIRROR/mingw/$TARBALL"
rcx@3561 14 MINGW32_TARGET="i586-pc-mingw32"
rcx@3561 15
rcx@3561 16 # Rules to configure and make the package.
rcx@3561 17 compile_rules()
rcx@3561 18 {
rcx@3561 19 # Set a default value for BUILD_HOST if it is not defined in tazwok.conf as it should be
rcx@3561 20 if [ -z "$BUILD_HOST" ] ; then
rcx@3561 21 BUILD_HOST=i486-pc-linux-gnu
rcx@3561 22 fi
rcx@3561 23
rcx@3561 24 rm -f -r $src/binutils
rcx@3561 25 mkdir -p $SOURCE-$VERSION-build
rcx@3561 26 cd $SOURCE-$VERSION-build
rcx@3561 27
rcx@3561 28 # NOTE: DESTDIR not handled correctly; have to fudge --prefix
rcx@3561 29 $src/configure \
rcx@3561 30 --prefix=$src/_pkg/usr \
rcx@3561 31 --host=$MINGW32_TARGET \
rcx@3561 32 --build=$BUILD_HOST &&
rcx@3561 33 make CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386} -I/usr/$MINGW32_TARGET/include" LDFLAGS="-s" &&
rcx@3561 34 make DESTDIR=$src/_pkg install
rcx@3561 35 }
rcx@3561 36
rcx@3561 37 # Rules to gen a SliTaz package suitable for Tazpkg.
rcx@3561 38 genpkg_rules()
rcx@3561 39 {
rcx@3561 40 mkdir -p $fs/usr/$MINGW32_TARGET
rcx@3561 41 cp -a $_pkg/usr/bin $fs/usr/$MINGW32_TARGET
rcx@3561 42 cp -a $_pkg/usr/include $fs/usr/$MINGW32_TARGET
rcx@3561 43 cp -a $_pkg/usr/lib $fs/usr/$MINGW32_TARGET
rcx@3561 44 }
rcx@3561 45
rcx@3561 46 # Rules to setup after installation
rcx@3561 47 post_install()
rcx@3561 48 {
rcx@3561 49 # Archives get stripped during packaging; need to run ranlib
rcx@3561 50 local root
rcx@3561 51 root=$1
rcx@3561 52 find $root/usr/$MINGW32_TARGET/lib/ -name *.a -exec $MINGW32_TARGET-ranlib {} \;
rcx@3561 53 }
rcx@3561 54
rcx@3561 55 # Rules to clean the package
rcx@3561 56 clean_wok()
rcx@3561 57 {
rcx@3561 58 rm -r $SOURCE-$VERSION-build
rcx@3561 59 }