jobcore/elfutils/PKGBUILD

142 lines
4.3 KiB
Text
Raw Normal View History

2022-03-20 13:19:37 +01:00
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
2022-04-26 20:13:23 +02:00
# Maintainer : Joe Bo Run <joborun@disroot.org>
2022-03-20 13:19:37 +01:00
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
2022-04-26 20:13:23 +02:00
# Website : https://pozol.eu
2022-03-20 13:19:37 +01:00
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=elfutils
2024-03-03 10:51:28 +01:00
pkgname=(elfutils libelf debuginfod)
pkgver=0.191
pkgrel=03
2022-03-20 13:19:37 +01:00
pkgdesc="Handle ELF object files and DWARF debugging information"
url="https://sourceware.org/elfutils/"
2023-11-06 23:28:13 +01:00
makedepends=(bzip2 curl gcc-libs libarchive libmicrohttpd sqlite xz zlib)
2022-03-20 13:19:37 +01:00
#options=(debug staticlibs)
options=(staticlibs)
2023-03-05 01:51:10 +01:00
source=(https://sourceware.org/$pkgbase/ftp/$pkgver/$pkgbase-$pkgver.tar.bz2{,.sig})
2022-03-20 13:19:37 +01:00
prepare() {
2023-03-05 01:51:10 +01:00
# cd $pkgbase-$pkgver
# # Use CURLOPT_PROTOCOLS_STR for libcurl >= 7.85.0
# # https://sourceware.org/git/?p=elfutils.git;a=commit;h=6560fb26a62ef135a804357ef4f15a47de3e49b3
# patch -Np1 < ../curl_7.85_compat.patch
# cd ..
2023-01-22 17:59:52 +01:00
# 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 10:51:28 +01:00
cd $pkgbase-$pkgver
autoreconf -fiv
2022-03-20 13:19:37 +01:00
}
build() {
local configure_options=(
--prefix=/usr
--sysconfdir=/etc
--program-prefix="eu-"
--enable-deterministic-archives
)
2024-03-03 10:51:28 +01: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
2022-03-20 13:19:37 +01:00
}
## a few tests fail on this 0188 build, they didn't on last 0186 but do try them on your
## machine and environment and report if your build didn't fail, otherwise we will try again on next build
2022-04-26 20:13:23 +02:00
#
2024-03-03 10:51:28 +01:00
check() {
make -C $pkgbase-$pkgver check
}
2022-03-20 13:19:37 +01:00
2024-03-03 10:51:28 +01: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-06 23:28:13 +01:00
license=(GPL-3.0-or-later)
2024-03-03 10:51:28 +01:00
depends=(gcc-libs glibc libarchive libelf=$pkgver sh)
2022-03-20 13:19:37 +01:00
2022-04-26 20:13:23 +02:00
make DESTDIR="$pkgdir" install -C $pkgbase-$pkgver
2022-03-20 13:19:37 +01:00
# set the default DEBUGINFOD_URLS environment variable to the distribution's debuginfod URL
2024-03-03 10:51:28 +01:00
echo "https://debuginfod.archlinux.org" > "$pkgdir/etc/debuginfod/archlinux.urls"
2022-03-20 13:19:37 +01:00
(
2022-04-26 20:13:23 +02:00
cd "$pkgdir"
2022-03-20 13:19:37 +01:00
2024-03-03 10:51:28 +01:00
_pick libelf etc/debuginfod
_pick libelf etc/profile.d/*
2022-03-20 13:19:37 +01:00
_pick libelf usr/{include,lib}
2024-03-03 10:51:28 +01:00
_pick debuginfod usr/bin/debuginfod*
_pick debuginfod usr/share/man/*/debuginfod*
2022-03-20 13:19:37 +01:00
)
2022-04-26 20:13:23 +02:00
install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t "$pkgdir/usr/share/doc/$pkgname/"
2022-03-20 13:19:37 +01:00
}
package_libelf() {
pkgdesc+=" (libraries)"
2023-11-06 23:28:13 +01:00
license=('GPL-2.0-or-later OR LGPL-3.0-or-later')
depends=(
bzip2 libbz2.so
curl libcurl.so
gcc-libs
glibc
xz
2024-03-03 10:51:28 +01:00
zlib)
2022-03-20 13:19:37 +01:00
# NOTE: the shared objects can not be added to provides as they are not versioned
mv -v libelf/* "$pkgdir"
2022-04-26 20:13:23 +02:00
install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t "$pkgdir/usr/share/doc/$pkgname/"
2022-03-20 13:19:37 +01:00
}
2024-03-03 10:51:28 +01:00
package_debuginfod() {
pkgdesc+=" (debuginfod)"
license=(GPL-3.0-or-later)
depends=(
gcc-libs
glibc
libarchive libarchive.so
libelf=$pkgver
libmicrohttpd libmicrohttpd.so
sqlite libsqlite3.so
)
optdepends=("elfutils=$pkgver: for translations")
mv -v debuginfod/* "$pkgdir"
install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t "$pkgdir/usr/share/doc/$pkgname/"
}
2023-03-05 01:51:10 +01:00
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
2022-03-20 13:19:37 +01:00
2023-11-06 23:28:13 +01:00
#license=(LGPL3 GPL3)
2022-03-20 13:19:37 +01:00
validpgpkeys=(47CC0331081B8BC6D0FD4DA08370665B57816A6A # Mark J. Wielaard <mark@klomp.org>
2024-03-03 10:51:28 +01:00
EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A # Mark Wielaard <mjw@gnu.org>
6C2B631563B8D330578D3CB474FD3FA2779E7073) # Aaron Merey <amerey@redhat.com>
2023-11-06 23:28:13 +01:00
2024-03-03 10:51:28 +01:00
sha256sums=(df76db71366d1d708365fc7a6c60ca48398f14367eb2b8954efc8897147ad871 # elfutils-0.191.tar.bz2
d07b86df17cbe5187b311cd6e02fc47228cdd20545779cde5cd2a26ca03b7cb1) # elfutils-0.191.tar.bz2.sig
2023-03-05 01:51:10 +01:00
## 768eaa1bd16e4db0d84812f1ffc2a8dd7a6f558f15da2f2ab325556e24574260 debuginfod-0.191-03-x86_64.pkg.tar.lz
## 73fe2b0dbe11213d9be2d078df6aa4ee3faf2e3120e683cb5480484bc33c541f elfutils-0.191-03-x86_64.pkg.tar.lz
## b112d063c644018ff434a823d16368682679865c6601fdfd4a05f435633833f9 libelf-0.191-03-x86_64.pkg.tar.lz