wok view binutils223/receipt @ rev 25587

Update some web_site / wget_url
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jun 06 11:04:30 2023 +0000 (18 months ago)
parents
children b81ceff0b056
line source
1 # SliTaz package receipt.
3 PACKAGE="binutils223"
4 SOURCE="binutils"
5 VERSION="2.23.1"
6 CATEGORY="development"
7 TAGS="assembler linker"
8 SHORT_DESC="GNU assembler, linker and binary utilities."
9 MAINTAINER="pankso@slitaz.org"
10 LICENSE="GPL2"
11 WEB_SITE="https://www.gnu.org/software/binutils/"
13 TARBALL="$SOURCE-$VERSION.tar.bz2"
14 #WGET_URL="https://www.kernel.org/pub/linux/devel/binutils/$TARBALL"
15 WGET_URL="http://ftp.gnu.org/gnu/$SOURCE/$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 --program-suffix=-2.23 \
49 --enable-shared \
50 --disable-initfini-array \
51 --with-bugurl="http://bugs.slitaz.org/" \
52 $CONFIGURE_ARGS \
53 $ARCH_ARGS &&
54 make tooldir=/usr &&
55 make install tooldir=/usr &&
56 # This is the default binutils, so create symlinks to the target platform
57 # binutil binaries. Delete duplicate binaries to save space.
58 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}")
59 do
60 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
61 if [ -e $path ]
62 then
63 rm -f $path
64 fi
65 ln -s $binutil $path
66 done
67 }
69 # Rules to gen a SliTaz package suitable for Tazpkg.
70 genpkg_rules()
71 {
72 cook_copy_folders bin
73 cook_copy_folders include
74 cook_copy_files *.a
75 cook_copy_files *.so*
77 # libiberty.h
78 cp -a $src/include/libiberty.h $fs/usr/include
80 # Remove 'strings' (Busybox).
81 #rm $fs/usr/lib/libiberty.a
82 rm $fs/usr/bin/strings*
83 rm $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 }