aboutsummaryrefslogblamecommitdiffstats
path: root/main/nsd/APKBUILD
blob: 0df121b4afa15324f3162171d7035f4f3e2a65df (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                      
                                              
                                                      
                                              
                                                   
           

            
                                                                    
                                           
          
                      
                                      
                                                   
                                                       

               
                                                                 
                 
                    
         
 



                      
         
                     

                                 


                                         
                                                 

                                           

                                                   
            


           
                                      
 
                                                   
                                             
 
                                                   
                                                     
                                                 
 

                                                            

 
                                                                                                                                                              
                                                                                                                                           
                                                                                                                                               
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Matt Smith <mcs@darkregion.net>
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Contributor: Iggy Jackson <iggy@theiggy.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nsd
pkgver=4.3.7
pkgrel=0
pkgdesc="Authoritative only, high performance and simple DNS server"
url="https://www.nlnetlabs.nl/projects/nsd"
arch="all"
license="BSD-3-Clause"
makedepends="openssl-dev libevent-dev"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="$pkgname-doc $pkgname-dbg $pkgname-openrc"
pkgusers="nsd"
pkggroups="nsd"
source="https://www.nlnetlabs.nl/downloads/nsd/nsd-$pkgver.tar.gz
	nsd.initd
	config.patch
	"

# secfixes:
#   4.3.4-r0:
#     - CVE-2020-28935

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--sbindir=/usr/sbin \
		--mandir=/usr/share/man \
		--with-user=nsd \
		--with-pidfile=/run/nsd/nsd.pid \
		--with-xfrdir=/var/db/nsd \
		--enable-ratelimit \
		--enable-ratelimit-default-is-off \
		--enable-root-server
	make
}

package() {
	make DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname

	install -d "$pkgdir"/usr/share/doc/$pkgname
	cp -a "$builddir"/doc/* "$builddir"/contrib \
		"$pkgdir"/usr/share/doc/$pkgname/

	install -d -m 755 -o nsd -g nsd "$pkgdir"/var/db/nsd
	rm -fr "$pkgdir"/run
}

sha512sums="ef5fbcbeccba7e90cc7eed32c6a6f61f5471e13bfb74e5dd072cc9be7af67ebf97c93c0902e115efeda89489399e0543566a6847788ea7bebf13b9007f2c6193  nsd-4.3.7.tar.gz
bc2b27d98b99db067c7c4b152ee40ae81b8ee66989f873ca0c21f57333c3734bb342866f68d5837f10bb56cb598fafc794095c02b8bc97ef6dace450cae526a6  nsd.initd
5b192f2151114d1853fb17f89324d9cc7ec16aa4d057c4f86b81ce8385b69eeb128df737e12597705c2acd33cdfd5857ed3234e4be153a36ba1dcf4175232701  config.patch"