archrelease: copy trunk to extra-x86_64
[arch-packages.git] / elfutils / trunk / PKGBUILD
blob0a36ab72136b051cc1913b67e48df2a0fea8fb86
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.186
9 pkgrel=1
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'
15 'xz' 'zlib' 'zstd')
16 options=('staticlibs')
17 source=("https://sourceware.org/${pkgbase}/ftp/${pkgver}/${pkgbase}-${pkgver}.tar.bz2"{,.sig})
18 sha512sums=('c9180b27ec62935f18b9431268d176f6023d1bb938731d2af6e7626ae460af6608a70ba68483aa1ec7e6cb0fa0528b661ca8b68bc4f58ea8e18af527c5950c78'
19             'SKIP')
20 b2sums=('49573d0a1f3519eab81d1ba3e94354cbc0935a36a94a3fdb22fe223a47b78cca8fd6e322870b0e335a809529fa6f54180b13c67936dec0242123c54ba20c9fc9'
21         'SKIP')
22 validpgpkeys=(
23   '47CC0331081B8BC6D0FD4DA08370665B57816A6A'  # Mark J. Wielaard <mark@klomp.org>
24   'EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A'  # Mark Wielaard <mjw@gnu.org>
27 prepare() {
28   (
29   cd "$pkgbase-$pkgver"
30   autoreconf -fiv
31   )
33   cp -av "$pkgbase-$pkgver" "$pkgbase-test-$pkgver"
37 build() {
38   (
39   cd "$pkgbase-$pkgver"
40   ./configure --prefix=/usr \
41               --sysconfdir=/etc \
42               --program-prefix="eu-" \
43               --enable-deterministic-archives
44   make
45   )
46   (
47   cd "$pkgbase-test-$pkgver"
48   CFLAGS+=" -g"  # required for test-suite success
49   ./configure --prefix=/usr \
50               --sysconfdir=/etc \
51               --program-prefix="eu-" \
52               --enable-deterministic-archives
53   make
54   )
57 check() {
58   cd "$pkgbase-test-$pkgver"
59   make check
62 package_libelf() {
63   pkgdesc+=" (libraries)"
64   depends=('gcc-libs' 'libbz2.so' 'libcurl.so' 'xz' 'zlib' 'zstd')
65   # NOTE: the shared objects can not be added to provides as they are not versioned
67   cd "$pkgbase-$pkgver"
68   make DESTDIR="$pkgdir" install
69   # remove files provided by elfutils or debuginfod
70   rm -rvf "${pkgdir}"{/etc,/usr/{bin,share}}
71   install -vDm 644 {AUTHORS,ChangeLog,NEWS,NOTES,README} \
72     -t "${pkgdir}/usr/share/doc/${pkgname}"
75 package_elfutils() {
76   pkgdesc+=" (utilities)"
77   depends=('gcc-libs' 'glibc' "libelf=${pkgver}-${pkgrel}")
79   cd "$pkgbase-$pkgver"
80   make DESTDIR="$pkgdir" install
81   install -vDm 644 {AUTHORS,ChangeLog,NEWS,NOTES,README} \
82     -t "${pkgdir}/usr/share/doc/${pkgname}"
83   # remove files provided by libelf
84   rm -rvf "${pkgdir}/usr/"{include,lib}
85   # remove files provided by debuginfod
86   rm -rvf "${pkgdir}/usr/bin/debuginfod"* \
87     "${pkgdir}/usr/share/man/man1/debuginfod"* \
88     "${pkgdir}/usr/share/man/man3/debuginfod"* \
89     "${pkgdir}/usr/share/man/man7/" \
90     "${pkgdir}/usr/share/man/man8/" \
91     "${pkgdir}/etc"
94 package_debuginfod() {
95   pkgdesc+=" (debuginfod)"
96   depends=('gcc-libs' 'glibc' 'libarchive.so' "libelf=${pkgver}-${pkgrel}"
97   'libmicrohttpd.so' 'sqlite')
98   optdepends=("elfutils=${pkgver}-${pkgrel}: for translations" )
100   cd "$pkgbase-$pkgver"
101   make DESTDIR="$pkgdir" install
102   install -vDm 644 {AUTHORS,ChangeLog,NEWS,NOTES,README} \
103     -t "${pkgdir}/usr/share/doc/${pkgname}"
104   # remove files provided by libelf
105   rm -rvf "${pkgdir}/usr/"{include,lib}
106   # remove files provided by elfutils
107   rm -rvf "${pkgdir}/usr/bin/eu-"* \
108     "${pkgdir}/usr/share/man/man1/eu-"* \
109     "${pkgdir}/usr/share/man/man3/elf_"* \
110     "${pkgdir}/usr/share/locale"