wok-next diff mingw32-runtime/receipt @ rev 13782

Up tazpkg (5.1)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jan 04 17:20:57 2013 +0100 (2013-01-04)
parents
children bb009a6ef036
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mingw32-runtime/receipt	Fri Jan 04 17:20:57 2013 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="mingw32-runtime"
     1.7 +SOURCE="mingwrt"
     1.8 +VERSION="3.15.2-mingw32"
     1.9 +CATEGORY="development"
    1.10 +SHORT_DESC="MinGW32 runtime."
    1.11 +MAINTAINER="rcx@zoominternet.net"
    1.12 +DEPENDS="mingw32-w32api"
    1.13 +BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c mingw32-w32api"
    1.14 +TARBALL="$SOURCE-$VERSION-src.tar.gz"
    1.15 +WEB_SITE="http://www.mingw.org/"
    1.16 +WGET_URL="$SF_MIRROR/mingw/$TARBALL"
    1.17 +MINGW32_ID="i586-pc-mingw32"
    1.18 +
    1.19 +# Configuration only needs included if we're in the build/wok environment
    1.20 +if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
    1.21 +	. $WOK/mingw32-toolchain/stuff/mingw32.conf
    1.22 +fi
    1.23 +
    1.24 +# Rules to configure and make the package.
    1.25 +compile_rules()
    1.26 +{
    1.27 +	if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
    1.28 +		echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
    1.29 +		return 1
    1.30 +	fi
    1.31 +
    1.32 +	find $src -name 'Makefile*' | xargs sed -i "s|^inst_.*:= *|&$DESTDIR/|"
    1.33 +	mkdir -p $DESTDIR/usr/bin
    1.34 +	rm -f -r $src/binutils
    1.35 +	mkdir -p $SOURCE-$VERSION-build
    1.36 +	cd $SOURCE-$VERSION-build
    1.37 +	
    1.38 +	$src/configure \
    1.39 +		--prefix=/usr/$MINGW32_TARGET \
    1.40 +		--host=$MINGW32_TARGET \
    1.41 +		--build=$BUILD_HOST &&
    1.42 +	make CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386} -I$MINGW32_ROOT/include" LDFLAGS="-s" &&
    1.43 +	make install
    1.44 +}
    1.45 +
    1.46 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.47 +genpkg_rules()
    1.48 +{
    1.49 +	mkdir -p $fs$MINGW32_ROOT
    1.50 +	cp -a $_pkg/usr/bin $fs$MINGW32_ROOT
    1.51 +	cp -a $_pkg/usr/lib $fs$MINGW32_ROOT
    1.52 +}
    1.53 +
    1.54 +# Rules to setup after installation
    1.55 +post_install()
    1.56 +{
    1.57 +	# Archives get stripped during packaging; need to run ranlib
    1.58 +	local root
    1.59 +	root=$1
    1.60 +	find $root/usr/$MINGW32_ID/lib/ -name *.a -exec $MINGW32_ID-ranlib {} \;
    1.61 +}
    1.62 +
    1.63 +# Rules to clean the package
    1.64 +clean_wok()
    1.65 +{
    1.66 +	rm -r $SOURCE-$VERSION-build
    1.67 +}