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