wok-next view mingw32-gcc-c/receipt @ rev 18730

Quote root dir in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 20 15:13:45 2015 +0100 (2015-12-20)
parents ce30dcb0675a
children ed8073aa8cf0
line source
1 # SliTaz package receipt.
3 PACKAGE="mingw32-gcc-c"
4 SOURCE="gcc-core"
5 VERSION="3.4.5-20060117-2"
6 CATEGORY="development"
7 SHORT_DESC="MinGW32 gcc, for the C language only."
8 MAINTAINER="rcx@zoominternet.net"
9 LICENSE="GPL2"
10 TARBALL="$SOURCE-$VERSION-src.tar.gz"
11 WEB_SITE="http://www.mingw.org/"
12 MINGW32_URL="$SF_MIRROR/mingw"
13 WGET_URL="$MINGW32_URL/$TARBALL"
14 MINGW32_ID="i586-pc-mingw32"
15 TAGS="compiler C"
17 DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers mingw32-runtime-headers"
18 BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers"
20 # Configuration only needs included if we're in the build/wok environment
21 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
22 . $WOK/mingw32-toolchain/stuff/mingw32.conf
23 fi
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 mkdir -p $DESTDIR/usr/share/man/man1 $DESTDIR/usr/share/man/man7
29 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
30 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
31 return 1
32 fi
34 rm -f -r $src/binutils
35 mkdir -p $SOURCE-$VERSION-build
36 cd $SOURCE-$VERSION-build
37 $src/configure \
38 --prefix=/usr \
39 --libexecdir=/usr/lib \
40 --infodir=/usr/share/info \
41 --mandir=/usr/share/man \
42 --with-sysroot=$MINGW32_ROOT \
43 --disable-shared \
44 --disable-debug \
45 --target=$MINGW32_TARGET \
46 --enable-languages=c \
47 --enable-threads=win32 \
48 --disable-win32-registry \
49 --enable-sjlj-exceptions \
50 $CONFIGURE_ARGS &&
51 make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
52 make DESTDIR=$DESTDIR install 2>&1 | grep -v fixinc/fixincl
53 }
55 # Rules to gen a SliTaz package suitable for Tazpkg.
56 genpkg_rules()
57 {
58 mkdir -p $fs/usr
59 cp -a $install/usr/bin $fs/usr
60 # do not need to copy lib/libiberty.a
61 mkdir -p $fs/usr/lib
62 cp -a $install/usr/lib/gcc $fs/usr/lib
63 }
65 # Rules to setup after installation
66 post_install()
67 {
68 # Archives get stripped during packaging; need to run ranlib
69 find "$1/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \;
70 }
72 # Rules to clean the package
73 clean_wok()
74 {
75 rm -r $SOURCE-$VERSION-build
76 }