summaryrefslogtreecommitdiff
path: root/extra/dnsutils/PKGBUILD
blob: 9917297d07bac6261a98780841a31446d29ff3f5 (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
# $Id: PKGBUILD 151740 2012-03-01 22:01:16Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>
# Contributor: mario <mario_vazq@hotmail.com>

pkgname=dnsutils

# Use a period and not a hyphen before the patch level for proper versioning.
pkgver=9.9.0
_pkgver=9.9.0
pkgrel=1

pkgdesc='DNS utilities: dig host nslookup'
url='http://www.isc.org/software/bind/'
license=('custom:ISC')
arch=('i686' 'x86_64')
options=('!makeflags')
depends=('openssl' 'krb5' 'idnkit')
source=("http://ftp.isc.org/isc/bind9/${_pkgver}/bind-${_pkgver}.tar.gz"
        'remove-bind.patch'
        'trusted-key.key')
sha1sums=('6be77c75c8649088b0ae7124d819b5f412bb0094'
          'b465ef6160b004838f04de9978fe1be8422af777'
          'ca93da30c89de4365b846325d6ec4674a3e4fc02')

replaces=('bind-tools' 'host')

build() {
	cd "${srcdir}/bind-${_pkgver}"

	patch -p1 -i ../remove-bind.patch
	export STD_CDEFINES='-DDIG_SIGCHASE'

	# hack to remove unused bloat from the binaries
	CFLAGS+=' -fdata-sections -ffunction-sections'
	LDFLAGS+=' -Wl,--gc-sections'

	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-static \
		--disable-linux-caps \
		--with-openssl \
		--with-idn \

	make
}

package() {
	cd "${srcdir}/bind-${_pkgver}"
	install -Dm644 ../trusted-key.key "${pkgdir}"/etc/trusted-key.key
	install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	cd bin; make DESTDIR="${pkgdir}" install
}