wok diff gcc/receipt @ rev 10

Add SliTaz utils receipts : tazlito, tazpkg, tazwok
author Christophe Lincoln <pankso@slitaz.org>
date Fri Dec 14 21:17:54 2007 +0100 (2007-12-14)
parents
children 17a39e4461e4
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gcc/receipt	Fri Dec 14 21:17:54 2007 +0100
     1.3 @@ -0,0 +1,59 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="gcc"
     1.7 +VERSION="4.2.2"
     1.8 +CATEGORY="extra"
     1.9 +SHORT_DESC="The the GNU Compiler Collection."
    1.10 +MAINTAINER="pankso@slitaz.org"
    1.11 +BUILD_DEPENDS="gawk"
    1.12 +TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.13 +WEB_SITE="http://gcc.gnu.org/"
    1.14 +WGET_URL="ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/$PACKAGE-$VERSION/$TARBALL"
    1.15 +
    1.16 +# Rules to configure and make the package.
    1.17 +compile_rules()
    1.18 +{
    1.19 +    mkdir gcc-build 
    1.20 +    cd gcc-build
    1.21 +    ../$PACKAGE-$VERSION/configure --prefix=/usr --libexecdir=/usr/lib \
    1.22 +    --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
    1.23 +    --enable-languages=c,c++ --enable-shared --with-system-zlib \
    1.24 +    --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
    1.25 +    --enable-threads=posix --with-tune=i486 i486-pc-linux-gnu
    1.26 +    make bootstrap
    1.27 +    # Make install in the source tree to help creating derivated pkgs
    1.28 +    # and keep $_pkg variable set for genpkg.
    1.29 +    make DESTDIR=$src/_pkg install
    1.30 +}
    1.31 +
    1.32 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.33 +genpkg_rules()
    1.34 +{
    1.35 +	mkdir -p  $fs/usr/share
    1.36 +    cp -a $_pkg/usr/bin $fs/usr
    1.37 +    # Copy all libs. Remove libgcc_s.so and libstdc++.so
    1.38 +    # they goes in gcc-lib-base-$VERSION package.
    1.39 +    cp -a $_pkg/usr/lib $fs/usr
    1.40 +    rm $fs/usr/lib/libgcc_s.so*
    1.41 +    rm $fs/usr/lib/libstdc++.so*
    1.42 +    # Include files.
    1.43 +    cp -a $_pkg/usr/include $fs/usr
    1.44 +    # Strip.
    1.45 +    strip --strip-debug $fs/usr/bin/* 2>/dev/null
    1.46 +    strip --strip-debug $fs/usr/lib/*.so*
    1.47 +    strip --strip-debug $fs/usr/lib/gcc/*/$VERSION/cc*
    1.48 +}
    1.49 +
    1.50 +# Post install commands for Tazpkg.
    1.51 +post_install()
    1.52 +{
    1.53 +  local root
    1.54 +  root=$1
    1.55 +  echo "Processing post-install commands..."
    1.56 +  if [ ! -f "$root/lib/cpp" ]; then
    1.57 +  	ln -s ../usr/bin/cpp $root/lib
    1.58 +  fi
    1.59 +  if [ ! -f "$root/usr/bin/cc" ]; then
    1.60 +  	ln -s gcc $root/usr/bin/cc
    1.61 +  fi
    1.62 +}