summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 179eeda43eaa48e01c0a4beaf29bb825360d131f (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
# Maintainer: Petr Spacek <pspacek@isc.org>
pkgname=dnscap-git
pkgver=v1.12.0.r19.46b5870
pkgrel=1
pkgdesc="Network capture utility designed specifically for DNS traffic"
arch=(x86_64)
url="https://www.dns-oarc.net/tools/dnscap"
license=('ISC')
depends=(ldns libpcap libyaml openssl zlib)
makedepends=(git perl-yaml)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/DNS-OARC/dnscap.git')
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

prepare() {
	cd "$srcdir/${pkgname%-git}"
	git submodule update --recursive --init
}

build() {
	cd "$srcdir/${pkgname%-git}"
	./autogen.sh
	./configure --prefix=/usr
	make
}

check() {
	cd "$srcdir/${pkgname%-git}"
	make -k check
}

package() {
	cd "$srcdir/${pkgname%-git}"
	make DESTDIR="$pkgdir/" install
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}