summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 112db402d93d2bbb2415c285704e7f65db40d1d0 (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
# Maintainer: Toke Høiland-Jørgensen <toke@toke.dk>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Hisato Tatekura <hisato_tatekura@excentrics.net>
# Contributor: Massimiliano Torromeo <massimiliano DOT torromeo AT google mail service>

pkgname=python-unbound
pkgver=1.13.0
pkgrel=1
pkgdesc='Validating, recursive, and caching DNS resolver: python binding'
url='https://unbound.net/'
license=('custom:BSD')
arch=('any')
options=('!libtool')
depends=('python' 'unbound' 'openssl')
makedepends=('expat' 'swig' 'openssl')
optdepends=('expat: unbound-anchor')
_basename='unbound'
validpgpkeys=('EDFAA3F2CA4E6EB05681AF8E9F6F1C2D7E045F8D')
source=("https://unbound.net/downloads/${_basename}-${pkgver}.tar.gz"{,.asc})
sha1sums=('f38a10b1f302cb41787c68d98e9b89f0e7dce613'
          'SKIP')

build() {
	cd "${srcdir}/${_basename}-${pkgver}"

	PYTHON=/usr/bin/python ./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--enable-static=no \
		--disable-rpath \
		--with-conf-file=/etc/unbound/unbound.conf \
		--with-pidfile=/var/run/unbound.pid \
                --with-pyunbound

	make
}

package() {
	cd "${srcdir}/${_basename}-${pkgver}"

	make DESTDIR="${pkgdir}" install

        rm -r "${pkgdir}/etc"
        rm -r "${pkgdir}/usr/sbin"
        rm -r "${pkgdir}/usr/include"
        rm -r "${pkgdir}/usr/share"
        rm "${pkgdir}/usr/lib/libunbound.la"
        rm "${pkgdir}/usr/lib/libunbound.so"
        rm "${pkgdir}/usr/lib/libunbound.so.8"
        rm "${pkgdir}/usr/lib/libunbound.so.8.1.11"
        rm "${pkgdir}/usr/lib/pkgconfig/libunbound.pc"
        rmdir "${pkgdir}/usr/lib/pkgconfig"

	install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}