2023-03-02 13:29:04 +00:00
|
|
|
# Maintainer: David Runge <dvzrv@archlinux.org>
|
|
|
|
# Contributor: Laurent Carlier <lordheavym@gmail.com>
|
|
|
|
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
|
|
|
|
# Contributor: Andrej Gelenberg <andrej.gelenberg@udo.edu>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - remove default debuginfod url pointing to upstream
|
|
|
|
|
|
|
|
pkgbase=elfutils
|
2023-11-09 00:34:34 +00:00
|
|
|
pkgname=(
|
|
|
|
elfutils
|
|
|
|
libelf
|
2024-03-03 22:16:23 +00:00
|
|
|
debuginfod
|
2023-11-09 00:34:34 +00:00
|
|
|
)
|
2024-10-22 18:10:14 +00:00
|
|
|
pkgver=0.192
|
|
|
|
pkgrel=1
|
2023-03-02 13:29:04 +00:00
|
|
|
pkgdesc="Handle ELF object files and DWARF debugging information"
|
|
|
|
arch=(x86_64)
|
|
|
|
url="https://sourceware.org/elfutils/"
|
2023-11-09 00:34:34 +00:00
|
|
|
makedepends=(
|
|
|
|
bzip2
|
|
|
|
curl
|
|
|
|
gcc-libs
|
2024-10-22 18:10:14 +00:00
|
|
|
json-c
|
2023-11-09 00:34:34 +00:00
|
|
|
libarchive
|
|
|
|
libmicrohttpd
|
|
|
|
sqlite
|
|
|
|
xz
|
|
|
|
zlib
|
|
|
|
zstd
|
|
|
|
)
|
2023-03-02 13:29:04 +00:00
|
|
|
options=(staticlibs)
|
2023-03-25 05:01:03 +00:00
|
|
|
source=(https://sourceware.org/$pkgbase/ftp/$pkgver/$pkgbase-$pkgver.tar.bz2{,.sig})
|
2024-10-22 18:10:14 +00:00
|
|
|
sha512sums=('543188f5f2cfe5bc7955a878416c5f252edff9926754e5de0c6c57b132f21d9285c9b29e41281e93baad11d4ae7efbbf93580c114579c182103565fe99bd3909'
|
2023-03-25 05:01:03 +00:00
|
|
|
'SKIP')
|
2024-10-22 18:10:14 +00:00
|
|
|
b2sums=('cf9036a1fca416e0d47c76471093609230545aee63e31e30991dc3c88417d7c621c930bb74809374da3bf142501cee91a2b861a5a89efcb5e1ac184df5defce1'
|
2023-03-25 05:01:03 +00:00
|
|
|
'SKIP')
|
2023-03-02 13:29:04 +00:00
|
|
|
validpgpkeys=(
|
|
|
|
'EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A' # Mark Wielaard <mjw@gnu.org>
|
2024-03-03 22:16:23 +00:00
|
|
|
'6C2B631563B8D330578D3CB474FD3FA2779E7073' # Aaron Merey <amerey@redhat.com>
|
2023-03-02 13:29:04 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
# remove failing test due to missing glibc debug package during test: https://bugs.archlinux.org/task/74875
|
|
|
|
sed -e 's/run-backtrace-native.sh//g' -i $pkgbase-$pkgver/tests/Makefile.am
|
|
|
|
|
2024-03-03 22:16:23 +00:00
|
|
|
cd $pkgbase-$pkgver
|
|
|
|
autoreconf -fiv
|
2023-03-02 13:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
local configure_options=(
|
|
|
|
--prefix=/usr
|
|
|
|
--sysconfdir=/etc
|
|
|
|
--program-prefix="eu-"
|
|
|
|
--enable-deterministic-archives
|
|
|
|
)
|
|
|
|
|
2024-03-03 22:16:23 +00:00
|
|
|
# fat-lto-objects is required for non-mangled .a files in libelf
|
|
|
|
CFLAGS+=" -ffat-lto-objects"
|
|
|
|
|
|
|
|
# debugging information is required for test-suite
|
|
|
|
CFLAGS+=" -g"
|
|
|
|
|
|
|
|
cd $pkgbase-$pkgver
|
|
|
|
./configure "${configure_options[@]}"
|
|
|
|
make
|
2023-03-02 13:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
2024-03-03 22:16:23 +00:00
|
|
|
make -C $pkgbase-$pkgver check
|
2023-03-02 13:29:04 +00:00
|
|
|
}
|
|
|
|
|
2024-03-03 22:16:23 +00:00
|
|
|
_pick() {
|
|
|
|
local p="$1" f d; shift
|
|
|
|
for f; do
|
|
|
|
d="$srcdir/$p/${f#$pkgdir/}"
|
|
|
|
mkdir -p "$(dirname "$d")"
|
|
|
|
mv "$f" "$d"
|
|
|
|
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
package_elfutils() {
|
|
|
|
pkgdesc+=" (utilities)"
|
2023-11-09 00:34:34 +00:00
|
|
|
license=(
|
|
|
|
GPL-3.0-or-later
|
|
|
|
)
|
2023-03-02 13:29:04 +00:00
|
|
|
depends=(
|
|
|
|
gcc-libs
|
|
|
|
glibc
|
|
|
|
libarchive libarchive.so
|
|
|
|
libelf=$pkgver
|
2024-03-03 22:16:23 +00:00
|
|
|
sh
|
2023-03-02 13:29:04 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
make DESTDIR="$pkgdir" install -C $pkgbase-$pkgver
|
|
|
|
|
|
|
|
(
|
|
|
|
cd "$pkgdir"
|
|
|
|
|
2024-03-03 22:16:23 +00:00
|
|
|
_pick libelf etc/debuginfod
|
2023-03-02 13:29:04 +00:00
|
|
|
_pick libelf etc/profile.d/*
|
|
|
|
_pick libelf usr/{include,lib}
|
2024-10-22 18:10:14 +00:00
|
|
|
_pick libelf usr/share/man/*/{,lib}elf*
|
2024-03-03 22:16:23 +00:00
|
|
|
_pick debuginfod usr/bin/debuginfod*
|
2024-10-22 18:10:14 +00:00
|
|
|
_pick debuginfod usr/share/fish/vendor_conf.d/debuginfod.fish
|
2024-03-03 22:16:23 +00:00
|
|
|
_pick debuginfod usr/share/man/*/debuginfod*
|
2023-03-02 13:29:04 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t "$pkgdir/usr/share/doc/$pkgname/"
|
|
|
|
}
|
|
|
|
|
|
|
|
package_libelf() {
|
|
|
|
pkgdesc+=" (libraries)"
|
2023-11-09 00:34:34 +00:00
|
|
|
license=(
|
|
|
|
'GPL-2.0-or-later OR LGPL-3.0-or-later'
|
|
|
|
)
|
2023-03-02 13:29:04 +00:00
|
|
|
depends=(
|
|
|
|
bzip2 libbz2.so
|
|
|
|
curl libcurl.so
|
|
|
|
glibc
|
2024-10-22 18:10:14 +00:00
|
|
|
json-c
|
2023-03-02 13:29:04 +00:00
|
|
|
xz liblzma.so
|
|
|
|
zlib
|
|
|
|
zstd libzstd.so
|
|
|
|
)
|
|
|
|
# NOTE: the shared objects can not be added to provides as they are not versioned
|
|
|
|
|
2024-10-22 18:10:14 +00:00
|
|
|
mv -v $pkgname/* "$pkgdir"
|
2023-03-02 13:29:04 +00:00
|
|
|
install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t "$pkgdir/usr/share/doc/$pkgname/"
|
|
|
|
}
|
2024-03-03 22:16:23 +00:00
|
|
|
|
|
|
|
package_debuginfod() {
|
|
|
|
pkgdesc+=" (debuginfod)"
|
|
|
|
license=(
|
|
|
|
GPL-3.0-or-later
|
|
|
|
)
|
|
|
|
depends=(
|
|
|
|
gcc-libs
|
|
|
|
glibc
|
2024-10-22 18:10:14 +00:00
|
|
|
json-c
|
2024-03-03 22:16:23 +00:00
|
|
|
libarchive libarchive.so
|
|
|
|
libelf=$pkgver
|
|
|
|
libmicrohttpd libmicrohttpd.so
|
|
|
|
sqlite libsqlite3.so
|
2024-10-22 18:10:14 +00:00
|
|
|
xz liblzma.so
|
2024-03-03 22:16:23 +00:00
|
|
|
)
|
|
|
|
optdepends=("elfutils=$pkgver: for translations")
|
|
|
|
|
2024-10-22 18:10:14 +00:00
|
|
|
mv -v $pkgname/* "$pkgdir"
|
2024-03-03 22:16:23 +00:00
|
|
|
install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t "$pkgdir/usr/share/doc/$pkgname/"
|
|
|
|
}
|
|
|
|
|
|
|
|
# vim:set sw=2 sts=-1 et:
|