wok-6.x view binutils/receipt @ rev 24429
updated collectd (5.10.0 -> 5.12.0)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Feb 12 15:50:46 2022 +0100 (2022-02-12) |
parents | 71360a13cd94 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="binutils"
4 VERSION="2.37"
5 CATEGORY="development"
6 TAGS="assembler linker"
7 SHORT_DESC="GNU assembler, linker and binary utilities."
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="https://www.gnu.org/software/binutils/"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
14 #WGET_URL="https://www.kernel.org/pub/linux/devel/binutils/$TARBALL"
15 WGET_URL="http://ftp.gnu.org/gnu/$PACKAGE/$TARBALL"
17 PROVIDE="libbfd"
18 DEPENDS="flex glibc zlib"
19 BUILD_DEPENDS="glibc-dev texinfo zlib-dev"
21 HOST_ARCH="i486 arm"
23 # Handle cross compilation.
24 case "$ARCH" in
25 arm) BUILD_DEPENDS="" ;;
26 esac
28 # @maintainer: Please update also: libbfd
30 # What is the latest version available today?
31 current_version()
32 {
33 wget -O - ${WGET_URL%/*} 2>/dev/null | \
34 sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
35 }
37 # Rules to configure and make the package.
38 compile_rules()
39 {
40 case "$ARCH" in
41 i?86) ARCH_ARGS="--disable-werror --enable-64-bit-bfd" ;;
42 esac
44 mkdir ../binutils-build &&
45 cd ../binutils-build &&
46 $src/configure \
47 --program-prefix=$TOOLPREFIX \
48 --enable-shared \
49 --disable-initfini-array \
50 --with-bugurl="http://bugs.slitaz.org/" \
51 $CONFIGURE_ARGS \
52 $ARCH_ARGS &&
53 make tooldir=/usr &&
54 make install tooldir=/usr &&
55 # This is the default binutils, so create symlinks to the target platform
56 # binutil binaries. Delete duplicate binaries to save space.
57 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}")
58 do
59 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
60 if [ -e $path ]
61 then
62 rm -f $path
63 fi
64 ln -s $binutil $path
65 done
66 }
68 # Rules to gen a SliTaz package suitable for Tazpkg.
69 genpkg_rules()
70 {
71 cook_copy_folders bin
72 cook_copy_folders include
73 cook_copy_files *.a
74 cook_copy_files *.so*
76 # libiberty.h
77 cp -a $src/include/libiberty.h $fs/usr/include
79 # Remove 'strings' (Busybox).
80 #rm $fs/usr/lib/libiberty.a
81 rm $fs/usr/bin/strings
82 rm $fs/usr/bin/*-strings
84 # Remove build directory (cookutils and tazwok path).
85 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
86 rm -rf $WOK/$PACKAGE/$PACKAGE-build
88 chown -R root:root $fs/usr/include/libiberty.h
89 chmod 644 $fs/usr/include/libiberty.h
90 }