wok-next view mingw32-runtime/receipt @ rev 14253

readline: fix compile_rules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 25 16:15:46 2013 +0100 (2013-03-25)
parents
children bb009a6ef036
line source
1 # SliTaz package receipt.
3 PACKAGE="mingw32-runtime"
4 SOURCE="mingwrt"
5 VERSION="3.15.2-mingw32"
6 CATEGORY="development"
7 SHORT_DESC="MinGW32 runtime."
8 MAINTAINER="rcx@zoominternet.net"
9 DEPENDS="mingw32-w32api"
10 BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c mingw32-w32api"
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 mkdir -p $DESTDIR/usr/bin
31 rm -f -r $src/binutils
32 mkdir -p $SOURCE-$VERSION-build
33 cd $SOURCE-$VERSION-build
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} -I$MINGW32_ROOT/include" 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/bin $fs$MINGW32_ROOT
48 cp -a $_pkg/usr/lib $fs$MINGW32_ROOT
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 }