wok view binutils/receipt @ rev 24336
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jan 28 18:19:21 2022 +0000 (2022-01-28) |
parents | add1501c713f |
children | 722a7395fdec |
line source
1 # SliTaz package receipt.
3 PACKAGE="binutils"
4 VERSION="2.33.1"
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 -p ../binutils-build &&
45 cd ../binutils-build
46 $src/configure \
47 --program-prefix=$TOOLPREFIX \
48 --disable-initfini-array \
49 --enable-shared \
50 --with-bugurl="http://bugs.slitaz.org/" \
51 $CONFIGURE_ARGS \
52 $ARCH_ARGS &&
53 make tooldir=/usr &&
54 make tooldir=/usr install &&
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 mkdir -p $fs/usr/lib
73 cp -a $install/usr/bin $fs/usr
74 cp -a $install/usr/lib/*.so* $fs/usr/lib
75 cp -a $install/usr/lib/*.a $fs/usr/lib
76 cp -a $install/usr/include $fs/usr
78 # libiberty.h
79 cp -a $src/include/libiberty.h $fs/usr/include
81 # Remove 'strings' (Busybox).
82 #rm $fs/usr/lib/libiberty.a
83 rm $fs/usr/bin/strings $fs/usr/bin/*-strings
85 # Remove build directory (cookutils and tazwok path).
86 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
87 rm -rf $WOK/$PACKAGE/$PACKAGE-build
89 chown -R root:root $fs/usr/include/libiberty.h
90 chmod 644 $fs/usr/include/libiberty.h
91 }