aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libdwarf/APKBUILD
blob: 3cafef4612889c45c5a9f9f41494da47b0360c18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Contributor: David Huffman <storedbox@outlook.com>
# Maintainer: David Huffman <storedbox@outlook.com>
pkgname=libdwarf
pkgver=20170416
pkgrel=0
pkgdesc="Parsing library for DWARF2 and later debugging file format"
url="http://www.prevanders.net/dwarf.html"
arch="all"
license="LGPL2+"
makedepends="elfutils-dev"
subpackages="$pkgname-dev dwarf-tools dwarf-tools-doc"
source="http://www.prevanders.net/$pkgname-$pkgver.tar.gz"
options="!check"
builddir="$srcdir/dwarf-$pkgver"

build() {
	cd "$builddir"
	./configure --prefix=/usr --enable-shared || return 1
	make && make -C dwarfgen || return 1
}

package() {
	local bindir="$pkgdir/usr/bin"
	local docdir="$pkgdir/usr/share/doc/dwarf-tools"
	local incdir="$pkgdir/usr/include/libdwarf"
	local libdir="$pkgdir/usr/lib"
	local man1dir="$pkgdir/usr/share/man/man1"
	mkdir -p "$bindir" "$docdir" "$incdir" "$libdir" "$man1dir"

	cd "$builddir/libdwarf"
	cp dwarf.h libdwarf.h "$incdir"
	cp libdwarf.a libdwarf.so "$libdir"

	cd "$builddir/dwarfdump"
	cp dwarfdump "$bindir"
	cp COPYING "$docdir/dwarfdump.COPYING"
	cp DWARFDUMPCOPYRIGHT GPL.txt "$docdir"
	cp dwarfdump.conf "$libdir"
	cp dwarfdump.1 "$man1dir"

	cd "$builddir/dwarfgen"
	cp dwarfgen "$bindir"
	cp COPYING "$docdir/dwarfgen.COPYING"
	cp dwarfgen.1 "$man1dir"
}

tools() {
	license="GPL2 BSD"
	pkgdesc="Tools for interacting with DWARF2 and later debugging files"

	local bin="usr/bin"
	local lib="usr/lib"

	mkdir -p "$subpkgdir/$lib"
	mv "$pkgdir/$bin" "$subpkgdir/$bin"
	mv "$pkgdir/$lib/dwarfdump.conf" "$subpkgdir/$lib"
}

sha512sums="85be7ec806029200648514b965e23e163a54cbdc6f2feba0d4cc96180bab441f85d22640c7a96d6350b8f8749b7bcbe2f0f1af0865f9a427f2acce5135c4e630  libdwarf-20170416.tar.gz"