wok view mingw32-w32api/receipt @ rev 24783
Up apache-ant (1.10.12)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Mar 20 12:11:06 2022 +0000 (2022-03-20) |
parents | ed8073aa8cf0 |
children | d3556b8f5c3d |
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 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=""
16 BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c"
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 # What is the latest version available today?
24 current_version()
25 {
26 wget -O - https://sourceforge.net/projects/mingw/files/MinGW/Base/w32api/ 2>/dev/null | \
27 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
28 sed '/scope="row/!d;s|.*/w32api-||;s|-src.*||;q'
29 }
31 # Rules to configure and make the package.
32 compile_rules()
33 {
34 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
35 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
36 return 1
37 fi
39 find $src -name 'Makefile*' | xargs sed -i "s|^inst_.*:= *|&$DESTDIR/|"
40 rm -f -r $src/binutils
41 mkdir -p $SOURCE-$VERSION-build $DESTDIR/usr/lib
42 cd $SOURCE-$VERSION-build
44 # NOTE: DESTDIR not handled correctly; have to fudge --prefix
45 $src/configure \
46 --prefix=/usr/$MINGW32_TARGET \
47 --host=$MINGW32_TARGET \
48 --build=$BUILD_HOST &&
49 make CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386}" LDFLAGS="-s" &&
50 make install
51 }
53 # Rules to gen a SliTaz package suitable for Tazpkg.
54 genpkg_rules()
55 {
56 mkdir -p $fs$MINGW32_ROOT
57 cp -a $install/usr/lib $fs$MINGW32_ROOT
58 chown -R root.root $fs
59 }
61 # Rules to setup after installation
62 post_install()
63 {
64 # Archives get stripped during packaging; need to run ranlib
65 chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
66 }
68 # Rules to clean the package
69 clean_wok()
70 {
71 rm -r $SOURCE-$VERSION-build
72 }