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
|
|
|
|
pkgname=(debuginfod elfutils libelf)
|
2022-11-30 01:23:55 +01:00
|
|
|
pkgver=0.188
|
|
|
|
pkgrel=01
|
2022-03-20 13:19:37 +01:00
|
|
|
pkgdesc="Handle ELF object files and DWARF debugging information"
|
|
|
|
arch=(x86_64)
|
|
|
|
url="https://sourceware.org/elfutils/"
|
|
|
|
makedepends=(bzip2 curl gcc-libs libarchive libmicrohttpd sqlite xz zlib zstd)
|
|
|
|
#options=(debug staticlibs)
|
|
|
|
options=(staticlibs)
|
2022-04-26 20:13:23 +02:00
|
|
|
source=(https://sourceware.org/$pkgbase/ftp/$pkgver/$pkgbase-$pkgver.tar.bz2{,.sig})
|
|
|
|
|
2022-03-20 13:19:37 +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
|
|
|
|
}
|
|
|
|
|
|
|
|
prepare() {
|
2022-11-30 01:23:55 +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
|
|
|
|
|
2022-03-20 13:19:37 +01:00
|
|
|
(
|
2022-04-26 20:13:23 +02:00
|
|
|
cd $pkgbase-$pkgver
|
2022-03-20 13:19:37 +01:00
|
|
|
autoreconf -fiv
|
|
|
|
)
|
|
|
|
|
2022-04-26 20:13:23 +02:00
|
|
|
cp -av $pkgbase-$pkgver $pkgbase-test-$pkgver
|
2022-03-20 13:19:37 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2022-11-30 01:23:55 +01:00
|
|
|
local configure_options=(
|
|
|
|
--prefix=/usr
|
|
|
|
--sysconfdir=/etc
|
|
|
|
--program-prefix="eu-"
|
|
|
|
--enable-deterministic-archives
|
|
|
|
)
|
|
|
|
|
2022-03-20 13:19:37 +01:00
|
|
|
(
|
2022-11-30 01:23:55 +01:00
|
|
|
# fat-lto-objects is required for non-mangled .a files in libelf
|
|
|
|
CFLAGS+=" -ffat-lto-objects"
|
|
|
|
cd $pkgbase-$pkgver
|
|
|
|
./configure "${configure_options[@]}"
|
|
|
|
make
|
2022-03-20 13:19:37 +01:00
|
|
|
)
|
|
|
|
(
|
2022-11-30 01:23:55 +01:00
|
|
|
cd $pkgbase-test-$pkgver
|
|
|
|
# debugging information is required for test-suite
|
|
|
|
CFLAGS+=" -g"
|
|
|
|
# fat-lto-objects is required for non-mangled .a files in libelf
|
|
|
|
CFLAGS+=" -ffat-lto-objects"
|
|
|
|
./configure "${configure_options[@]}"
|
|
|
|
make
|
2022-03-20 13:19:37 +01:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2022-11-30 01:23:55 +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
|
|
|
#
|
|
|
|
#check() {
|
|
|
|
# make check -C $pkgbase-test-$pkgver
|
|
|
|
#}
|
2022-03-20 13:19:37 +01:00
|
|
|
|
|
|
|
package_debuginfod() {
|
|
|
|
pkgdesc+=" (debuginfod)"
|
2022-11-30 01:23:55 +01:00
|
|
|
depends=(
|
|
|
|
gcc-libs
|
|
|
|
glibc
|
|
|
|
libarchive libarchive.so
|
|
|
|
libelf=$pkgver
|
|
|
|
libmicrohttpd libmicrohttpd.so
|
|
|
|
sqlite libsqlite3.so
|
|
|
|
)
|
2022-04-26 20:13:23 +02:00
|
|
|
optdepends=("elfutils=$pkgver: for translations")
|
2022-03-20 13:19:37 +01:00
|
|
|
|
2022-04-26 20:13:23 +02:00
|
|
|
make DESTDIR="$pkgdir" install -C $pkgbase-$pkgver
|
|
|
|
install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t "$pkgdir/usr/share/doc/$pkgname/"
|
2022-03-20 13:19:37 +01:00
|
|
|
|
|
|
|
# set the default DEBUGINFOD_URLS environment variable to the distribution's debuginfod URL
|
|
|
|
printf "https://debuginfod.archlinux.org\n" > "$pkgdir/etc/debuginfod/archlinux.urls"
|
|
|
|
|
|
|
|
(
|
2022-04-26 20:13:23 +02:00
|
|
|
cd "$pkgdir"
|
2022-03-20 13:19:37 +01:00
|
|
|
|
2022-11-30 01:23:55 +01:00
|
|
|
_pick libelf etc/debuginfod/*
|
|
|
|
_pick libelf etc/profile.d/*
|
2022-03-20 13:19:37 +01:00
|
|
|
_pick libelf usr/{include,lib}
|
|
|
|
_pick elfutils usr/bin/eu-*
|
|
|
|
_pick elfutils usr/share/locale
|
|
|
|
_pick elfutils usr/share/man/man1/eu-*
|
|
|
|
_pick elfutils usr/share/man/man3/elf_*
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
package_elfutils() {
|
|
|
|
pkgdesc+=" (utilities)"
|
2022-04-26 20:13:23 +02:00
|
|
|
depends=(gcc-libs glibc libelf=$pkgver)
|
2022-03-20 13:19:37 +01:00
|
|
|
|
|
|
|
mv -v elfutils/* "$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
|
|
|
}
|
|
|
|
|
|
|
|
package_libelf() {
|
|
|
|
pkgdesc+=" (libraries)"
|
2022-11-30 01:23:55 +01:00
|
|
|
depends=(
|
|
|
|
bzip2 libbz2.so
|
|
|
|
curl libcurl.so
|
|
|
|
gcc-libs
|
|
|
|
glibc
|
|
|
|
xz
|
|
|
|
zlib
|
|
|
|
zstd libzstd.so
|
|
|
|
)
|
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
|
|
|
}
|
|
|
|
|
|
|
|
#---- license gpg-key sha256sums ----
|
|
|
|
|
|
|
|
license=(LGPL3 GPL3)
|
|
|
|
|
|
|
|
validpgpkeys=(47CC0331081B8BC6D0FD4DA08370665B57816A6A # Mark J. Wielaard <mark@klomp.org>
|
|
|
|
EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A) # Mark Wielaard <mjw@gnu.org>
|
|
|
|
|
2022-11-30 01:23:55 +01:00
|
|
|
sha256sums=(fb8b0e8d0802005b9a309c60c1d8de32dd2951b56f0c3a3cb56d21ce01595dff # elfutils-0.188.tar.bz2
|
|
|
|
f687c7adc1d3ec1e7315388bf8b018fdd8c461232488667edb40d3094192f11a ) # elfutils-0.188.tar.bz2.sig
|
2022-06-26 02:11:38 +02:00
|
|
|
|