wok annotate gcc/receipt @ rev 52

Modified slitaz-base-files + slitaz-boot-scripts to avoid errosr msg
author Christophe Lincoln <pankso@slitaz.org>
date Thu Dec 20 22:17:41 2007 +0100 (2007-12-20)
parents
children 17a39e4461e4
rev   line source
pankso@9 1 # SliTaz package receipt.
pankso@9 2
pankso@9 3 PACKAGE="gcc"
pankso@9 4 VERSION="4.2.2"
pankso@9 5 CATEGORY="extra"
pankso@9 6 SHORT_DESC="The the GNU Compiler Collection."
pankso@9 7 MAINTAINER="pankso@slitaz.org"
pankso@9 8 BUILD_DEPENDS="gawk"
pankso@9 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pankso@9 10 WEB_SITE="http://gcc.gnu.org/"
pankso@9 11 WGET_URL="ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/$PACKAGE-$VERSION/$TARBALL"
pankso@9 12
pankso@9 13 # Rules to configure and make the package.
pankso@9 14 compile_rules()
pankso@9 15 {
pankso@9 16 mkdir gcc-build
pankso@9 17 cd gcc-build
pankso@9 18 ../$PACKAGE-$VERSION/configure --prefix=/usr --libexecdir=/usr/lib \
pankso@9 19 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
pankso@9 20 --enable-languages=c,c++ --enable-shared --with-system-zlib \
pankso@9 21 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
pankso@9 22 --enable-threads=posix --with-tune=i486 i486-pc-linux-gnu
pankso@9 23 make bootstrap
pankso@9 24 # Make install in the source tree to help creating derivated pkgs
pankso@9 25 # and keep $_pkg variable set for genpkg.
pankso@9 26 make DESTDIR=$src/_pkg install
pankso@9 27 }
pankso@9 28
pankso@9 29 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@9 30 genpkg_rules()
pankso@9 31 {
pankso@9 32 mkdir -p $fs/usr/share
pankso@9 33 cp -a $_pkg/usr/bin $fs/usr
pankso@9 34 # Copy all libs. Remove libgcc_s.so and libstdc++.so
pankso@9 35 # they goes in gcc-lib-base-$VERSION package.
pankso@9 36 cp -a $_pkg/usr/lib $fs/usr
pankso@9 37 rm $fs/usr/lib/libgcc_s.so*
pankso@9 38 rm $fs/usr/lib/libstdc++.so*
pankso@9 39 # Include files.
pankso@9 40 cp -a $_pkg/usr/include $fs/usr
pankso@9 41 # Strip.
pankso@9 42 strip --strip-debug $fs/usr/bin/* 2>/dev/null
pankso@9 43 strip --strip-debug $fs/usr/lib/*.so*
pankso@9 44 strip --strip-debug $fs/usr/lib/gcc/*/$VERSION/cc*
pankso@9 45 }
pankso@9 46
pankso@9 47 # Post install commands for Tazpkg.
pankso@9 48 post_install()
pankso@9 49 {
pankso@9 50 local root
pankso@9 51 root=$1
pankso@9 52 echo "Processing post-install commands..."
pankso@9 53 if [ ! -f "$root/lib/cpp" ]; then
pankso@9 54 ln -s ../usr/bin/cpp $root/lib
pankso@9 55 fi
pankso@9 56 if [ ! -f "$root/usr/bin/cc" ]; then
pankso@9 57 ln -s gcc $root/usr/bin/cc
pankso@9 58 fi
pankso@9 59 }