wok view mingw32-runtime/receipt @ rev 24047

Up ipxe (1.21.1), rsync (3.2.3)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon May 10 19:33:04 2021 +0000 (2021-05-10)
parents ed8073aa8cf0
children afae00265386
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 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 DEPENDS="mingw32-w32api"
16 BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c mingw32-w32api"
18 # Configuration only needs included if we're in the build/wok environment
19 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
20 . $WOK/mingw32-toolchain/stuff/mingw32.conf
21 fi
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 sed -i 's|/doc/|/share&|' configure */configure Makefile.in
27 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
28 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
29 return 1
30 fi
32 find $src -name 'Makefile*' | xargs sed -i "s|^inst_.*:= *|&$DESTDIR/|"
33 mkdir -p $DESTDIR/usr/bin
34 rm -f -r $src/binutils
35 mkdir -p $SOURCE-$VERSION-build
36 cd $SOURCE-$VERSION-build
38 $src/configure \
39 --prefix=/usr/$MINGW32_TARGET \
40 --host=$MINGW32_TARGET \
41 --build=$BUILD_HOST &&
42 make CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386} -I$MINGW32_ROOT/include" LDFLAGS="-s" &&
43 make install
44 }
46 # Rules to gen a SliTaz package suitable for Tazpkg.
47 genpkg_rules()
48 {
49 mkdir -p $fs$MINGW32_ROOT
50 cp -a $install/usr/bin $fs$MINGW32_ROOT
51 cp -a $install/usr/lib $fs$MINGW32_ROOT
52 }
54 # Rules to setup after installation
55 post_install()
56 {
57 # Archives get stripped during packaging; need to run ranlib
58 chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
59 }
61 # Rules to clean the package
62 clean_wok()
63 {
64 rm -r $SOURCE-$VERSION-build
65 }