wok-6.x annotate binutils/receipt @ rev 3930

Update: binutils (toolprefixed binaries with default binutil symlinks; needed for builds expecting toolprefixed binutil binaries when a target platform [e.g. i486-pc-linux-gnu] is specified)
author Matthew Sheets <rcx@zoominternet.net>
date Wed Aug 19 16:02:07 2009 +0000 (2009-08-19)
parents 3daee9f84084
children ad8ecdc56d8e
rev   line source
pankso@9 1 # SliTaz package receipt.
pankso@9 2
pankso@9 3 PACKAGE="binutils"
pankso@2699 4 VERSION="2.19.1"
pankso@204 5 CATEGORY="development"
pankso@9 6 SHORT_DESC="GNU assembler, linker and binary utilities."
pankso@9 7 MAINTAINER="pankso@slitaz.org"
pankso@534 8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pascal@2845 9 DEPENDS="zlib"
pankso@9 10 WEB_SITE="http://www.gnu.org/software/binutils/"
pankso@2699 11 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pankso@9 12
pankso@9 13 # Rules to configure and make the package.
pankso@534 14 #
pankso@534 15 # First pass: --disable-werror \
pankso@534 16 #
pankso@9 17 compile_rules()
pankso@9 18 {
rcx@3930 19 # Determine if TOOLPREFIX has been defined in tazwok.conf
rcx@3930 20 if [ -z "$TOOLPREFIX" ] ; then
rcx@3930 21 # Provide a default value
rcx@3930 22 TOOLPREFIX=i486-pc-linux-gnu-
rcx@3930 23 fi
rcx@3930 24
pankso@9 25 mkdir binutils-build && cd binutils-build
pankso@534 26 ../$PACKAGE-$VERSION/configure \
rcx@3930 27 --program-prefix=$TOOLPREFIX \
pankso@534 28 --prefix=/usr \
pankso@534 29 --infodir=/usr/share/info \
pankso@534 30 --mandir=/usr/share/man \
pankso@534 31 --enable-shared \
pankso@2699 32 $CONFIGURE_ARGS &&
pankso@2699 33 make tooldir=/usr &&
pankso@9 34 # Install in binutils-build/ and then move the files to
pankso@9 35 # to the source tree. Can't install directly... This is done
pankso@9 36 # to keep the $src and $_pkg working for genpkg.
pankso@2699 37 make tooldir=/usr DESTDIR=$PWD/_pkg install &&
rcx@3930 38 mv _pkg ../$PACKAGE-$VERSION/ &&
rcx@3930 39 # This is the default binutils, so create symlinks
rcx@3930 40 # to the target platform binutil binaries.
rcx@3930 41 # Delete duplicate binaries to save space.
rcx@3930 42 for binutil in $(ls -1 $src/_pkg/usr/bin/ | grep "${TOOLPREFIX}") ; do
rcx@3930 43 genericBinutilPath="$src/_pkg/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
rcx@3930 44 if [ -e $genericBinutilPath ] ; then
rcx@3930 45 rm -f $genericBinutilPath
rcx@3930 46 fi
rcx@3930 47 ln -s $binutil $genericBinutilPath
rcx@3930 48 done
pankso@9 49 }
pankso@9 50
pankso@9 51 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@9 52 genpkg_rules()
pankso@9 53 {
pankso@534 54 mkdir -p $fs/usr
pankso@9 55 cp -a $_pkg/usr/bin $fs/usr
pankso@9 56 cp -a $_pkg/usr/lib $fs/usr
pankso@9 57 cp -a $_pkg/usr/include $fs/usr
pankso@534 58
pankso@9 59 # libiberty.h
pankso@9 60 cp -a $src/include/libiberty.h $fs/usr/include
pankso@534 61
pankso@3188 62 # Remove 'strings' (Busybox).
pankso@3188 63 #rm $fs/usr/lib/libiberty.a
rcx@3930 64 rm $fs/usr/bin/strings $fs/usr/bin/*-strings
pankso@9 65 }