wok-undigest rev 1253

copied recipes for binutils and libbfd from cooking wok
author Hans-G?nter Theisgen
date Sat Aug 13 10:25:12 2022 +0100 (20 months ago)
parents bf284c26b8b3
children cce2687b06f1
files binutils/receipt libbfd/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/binutils/receipt	Sat Aug 13 10:25:12 2022 +0100
     1.3 @@ -0,0 +1,90 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="binutils"
     1.7 +VERSION="2.37"
     1.8 +CATEGORY="development"
     1.9 +TAGS="assembler linker"
    1.10 +SHORT_DESC="GNU assembler, linker and binary utilities."
    1.11 +MAINTAINER="pankso@slitaz.org"
    1.12 +LICENSE="GPL2"
    1.13 +WEB_SITE="https://www.gnu.org/software/binutils/"
    1.14 +
    1.15 +TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.16 +WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
    1.17 +#WGET_URL="https://www.kernel.org/pub/linux/devel/binutils/$TARBALL"
    1.18 +WGET_URL="http://ftp.gnu.org/gnu/$PACKAGE/$TARBALL"
    1.19 +
    1.20 +PROVIDE="libbfd"
    1.21 +DEPENDS="flex glibc zlib"
    1.22 +BUILD_DEPENDS="glibc-dev texinfo zlib-dev"
    1.23 +
    1.24 +HOST_ARCH="i486 arm"
    1.25 +
    1.26 +# Handle cross compilation.
    1.27 +case "$ARCH" in
    1.28 +	arm) BUILD_DEPENDS="" ;;
    1.29 +esac
    1.30 +
    1.31 +# @maintainer: Please update also: libbfd
    1.32 +
    1.33 +# What is the latest version available today?
    1.34 +current_version()
    1.35 +{
    1.36 +	wget -O - ${WGET_URL%/*} 2>/dev/null | \
    1.37 +	sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
    1.38 +}
    1.39 +
    1.40 +# Rules to configure and make the package.
    1.41 +compile_rules()
    1.42 +{
    1.43 +	case "$ARCH" in
    1.44 +		i?86) ARCH_ARGS="--disable-werror --enable-64-bit-bfd" ;;
    1.45 +	esac
    1.46 +
    1.47 +	mkdir	../binutils-build &&
    1.48 +	cd	../binutils-build &&
    1.49 +	$src/configure					\
    1.50 +		--program-prefix=$TOOLPREFIX		\
    1.51 +		--enable-shared				\
    1.52 +		--disable-initfini-array		\
    1.53 +		--with-bugurl="http://bugs.slitaz.org/"	\
    1.54 +		$CONFIGURE_ARGS				\
    1.55 +		$ARCH_ARGS &&
    1.56 +	make tooldir=/usr &&
    1.57 +	make install tooldir=/usr &&
    1.58 +	# This is the default binutils, so create symlinks to the target platform
    1.59 +	# binutil binaries. Delete duplicate binaries to save space.
    1.60 +	for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}")
    1.61 +	  do
    1.62 +		path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
    1.63 +		if [ -e $path ]
    1.64 +		  then
    1.65 +			rm -f $path
    1.66 +		fi
    1.67 +		ln -s $binutil $path
    1.68 +	  done
    1.69 +}
    1.70 +
    1.71 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.72 +genpkg_rules()
    1.73 +{
    1.74 +	cook_copy_folders	bin
    1.75 +	cook_copy_folders	include
    1.76 +	cook_copy_files		*.a
    1.77 +	cook_copy_files		*.so*
    1.78 +
    1.79 +	# libiberty.h
    1.80 +	cp -a $src/include/libiberty.h	$fs/usr/include
    1.81 +
    1.82 +	# Remove 'strings' (Busybox).
    1.83 +	#rm $fs/usr/lib/libiberty.a
    1.84 +	rm				$fs/usr/bin/strings
    1.85 +	rm				$fs/usr/bin/*-strings
    1.86 +
    1.87 +	# Remove build directory (cookutils and tazwok path).
    1.88 +	rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
    1.89 +	rm -rf $WOK/$PACKAGE/$PACKAGE-build
    1.90 +
    1.91 +	chown -R root:root		$fs/usr/include/libiberty.h
    1.92 +	chmod 644			$fs/usr/include/libiberty.h
    1.93 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/libbfd/receipt	Sat Aug 13 10:25:12 2022 +0100
     2.3 @@ -0,0 +1,19 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="libbfd"
     2.7 +VERSION="2.37"
     2.8 +CATEGORY="system-tools"
     2.9 +SHORT_DESC="Binary File Descriptor library."
    2.10 +MAINTAINER="erjo@slitaz.org"
    2.11 +LICENSE="GPL2"
    2.12 +WEB_SITE="http://www.gnu.org/software/binutils/"
    2.13 +
    2.14 +DEPENDS="zlib"
    2.15 +WANTED="binutils"
    2.16 +
    2.17 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.18 +genpkg_rules()
    2.19 +{
    2.20 +	mkdir -p $fs/usr/lib
    2.21 +	cp -a $install/usr/lib/libbfd*.so	$fs/usr/lib
    2.22 +}