wok-next view mingw32-w32api/receipt @ rev 15362

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