# SliTaz package receipt. PACKAGE="mingw32-w32api" SOURCE="w32api" VERSION="3.13-mingw32" CATEGORY="development" SHORT_DESC="MinGW32 w32api." MAINTAINER="rcx@zoominternet.net" LICENSE="PublicDomain" TARBALL="$SOURCE-$VERSION-src.tar.gz" WEB_SITE="http://www.mingw.org/" WGET_URL="$SF_MIRROR/mingw/$TARBALL" MINGW32_ID="i586-pc-mingw32" DEPENDS="" BUILD_DEPENDS="slitaz-toolchain mingw32-binutils \ mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c" # Configuration only needs included if we're in the build/wok environment if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then . $WOK/mingw32-toolchain/stuff/mingw32.conf fi # What is the latest version available today? current_version() { wget -O - https://sourceforge.net/projects/mingw/files/MinGW/Base/w32api/ 2>/dev/null | \ sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \ sed '/scope="row/!d;s|.*/w32api-||;s|-src.*||;q' } # Rules to configure and make the package. compile_rules() { if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string" return 1 fi find $src -name 'Makefile*' | xargs sed -i "s|^inst_.*:= *|&$DESTDIR/|" rm -f -r $src/binutils mkdir -p $SOURCE-$VERSION-build $DESTDIR/usr/lib cd $SOURCE-$VERSION-build # NOTE: DESTDIR not handled correctly; have to fudge --prefix $src/configure \ --prefix=/usr/$MINGW32_TARGET \ --host=$MINGW32_TARGET \ --build=$BUILD_HOST && make CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386}" LDFLAGS="-s" && make install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs$MINGW32_ROOT cp -a $install/usr/lib $fs$MINGW32_ROOT chown -R root.root $fs } # Rules to setup after installation post_install() { # Archives get stripped during packaging; need to run ranlib chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \; } # Rules to clean the package clean_wok() { rm -r $SOURCE-$VERSION-build }