aboutsummaryrefslogblamecommitdiffstats
path: root/community/pdns/APKBUILD
blob: a2e85f813f6228f62a0fdfe536da3fb78d519b8c (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                   
                                              
                                                 
                                           

                                              
            
        
                                       
                               
          
                 

              
                                                                    
                                                         
                              
                         
                                          



                                            

                                                

                
                                                                   
                  

                                   

         
                      
 
                                   
                                            




                                           
                                                                                 

                                


           

                      
                                      

                                                   
                                             
                                                    
                                                  

                                                            

 
                                             


                                               

                                                        
                                                    



                                                        
                                 
 
                                               
                                                                
                                               

 
                                                                                                                                                                

                                                                                                                                            
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Matt Smith <mcs@darkregion.net>
# Contributor: Olivier Mauras <olivier@mauras.ch>
# Contributor: Daniel Isaksen <d@duniel.no>
# Maintainer:  Matt Smith <mcs@darkregion.net>
pkgname=pdns
pkgver=4.0.4
pkgrel=2
pkgdesc="PowerDNS Authoritative Server"
url="https://www.powerdns.com/"
arch="all"
license="GPL-2.0"
depends=""
depends_dev=""
makedepends="$depends_dev boost-dev lua-dev openldap-dev mariadb-dev
	postgresql-dev sqlite-dev geoip-dev yaml-cpp-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-doc
	$pkgname-backend-bind:backend_bind
	$pkgname-backend-ldap:backend_ldap
	$pkgname-backend-mysql:backend_mysql
	$pkgname-backend-pgsql:backend_pgsql
	$pkgname-backend-pipe:backend_pipe
	$pkgname-backend-sqlite3:backend_sqlite3
	$pkgname-backend-geoip:backend_geoip"
pkgusers="pdns"
pkggroups="pdns"
source="http://downloads.powerdns.com/releases/pdns-$pkgver.tar.bz2
	pdns.initd
	pdns.conf"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	./configure --prefix=/usr \
		--sysconfdir=/etc/$pkgname \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--libdir=/usr/lib/pdns \
		--with-modules="" \
		--with-dynmodules="bind ldap gmysql gpgsql pipe gsqlite3 geoip" \
		--disable-static
	make
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
	rm "$pkgdir"/etc/$pkgname/$pkgname.conf-dist
	install -m600 -D "$srcdir"/$pkgname.conf \
		"$pkgdir"/etc/$pkgname/$pkgname.conf
	chown pdns:pdns "$pkgdir"/etc/$pkgname/$pkgname.conf
}

backend_bind()		{ _mv_backend bind; }
backend_ldap()		{ _mv_backend ldap; }
backend_mysql()		{ _mv_backend gmysql; }
backend_pgsql()		{ _mv_backend gpgsql; }
backend_pipe()		{ _mv_backend pipe; }
backend_sqlite3()	{ _mv_backend gsqlite3 sqlite; }
backend_geoip()		{ _mv_backend geoip geoip; }

_mv_backend() {
	local backend=$1
	pkgdesc="${backend} backend module for PowerDNS"
	depends="$pkgname ${2:-}"

	mkdir -p "$subpkgdir"/usr/lib/pdns/pdns
	mv "$pkgdir"/usr/lib/pdns/pdns/lib${backend}backend.so \
		"$subpkgdir"/usr/lib/pdns/pdns/
}

sha512sums="4ef4705cd990b03976775167c7c37850d45907e198549feda5f5701172e008e3f1f74a35a9bebdb24b63dec15ff63cb2cc9dfc8f92e4e1012e0539c5a88b845b  pdns-4.0.4.tar.bz2
3f5b202c56408168ddbf81b47f5c48ca65de91ada88751213a06a1096334b89176c5a6a58f3c6a893a2d15b51ece9f2a64d7d2ea836220a3e45fe362969c6cfa  pdns.initd
c8f8d152c4d29660aa56a9dbfd0d268474f9bd26993ad9e7d8ef54725d02a02e27c1a11adc67bf40f5dd871a677648d45fa76222a063907e0dfb2420111d5dc8  pdns.conf"