wok-next annotate binutils/receipt @ rev 14792
Fix ownership and permissions for some files in some packages (again): adeskbar, arora, attr, binutils, bootchart, btanks.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Jul 08 17:09:45 2013 +0300 (2013-07-08) |
parents | a7b54d88ae54 |
children | 380ffe05937a |
rev | line source |
---|---|
pankso@9 | 1 # SliTaz package receipt. |
pankso@9 | 2 |
pankso@9 | 3 PACKAGE="binutils" |
devl547@13923 | 4 VERSION="2.23.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" |
pankso@9 | 9 WEB_SITE="http://www.gnu.org/software/binutils/" |
pankso@2699 | 10 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL" |
pankso@12543 | 11 #WGET_URL="http://www.kernel.org/pub/linux/devel/binutils/$TARBALL" |
erjo@4780 | 12 PROVIDE="libbfd" |
jozee@4932 | 13 TAGS="assembler linker" |
pankso@9 | 14 |
slaxemulator@10485 | 15 DEPENDS="glibc zlib" |
slaxemulator@10485 | 16 BUILD_DEPENDS="glibc-dev zlib-dev" |
slaxemulator@10485 | 17 |
gokhlayeh@8172 | 18 # Rules to compile & install the temporary toolchain. |
gokhlayeh@8172 | 19 precook_tmp_toolchain() |
gokhlayeh@8172 | 20 { |
gokhlayeh@8172 | 21 mkdir -p binutils-build && cd binutils-build |
gokhlayeh@8172 | 22 { $src/configure \ |
slaxemulator@10419 | 23 --target=$HOST_SYSTEM --disable-nls \ |
gokhlayeh@8172 | 24 --disable-werror && |
gokhlayeh@8172 | 25 make |
gokhlayeh@8172 | 26 } || return 1 |
gokhlayeh@8172 | 27 |
gokhlayeh@8172 | 28 #If building on x86_64, create a symlink to ensure the sanity of the toolchain. |
gokhlayeh@8172 | 29 [ "$ARCH" = x86_64 ] && mkdir /tools/lib && ln -s lib /tools/lib64 |
gokhlayeh@8172 | 30 |
gokhlayeh@8172 | 31 make install |
gokhlayeh@8172 | 32 } |
gokhlayeh@8172 | 33 |
gokhlayeh@8172 | 34 cook_tmp_toolchain() |
gokhlayeh@8172 | 35 { |
gokhlayeh@8172 | 36 mkdir -p binutils-build && cd binutils-build |
slaxemulator@10419 | 37 { CC="$HOST_SYSTEM-gcc -B/tools/lib/" \ |
slaxemulator@10419 | 38 AR=$HOST_SYSTEM-ar RANLIB=$HOST_SYSTEM-ranlib \ |
slaxemulator@10419 | 39 $src/configure $CONFIGURE_ARGS \ |
gokhlayeh@8172 | 40 --disable-nls --with-lib-path=/tools/lib && |
gokhlayeh@8172 | 41 make && |
gokhlayeh@8172 | 42 make install && |
gokhlayeh@8172 | 43 make -C ld clean && |
pankso@12543 | 44 make -C ld LIB_PATH=/usr/lib:/lib |
gokhlayeh@8172 | 45 } || return 1 |
gokhlayeh@8172 | 46 cp ld/ld-new /tools/bin |
gokhlayeh@8172 | 47 } |
gokhlayeh@8172 | 48 |
pankso@9 | 49 # Rules to configure and make the package. |
pankso@9 | 50 compile_rules() |
pankso@9 | 51 { |
slaxemulator@9745 | 52 cd $src |
pankso@12543 | 53 |
pankso@12299 | 54 # Handle ARCH type |
pankso@12299 | 55 case $ARCH in |
pankso@12299 | 56 i?86) |
pankso@12299 | 57 EXTRA_ARGS="--disable-werror" ;; |
pankso@12299 | 58 esac |
pankso@12543 | 59 |
pankso@9702 | 60 mkdir -p ../binutils-build && cd ../binutils-build |
gokhlayeh@8172 | 61 $src/configure \ |
rcx@3930 | 62 --program-prefix=$TOOLPREFIX \ |
pankso@10013 | 63 --enable-shared \ |
pankso@12299 | 64 --disable-initfini-array \ |
pankso@12543 | 65 --with-bugurl="http://bugs.slitaz.org/" \ |
pankso@12299 | 66 $CONFIGURE_ARGS $EXTRA_ARGS && |
gokhlayeh@8172 | 67 make tooldir=/usr && |
gokhlayeh@8172 | 68 make tooldir=/usr install && |
pankso@10029 | 69 # This is the default binutils, so create symlinks to the target platform |
pankso@10029 | 70 # binutil binaries. Delete duplicate binaries to save space. |
pankso@10029 | 71 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") ; do |
pankso@10029 | 72 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")" |
pankso@10029 | 73 if [ -e $path ] ; then |
pankso@10029 | 74 rm -f $path |
rcx@3930 | 75 fi |
pankso@10029 | 76 ln -s $binutil $path |
rcx@3930 | 77 done |
pankso@9 | 78 } |
pankso@9 | 79 |
pankso@9 | 80 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@9 | 81 genpkg_rules() |
pankso@9 | 82 { |
slaxemulator@9439 | 83 mkdir -p $fs/usr/lib |
pankso@12266 | 84 cp -a $install/usr/bin $fs/usr |
pankso@12266 | 85 cp -a $install/usr/lib/*.so* $fs/usr/lib |
pankso@12266 | 86 cp -a $install/usr/lib/*.a $fs/usr/lib |
pankso@12266 | 87 cp -a $install/usr/include $fs/usr |
pankso@12543 | 88 |
pankso@9 | 89 # libiberty.h |
pankso@9 | 90 cp -a $src/include/libiberty.h $fs/usr/include |
pankso@12543 | 91 |
pankso@3188 | 92 # Remove 'strings' (Busybox). |
pankso@3188 | 93 #rm $fs/usr/lib/libiberty.a |
rcx@3930 | 94 rm $fs/usr/bin/strings $fs/usr/bin/*-strings |
pankso@12543 | 95 |
pankso@9702 | 96 # Remove build directory (cookutils and tazwok path). |
pankso@9702 | 97 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build |
pankso@9702 | 98 rm -rf $WOK/$PACKAGE/$PACKAGE-build |
al@14789 | 99 |
al@14789 | 100 chown -R root:root $fs/usr/include/libiberty.h |
al@14792 | 101 chmod 644 $fs/usr/include/libiberty.h |
pankso@9 | 102 } |