OCaml 4.14.0 rebuild
[arch-packages.git] / elfutils / repos / core-x86_64 / PKGBUILD
blob1c0f93b57584500cdb57193563b6d3cdb77067d1
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Laurent Carlier <lordheavym@gmail.com>
3 # Contributor: Stéphane Gaudreault <stephane@archlinux.org>
4 # Contributor: Andrej Gelenberg <andrej.gelenberg@udo.edu>
6 pkgbase=elfutils
7 pkgname=(debuginfod elfutils libelf)
8 pkgver=0.187
9 pkgrel=2
10 pkgdesc="Handle ELF object files and DWARF debugging information"
11 arch=(x86_64)
12 url="https://sourceware.org/elfutils/"
13 license=(LGPL3 GPL3)
14 makedepends=(bzip2 curl gcc-libs libarchive libmicrohttpd sqlite xz zlib zstd)
15 options=(debug staticlibs)
16 source=(https://sourceware.org/$pkgbase/ftp/$pkgver/$pkgbase-$pkgver.tar.bz2{,.sig})
17 sha512sums=('a9b9e32b503b8b50a62d4e4001097ed2721d3475232a6380e6b9853bd1647aec016440c0ca7ceb950daf1144f8db9814ab43cf33cc0ebef7fc91e9e775c9e874'
18             'SKIP')
19 b2sums=('00ba3efa689d137808f5f53ecda93fd006be0c18d690ce76616ed1dba442281098579fa4b9a9e91b8ba865a3de15968f0ae06703a7b50b15c48a4beb5c970a46'
20         'SKIP')
21 validpgpkeys=(
22   '47CC0331081B8BC6D0FD4DA08370665B57816A6A'  # Mark J. Wielaard <mark@klomp.org>
23   'EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A'  # Mark Wielaard <mjw@gnu.org>
26 _pick() {
27   local p="$1" f d; shift
28   for f; do
29     d="$srcdir/$p/${f#$pkgdir/}"
30     mkdir -p "$(dirname "$d")"
31     mv "$f" "$d"
32     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
33   done
36 prepare() {
37   (
38   cd $pkgbase-$pkgver
39   autoreconf -fiv
40   )
42   cp -av $pkgbase-$pkgver $pkgbase-test-$pkgver
46 build() {
47   (
48   # fat-lto-objects is required for non-mangled .a files in libelf
49   CFLAGS+=" -ffat-lto-objects"
50   cd $pkgbase-$pkgver
51   ./configure --prefix=/usr \
52               --sysconfdir=/etc \
53               --program-prefix="eu-" \
54               --enable-deterministic-archives
55   make
56   )
57   (
58   cd $pkgbase-test-$pkgver
59   # debugging information is required for test-suite
60   CFLAGS+=" -g"
61   # fat-lto-objects is required for non-mangled .a files in libelf
62   CFLAGS+=" -ffat-lto-objects"
63   ./configure --prefix=/usr \
64               --sysconfdir=/etc \
65               --program-prefix="eu-" \
66               --enable-deterministic-archives
67   make
68   )
71 check() {
72   make check -C $pkgbase-test-$pkgver
75 package_debuginfod() {
76   pkgdesc+=" (debuginfod)"
77   depends=(gcc-libs glibc libarchive.so libelf=$pkgver libmicrohttpd.so sqlite)
78   optdepends=("elfutils=$pkgver: for translations")
80   make DESTDIR="$pkgdir" install -C $pkgbase-$pkgver
81   install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t "$pkgdir/usr/share/doc/$pkgname/"
83   # set the default DEBUGINFOD_URLS environment variable to the distribution's debuginfod URL
84   printf "https://debuginfod.archlinux.org\n" > "$pkgdir/etc/debuginfod/archlinux.urls"
86   (
87     cd "$pkgdir"
89     _pick libelf usr/{include,lib}
90     _pick elfutils usr/bin/eu-*
91     _pick elfutils usr/share/locale
92     _pick elfutils usr/share/man/man1/eu-*
93     _pick elfutils usr/share/man/man3/elf_*
94   )
98 package_elfutils() {
99   pkgdesc+=" (utilities)"
100   depends=(gcc-libs glibc libelf=$pkgver)
102   mv -v elfutils/* "$pkgdir"
103   install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t "$pkgdir/usr/share/doc/$pkgname/"
106 package_libelf() {
107   pkgdesc+=" (libraries)"
108   depends=(gcc-libs libbz2.so libcurl.so xz zlib zstd)
109   # NOTE: the shared objects can not be added to provides as they are not versioned
111   mv -v libelf/* "$pkgdir"
112   install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t "$pkgdir/usr/share/doc/$pkgname/"