wok view binutils/receipt @ rev 9011
pthon-kiwi: removed LOCALEDIR path.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Mar 03 12:47:10 2011 +0000 (2011-03-03) |
parents | 136bc077dd05 |
children | 4308dc535830 |
line source
1 # SliTaz package receipt.
3 PACKAGE="binutils"
4 VERSION="2.21"
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="glibc zlib"
10 BUILD_DEPENDS="glibc zlib"
11 WEB_SITE="http://www.gnu.org/software/binutils/"
12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
13 PROVIDE="libbfd"
14 TAGS="assembler linker"
16 # Rules to compile & install the temporary toolchain.
17 precook_tmp_toolchain()
18 {
19 mkdir -p binutils-build && cd binutils-build
20 { $src/configure \
21 --target=$BUILD_HOST --disable-nls \
22 --disable-werror &&
23 make
24 } || return 1
26 #If building on x86_64, create a symlink to ensure the sanity of the toolchain.
27 [ "$ARCH" = x86_64 ] && mkdir /tools/lib && ln -s lib /tools/lib64
29 make install
30 }
32 cook_tmp_toolchain()
33 {
34 mkdir -p binutils-build && cd binutils-build
35 { CC="$BUILD_HOST-gcc -B/tools/lib/" \
36 AR=$BUILD_HOST-ar RANLIB=$BUILD_HOST-ranlib \
37 $src/configure \
38 --disable-nls --with-lib-path=/tools/lib &&
39 make &&
40 make install &&
41 make -C ld clean &&
42 make -C ld LIB_PATH=/usr/lib:/lib
43 } || return 1
44 cp ld/ld-new /tools/bin
45 }
47 # Rules to configure and make the package.
48 compile_rules()
49 {
50 mkdir -p binutils-build && cd binutils-build
51 $src/configure \
52 --program-prefix=$TOOLPREFIX \
53 --enable-shared &&
54 make tooldir=/usr &&
55 # Install in binutils-build/ and then move the files to
56 # to the source tree. Can't install directly... This is done
57 # to keep the $src and $_pkg working for genpkg.
58 make tooldir=/usr install &&
59 # This is the default binutils, so create symlinks
60 # to the target platform binutil binaries.
61 # Delete duplicate binaries to save space.
62 for binutil in $(ls -1 $DESTDIR/usr/bin/ | grep "${TOOLPREFIX}") ; do
63 genericBinutilPath="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
64 if [ -e $genericBinutilPath ] ; then
65 rm -f $genericBinutilPath
66 fi
67 ln -s $binutil $genericBinutilPath
68 done
69 }
71 # Rules to gen a SliTaz package suitable for Tazpkg.
72 genpkg_rules()
73 {
74 mkdir -p $fs/usr
75 cp -a $_pkg/usr/bin $fs/usr
76 cp -a $_pkg/usr/lib $fs/usr
77 cp -a $_pkg/usr/include $fs/usr
79 # libiberty.h
80 cp -a $src/include/libiberty.h $fs/usr/include
82 # Remove 'strings' (Busybox).
83 #rm $fs/usr/lib/libiberty.a
84 rm $fs/usr/bin/strings $fs/usr/bin/*-strings
86 # Remove build directory.
87 rm -r $WOK/$PACKAGE/$PACKAGE-build
88 }