wok-current annotate binutils/receipt @ rev 24353

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Feb 03 12:55:23 2022 +0000 (2022-02-03)
parents add1501c713f
children 722a7395fdec
rev   line source
pankso@9 1 # SliTaz package receipt.
pankso@9 2
pankso@9 3 PACKAGE="binutils"
Hans-G?nter@22538 4 VERSION="2.33.1"
pankso@204 5 CATEGORY="development"
Hans-G?nter@22538 6 TAGS="assembler linker"
pankso@9 7 SHORT_DESC="GNU assembler, linker and binary utilities."
pankso@9 8 MAINTAINER="pankso@slitaz.org"
pascal@15000 9 LICENSE="GPL2"
Hans-G?nter@22538 10 WEB_SITE="https://www.gnu.org/software/binutils/"
Hans-G?nter@22538 11
pankso@534 12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pankso@2699 13 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pascal@20421 14 #WGET_URL="https://www.kernel.org/pub/linux/devel/binutils/$TARBALL"
Hans-G?nter@22538 15 WGET_URL="http://ftp.gnu.org/gnu/$PACKAGE/$TARBALL"
Hans-G?nter@22538 16
erjo@4780 17 PROVIDE="libbfd"
Hans-G?nter@22538 18 DEPENDS="flex glibc zlib"
Hans-G?nter@22538 19 BUILD_DEPENDS="glibc-dev texinfo zlib-dev"
Hans-G?nter@22538 20
pankso@15979 21 HOST_ARCH="i486 arm"
pankso@9 22
pankso@15979 23 # Handle cross compilation.
pankso@15979 24 case "$ARCH" in
pankso@15979 25 arm) BUILD_DEPENDS="" ;;
pankso@15979 26 esac
gokhlayeh@8172 27
Hans-G?nter@23013 28 # @maintainer: Please update also: libbfd
Hans-G?nter@23013 29
pascal@24336 30 # What is the latest version available today?
pascal@24336 31 current_version()
pascal@24336 32 {
pascal@24336 33 wget -O - ${WGET_URL%/*} 2>/dev/null | \
pascal@24336 34 sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
pascal@24336 35 }
pascal@24336 36
pankso@9 37 # Rules to configure and make the package.
pankso@9 38 compile_rules()
pankso@9 39 {
pankso@15979 40 case "$ARCH" in
pascal@23852 41 i?86) ARCH_ARGS="--disable-werror --enable-64-bit-bfd" ;;
pankso@12299 42 esac
Hans-G?nter@22538 43
Hans-G?nter@22538 44 mkdir -p ../binutils-build &&
Hans-G?nter@22538 45 cd ../binutils-build
Hans-G?nter@22538 46 $src/configure \
Hans-G?nter@22538 47 --program-prefix=$TOOLPREFIX \
Hans-G?nter@22538 48 --disable-initfini-array \
Hans-G?nter@23013 49 --enable-shared \
Hans-G?nter@22538 50 --with-bugurl="http://bugs.slitaz.org/" \
Hans-G?nter@22538 51 $CONFIGURE_ARGS \
Hans-G?nter@22538 52 $ARCH_ARGS &&
gokhlayeh@8172 53 make tooldir=/usr &&
gokhlayeh@8172 54 make tooldir=/usr install &&
pankso@10029 55 # This is the default binutils, so create symlinks to the target platform
pankso@10029 56 # binutil binaries. Delete duplicate binaries to save space.
Hans-G?nter@22538 57 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}")
Hans-G?nter@22538 58 do
pankso@10029 59 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
Hans-G?nter@22538 60 if [ -e $path ]
Hans-G?nter@22538 61 then
pankso@10029 62 rm -f $path
rcx@3930 63 fi
pankso@10029 64 ln -s $binutil $path
Hans-G?nter@22538 65 done
pankso@9 66 }
pankso@9 67
pankso@9 68 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@9 69 genpkg_rules()
pankso@9 70 {
slaxemulator@9439 71 mkdir -p $fs/usr/lib
Hans-G?nter@22538 72
Hans-G?nter@22538 73 cp -a $install/usr/bin $fs/usr
Hans-G?nter@22538 74 cp -a $install/usr/lib/*.so* $fs/usr/lib
Hans-G?nter@22538 75 cp -a $install/usr/lib/*.a $fs/usr/lib
Hans-G?nter@22538 76 cp -a $install/usr/include $fs/usr
pankso@12543 77
pankso@9 78 # libiberty.h
Hans-G?nter@22538 79 cp -a $src/include/libiberty.h $fs/usr/include
pankso@12543 80
pankso@3188 81 # Remove 'strings' (Busybox).
pankso@3188 82 #rm $fs/usr/lib/libiberty.a
rcx@3930 83 rm $fs/usr/bin/strings $fs/usr/bin/*-strings
pankso@12543 84
pankso@9702 85 # Remove build directory (cookutils and tazwok path).
pankso@9702 86 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
pankso@9702 87 rm -rf $WOK/$PACKAGE/$PACKAGE-build
al@14789 88
al@14789 89 chown -R root:root $fs/usr/include/libiberty.h
al@14792 90 chmod 644 $fs/usr/include/libiberty.h
pankso@9 91 }