initial import
This commit is contained in:
113
bind/PKGBUILD
Normal file
113
bind/PKGBUILD
Normal file
@@ -0,0 +1,113 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgbase=bind
|
||||
pkgname=(bind bind-tools)
|
||||
_pkgver=9.16.48
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=1
|
||||
url='https://www.isc.org/software/bind/'
|
||||
license=('ISC')
|
||||
arch=('i686' 'x86_64')
|
||||
options=('!emptydirs')
|
||||
makedepends=('libcap' 'libxml2' 'zlib' 'krb5' 'e2fsprogs' 'libressl' 'readline'
|
||||
'libidn2' 'libnsl' 'lmdb' 'geoip' 'dnssec-anchors' 'python' 'libuv'
|
||||
'json-c' 'python-ply')
|
||||
source=("https://ftp.isc.org/isc/bind9/${_pkgver}/bind-${_pkgver}.tar.xz"
|
||||
"named.conf"
|
||||
"localhost.zone"
|
||||
"localhost.ip6.zone"
|
||||
"127.0.0.zone"
|
||||
"empty.zone"
|
||||
"named.initd"
|
||||
"named.run")
|
||||
sha512sums=('83829a5045e2a29dd2b491d3ab72b545f5664023fcd4aa205a44dbb7bcc5c737b4466c0d73f124b8d88fd33c56776871a07dde1ba0530d43eec8e7304a08d353'
|
||||
'693c4aa40efc603f190be5b6cbf16ebb9512928073bab6a27825cae21f92506ba5299661bf0702538ee57abefbc66cf41b2f45029c906f54bc35ba930e1bf54d'
|
||||
'83eb5576a6f0fa1d469ef205e64a56ad296fdf91855b3c89391ae2edfb15bfae1c2fd05f60403cd6f53dd9daddd08ad36d8b2e83af86d6f2dc8efe6d3743828a'
|
||||
'6c02c9d9d81183bae826feba69d5bde9549aa4fb825cc804519b429d302e5cdd0c56e527e7bbb09c8a068eb8831468520cff2fec66c946b4c8e9f8e9a0fe9af7'
|
||||
'8a8824bea352e91329c9621fe60d5475f2a95cda522f72860f22929a73224d912cf51cd179307489bac6178ffad469b4ad7a3737fec2d44bd54ebfea9c479c11'
|
||||
'bb609274e5bdedc9c680acb46c9f16a40cfaf9921fd613d71964047b7232c82aba116d3974010f4ef4b435086dc9f26a65789d65c8e7fd74b2375dfa05188370'
|
||||
'846322856c5e283664d34efeb76a35cb16c88d268bbb988e2eab12ee93ee52a9d32ffd8a2931cbb1b4cd49e6e041fb168299ca358cb460812243239784670dfd'
|
||||
'599fb107b0dba83fe2c5470af3258ed8f9ee80abc0bfdda1e903c72932ac1077034d7e7e48ecb36bd85a5129168f3e76b87ff6f83b77c2e5960167ee60dbb4d5')
|
||||
|
||||
prepare() {
|
||||
# no more using source array, lack of versioning.
|
||||
curl -o root.hint https://www.internic.net/zones/named.root
|
||||
[[ -s root.hint ]]
|
||||
}
|
||||
|
||||
build() {
|
||||
cd bind-$_pkgver
|
||||
# support to chase DNSSEC signature chains
|
||||
CFLAGS+=' -DDIG_SIGCHASE'
|
||||
CFLAGS+=' -fcommon'
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--disable-static \
|
||||
--enable-fixed-rrset \
|
||||
--enable-full-report \
|
||||
--enable-dnsrps \
|
||||
--enable-geoip \
|
||||
--with-python=/usr/bin/python \
|
||||
--with-openssl \
|
||||
--with-libidn2 \
|
||||
--with-json-c \
|
||||
--with-libxml2 \
|
||||
--with-lmdb \
|
||||
--with-libtool
|
||||
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
||||
make
|
||||
}
|
||||
|
||||
package_bind() {
|
||||
pkgdesc='The ISC DNS Server'
|
||||
provides=('dns-server')
|
||||
depends=('glibc' 'libxml2' 'libcap' 'libnsl' 'libidn2' 'lmdb' 'libuv'
|
||||
'libressl' 'geoip' 'json-c' 'bind-tools')
|
||||
optdepends=('logger: message logging support')
|
||||
backup=('etc/named.conf'
|
||||
'var/named/127.0.0.zone'
|
||||
'var/named/localhost.zone'
|
||||
'var/named/localhost.ip6.zone'
|
||||
'var/named/empty.zone')
|
||||
install=bind.install
|
||||
|
||||
cd "bind-$_pkgver"
|
||||
install -Dm644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/COPYRIGHT"
|
||||
for _d in bin/{check,confgen,named,rndc}; do
|
||||
(cd "$_d" && make DESTDIR="$pkgdir" install)
|
||||
done
|
||||
|
||||
cd "$srcdir"
|
||||
install -D -m640 -o 0 -g 40 named.conf "$pkgdir/etc/named.conf"
|
||||
|
||||
install -d -m770 -o 0 -g 40 "$pkgdir/var/named"
|
||||
install -m640 -o 0 -g 40 root.hint "$pkgdir/var/named"
|
||||
install -m640 -o 0 -g 40 localhost.zone "$pkgdir/var/named"
|
||||
install -m640 -o 0 -g 40 localhost.ip6.zone "$pkgdir/var/named"
|
||||
install -m640 -o 0 -g 40 127.0.0.zone "$pkgdir/var/named"
|
||||
install -m640 -o 0 -g 40 empty.zone "$pkgdir/var/named"
|
||||
|
||||
install -Dm755 "$srcdir/named.initd" "$pkgdir/etc/init.d/named"
|
||||
install -Dm755 "$srcdir/named.run" "$pkgdir/etc/sv/named/run"
|
||||
}
|
||||
|
||||
package_bind-tools() {
|
||||
pkgdesc='The ISC DNS tools'
|
||||
depends=('glibc' 'libcap' 'libxml2' 'libnsl' 'libuv' 'libidn2' 'lmdb'
|
||||
'zlib' 'krb5' 'e2fsprogs' 'libressl' 'readline' 'geoip'
|
||||
'dnssec-anchors' 'json-c')
|
||||
optdepends=('python: for python scripts')
|
||||
conflicts=('dnsutils')
|
||||
replaces=('dnsutils' 'host')
|
||||
provides=("dnsutils=$pkgver")
|
||||
|
||||
cd "bind-$_pkgver"
|
||||
install -Dm644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/COPYRIGHT"
|
||||
make DESTDIR="$pkgdir" SUBDIRS="" install
|
||||
(cd lib && make DESTDIR="$pkgdir" install)
|
||||
for _d in bin/{dig,dnssec,delv,nsupdate,python,tools}; do
|
||||
(cd "$_d" && make DESTDIR="$pkgdir" install)
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user