wok-current view binutils/receipt @ rev 15685

linux-lxc: add post_install() for update menu.lst
author Stanislas Leduc <shann@slitaz.org>
date Sat Dec 21 07:21:07 2013 +0100 (2013-12-21)
parents a5f6371c3254
children 7e8a95a52792
line source
1 # SliTaz package receipt.
3 PACKAGE="binutils"
4 VERSION="2.23.1"
5 CATEGORY="development"
6 SHORT_DESC="GNU assembler, linker and binary utilities."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.gnu.org/software/binutils/"
11 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
12 #WGET_URL="http://www.kernel.org/pub/linux/devel/binutils/$TARBALL"
13 PROVIDE="libbfd"
14 TAGS="assembler linker"
16 DEPENDS="glibc zlib"
17 BUILD_DEPENDS="glibc-dev zlib-dev"
19 # Rules to compile & install the temporary toolchain.
20 precook_tmp_toolchain()
21 {
22 mkdir -p binutils-build && cd binutils-build
23 { $src/configure \
24 --target=$HOST_SYSTEM --disable-nls \
25 --disable-werror &&
26 make
27 } || return 1
29 #If building on x86_64, create a symlink to ensure the sanity of the toolchain.
30 [ "$ARCH" = x86_64 ] && mkdir /tools/lib && ln -s lib /tools/lib64
32 make install
33 }
35 cook_tmp_toolchain()
36 {
37 mkdir -p binutils-build && cd binutils-build
38 { CC="$HOST_SYSTEM-gcc -B/tools/lib/" \
39 AR=$HOST_SYSTEM-ar RANLIB=$HOST_SYSTEM-ranlib \
40 $src/configure $CONFIGURE_ARGS \
41 --disable-nls --with-lib-path=/tools/lib &&
42 make &&
43 make install &&
44 make -C ld clean &&
45 make -C ld LIB_PATH=/usr/lib:/lib
46 } || return 1
47 cp ld/ld-new /tools/bin
48 }
50 # Rules to configure and make the package.
51 compile_rules()
52 {
53 cd $src
55 # Handle ARCH type
56 case $ARCH in
57 i?86)
58 EXTRA_ARGS="--disable-werror" ;;
59 esac
61 mkdir -p ../binutils-build && cd ../binutils-build
62 $src/configure \
63 --program-prefix=$TOOLPREFIX \
64 --enable-shared \
65 --disable-initfini-array \
66 --with-bugurl="http://bugs.slitaz.org/" \
67 $CONFIGURE_ARGS $EXTRA_ARGS &&
68 make tooldir=/usr &&
69 make tooldir=/usr install &&
70 # This is the default binutils, so create symlinks to the target platform
71 # binutil binaries. Delete duplicate binaries to save space.
72 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") ; do
73 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
74 if [ -e $path ] ; then
75 rm -f $path
76 fi
77 ln -s $binutil $path
78 done
79 }
81 # Rules to gen a SliTaz package suitable for Tazpkg.
82 genpkg_rules()
83 {
84 mkdir -p $fs/usr/lib
85 cp -a $install/usr/bin $fs/usr
86 cp -a $install/usr/lib/*.so* $fs/usr/lib
87 cp -a $install/usr/lib/*.a $fs/usr/lib
88 cp -a $install/usr/include $fs/usr
90 # libiberty.h
91 cp -a $src/include/libiberty.h $fs/usr/include
93 # Remove 'strings' (Busybox).
94 #rm $fs/usr/lib/libiberty.a
95 rm $fs/usr/bin/strings $fs/usr/bin/*-strings
97 # Remove build directory (cookutils and tazwok path).
98 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
99 rm -rf $WOK/$PACKAGE/$PACKAGE-build
101 chown -R root:root $fs/usr/include/libiberty.h
102 chmod 644 $fs/usr/include/libiberty.h
103 }