1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 19:19:46 +01:00
build/pkg/tc-binutils/build
David Oberhollenzer 01256c6ab9 Bump pkg-utils version
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 15:26:29 +01:00

55 lines
1.6 KiB
Text
Executable file

VERSION="2.31.1"
SRCDIR="binutils-$VERSION"
TARBALL="binutils-$VERSION.tar.xz"
URL="http://ftp.gnu.org/gnu/binutils"
SHA256SUM="5d20086ecf5752cc7d9134246e9588fa201740d540f7eb84d795b1f7a93bca86"
DEPENDS="tc-pkgtool"
prepare() {
apply_patches
}
build() {
local extra="$BINUTILS_EXTRACFG"
$1/configure --prefix="$TCDIR" --target="$TARGET" --disable-nls \
--with-sysroot="$TCDIR/$TARGET" --disable-multilib \
--enable-shared --enable-plugins --enable-relro \
--with-pic --enable-deterministic-archives \
--with-lib-path="$TCDIR/$TARGET/lib" $extra
make configure-host
make -j $NUMJOBS
}
deploy() {
make install
cat > "$PKGDEPLOYDIR/$PKGNAME.files" <<_EOF
dir bin 0755 0 0
dir lib 0755 0 0
dir lib/ldscripts 0755 0 0
file bin/ar 0755 0 0 $TCDIR/$TARGET/bin/ar
file bin/as 0755 0 0 $TCDIR/$TARGET/bin/as
file bin/ld 0755 0 0 $TCDIR/$TARGET/bin/ld
file bin/ld.bfd 0755 0 0 $TCDIR/$TARGET/bin/ld.bfd
file bin/nm 0755 0 0 $TCDIR/$TARGET/bin/nm
file bin/objcopy 0755 0 0 $TCDIR/$TARGET/bin/objcopy
file bin/objdump 0755 0 0 $TCDIR/$TARGET/bin/objdump
file bin/ranlib 0755 0 0 $TCDIR/$TARGET/bin/ranlib
file bin/readelf 0755 0 0 $TCDIR/$TARGET/bin/readelf
file bin/strip 0755 0 0 $TCDIR/$TARGET/bin/strip
_EOF
find -H "$TCDIR/$TARGET/lib/ldscripts" -type f \
-printf "file lib/ldscripts/%f 0%m 0 0 %p\\n" \
>> "$PKGDEPLOYDIR/$PKGNAME.files"
touch "$PKGDEPLOYDIR/$PKGNAME.desc"
}
check_update() {
curl --silent -L "$URL" | grep -o ">binutils-[0-9.]*tar.xz<" | \
sed 's/>binutils-//g' | sed 's/.tar.xz<//g' | \
verson_find_greatest "$VERSION"
}