wok-next view mingw32-w32api/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | da5256dcf31a |
children | e19ff076dc63 |
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="devel@slitaz.org"
9 LICENSE="PublicDomain"
10 TARBALL="$SOURCE-$VERSION-src.tar.gz"
11 WEB_SITE="http://www.mingw.org/"
12 WGET_URL="$SF_MIRROR/mingw/$TARBALL"
13 MINGW32_ID="i586-pc-mingw32"
15 BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c"
17 # Configuration only needs included if we're in the build/wok environment
18 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ]; then
19 . $WOK/mingw32-toolchain/stuff/mingw32.conf
20 fi
22 compile_rules() {
23 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ]; then
24 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
25 return 1
26 fi
28 find $src -name 'Makefile*' | xargs sed -i "s|^inst_.*:= *|&$install/|"
29 rm -f -r $src/binutils
30 mkdir -p $SOURCE-$VERSION-build $install/usr/lib
31 cd $SOURCE-$VERSION-build
33 # NOTE: DESTDIR not handled correctly; have to fudge --prefix
34 $src/configure \
35 --prefix=/usr/$MINGW32_TARGET \
36 --host=$MINGW32_TARGET \
37 --build=$BUILD_HOST &&
38 make CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386}" LDFLAGS="-s" &&
39 make install
40 }
42 genpkg_rules() {
43 mkdir -p $fs$MINGW32_ROOT
44 cp -a $install/usr/lib $fs$MINGW32_ROOT
45 chown -R root.root $fs
46 }
48 post_install() {
49 MINGW32_ID="i586-pc-mingw32"
50 # Archives get stripped during packaging; need to run ranlib
51 chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
52 }