summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d0774f4a7c84c2f696f9dc50a9650490ea1f78c8 (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
# Maintainer: sulhan <ms@kilabit.info>
pkgname=rescached-git
pkgver=1.3.1.r0.gb6d05cb
pkgrel=1
pkgdesc="Resolver/DNS cache daemon"
arch=('i686' 'x86_64' 'armv7h')
url="https://github.com/shuLhan/rescached"
license=('custom:BSD')

depends=('gcc-libs')
provides=('rescached')
conflicts=('bind' 'nsd' 'pdnsd' 'powerdns' 'unbound')

makedepends=('gcc' 'make' 'fakeroot' 'git')
source=(
	"$pkgname::git+https://github.com/shuLhan/rescached.git"
	"libvos::git+https://github.com/shuLhan/libvos.git"
)
sha1sums=(
	'SKIP'
	'SKIP'
)

install=rescached-git.install
backup=('etc/rescached/rescached.cfg')

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

prepare() {
	cd "$pkgname"
	git submodule init
	git config submodule.libvos.url $srcdir/libvos
	git submodule update
	cd "src"
}

build() {
	cd "$pkgname/src"
	echo ">>"
	echo ">> cleaning ..."
	echo ">>"
	make distclean
	echo ">>"
	echo ">> make ..."
	echo ">>"
	unset CXXFLAGS
	make || return 1
}

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