aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libexecinfo/APKBUILD
blob: 4d63709da7c3c2cec680ded28a26c5b2b0407f28 (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
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=libexecinfo
pkgver=1.1
pkgrel=0
pkgdesc="A quick-n-dirty BSD licensed clone of the GNU libc backtrace facility."
url="http://www.freshports.org/devel/libexecinfo"
arch="all"
license="BSD"
depends=
makedepends=
install=
subpackages=
source="ftp://ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/itetcu/$pkgname-$pkgver.tar.bz2
	saveas-http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/devel/libexecinfo/files/patch-execinfo.c?rev=1.4;content-type=text%2Fplain/10-execinfo.patch
	20-define-gnu-source.patch
	30-linux-makefile.patch
	"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	patch -p0 -i "$srcdir"/10-execinfo.patch
	patch -p0 -i "$srcdir"/20-define-gnu-source.patch
	patch -p0 -i "$srcdir"/30-linux-makefile.patch
}

build() {
	cd "$_builddir"
	make || return 1
}

package() {
	cd "$_builddir"

	install -D -m755 "$_builddir"/execinfo.h \
		"$pkgdir"/usr/include/execinfo.h || return 1
	install -D -m755 "$_builddir"/stacktraverse.h \
		"$pkgdir"/usr/include/stacktraverse.h || return 1
	install -D -m755 "$_builddir"/libexecinfo.a \
		"$pkgdir"/usr/lib/libexecinfo.a || return 1
	install -D -m755 "$_builddir"/libexecinfo.so.1 \
		"$pkgdir"/usr/lib/libexecinfo.so.1 || return 1
	ln -s /usr/lib/libexecinfo.so.1 \
		"$pkgdir"/usr/lib/libexecinfo.so || return 1
}

md5sums="8e9e81c554c1c5d735bc877448e92b91  libexecinfo-1.1.tar.bz2
986c4a9f64ed8110c38375b0ce59f4bc  10-execinfo.patch
8536668cd1813aa689f12d36c470c0a5  20-define-gnu-source.patch
7dfdae632685a5331ca8317395132066  30-linux-makefile.patch"