wok view binutils/receipt @ rev 18663
Up tazpkg(880); change pre- post-functions, etc. in random packages
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Dec 04 02:45:17 2015 +0200 (2015-12-04) |
parents | 7e8a95a52792 |
children | 26752a482784 |
line source
1 # SliTaz package receipt.
3 PACKAGE="binutils"
4 VERSION="2.25"
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"
15 HOST_ARCH="i486 arm"
17 DEPENDS="glibc zlib"
18 BUILD_DEPENDS="glibc-dev zlib-dev texinfo"
20 # Handle cross compilation.
21 case "$ARCH" in
22 arm) BUILD_DEPENDS="" ;;
23 esac
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 case "$ARCH" in
29 i?86) ARCH_ARGS="--disable-werror" ;;
30 esac
31 mkdir -p ../binutils-build && cd ../binutils-build
32 $src/configure \
33 --program-prefix=$TOOLPREFIX \
34 --enable-shared \
35 --disable-initfini-array \
36 --with-bugurl="http://bugs.slitaz.org/" \
37 $CONFIGURE_ARGS $ARCH_ARGS &&
38 make tooldir=/usr &&
39 make tooldir=/usr install &&
40 # This is the default binutils, so create symlinks to the target platform
41 # binutil binaries. Delete duplicate binaries to save space.
42 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") ; do
43 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
44 if [ -e $path ] ; then
45 rm -f $path
46 fi
47 ln -s $binutil $path
48 done
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 mkdir -p $fs/usr/lib
55 cp -a $install/usr/bin $fs/usr
56 cp -a $install/usr/lib/*.so* $fs/usr/lib
57 cp -a $install/usr/lib/*.a $fs/usr/lib
58 cp -a $install/usr/include $fs/usr
60 # libiberty.h
61 cp -a $src/include/libiberty.h $fs/usr/include
63 # Remove 'strings' (Busybox).
64 #rm $fs/usr/lib/libiberty.a
65 rm $fs/usr/bin/strings $fs/usr/bin/*-strings
67 # Remove build directory (cookutils and tazwok path).
68 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
69 rm -rf $WOK/$PACKAGE/$PACKAGE-build
71 chown -R root:root $fs/usr/include/libiberty.h
72 chmod 644 $fs/usr/include/libiberty.h
73 }