summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6099c2b36ceb817ea54dfe6b314b278c15ee2997 (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
# Maintainer: Otreblan <oteblain@gmail.com>

pkgname=elfio-git
pkgver=Release_3.3.r39.gfd081b0
pkgrel=1
pkgdesc="ELFIO is a small, header-only C++ library that provides a simple interface for reading and generating files in ELF binary format"
arch=('any')
url="https://github.com/serge1/ELFIO"
license=('MIT')
depends=()
makedepends=('git')
checkdepends=('boost')
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
options=()
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/$pkgname"
	( set -o pipefail
	git describe --long 2>/dev/null | sed 's/^v-//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	)
}

build() {
	cd "$srcdir/$pkgname"

	autoreconf --install
	./configure --prefix=/usr
	make
}

check() {
	cd "$srcdir/$pkgname/ELFIOTest"

	autoreconf --install
	./configure
	make -k check
}

package() {
	cd "$srcdir/$pkgname"
	make DESTDIR="$pkgdir" install

	rm -rf "$pkgdir/usr/bin"
	install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}