# Contributor: Sören Tempel # Contributor: Carlo Landmeter # Maintainer: Natanael Copa global pkgname := 'unbound' global pkgver := '1.6.6' global pkgrel := '0' global pkgdesc := '"Unbound is a validating, recursive, and caching DNS resolver'" global pkgusers := '"unbound'" global pkggroups := '"unbound'" global url := '"http://unbound.net/'" global arch := '"all'" global license := '"BSD'" global depends := '"dnssec-root'" global depends_dev := '"libressl-dev expat-dev ldns-dev libevent-dev'" global makedepends := ""$depends_dev python2-dev swig linux-headers"" global install := ""$pkgname.pre-install"" global subpackages := ""$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-dbg py-unbound:py $pkgname-migrate::noarch"" global source := ""http://unbound.net/downloads/unbound-$pkgver.tar.gz conf.patch update-unbound-root-hints migrate-dnscache-to-unbound root.hints unbound.initd"" global builddir := ""$srcdir"/$pkgname-$pkgver" proc build { cd $builddir ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --with-username=unbound \ --with-run-dir="" \ --with-pidfile=/var/run/unbound/unbound.pid \ --with-rootkey-file=/usr/share/dnssec-root/trusted-key.key \ --with-libevent \ --with-ldns \ --with-pthreads \ --disable-static \ --disable-rpath \ --with-ssl \ --without-pythonmodule \ --with-pyunbound # do not link to libpython sed -e '/^LIBS=/s/-lpython.*[[:space:]]/ /' \ -i Makefile make } proc package { cd $builddir make DESTDIR="$pkgdir" install install -D contrib/update-anchor.sh \ "$pkgdir"/usr/share/$pkgname/update-anchor.sh install -Dm755 "$srcdir"/update-unbound-root-hints \ "$pkgdir"/etc/periodic/monthly/update-unbound-root-hints install -m755 -D "$srcdir"/unbound.initd \ "$pkgdir"/etc/init.d/unbound install -d -o unbound -g unbound "$pkgdir"/var/run/unbound install -m644 "$srcdir"/root.hints "$pkgdir"/etc/unbound/ mkdir -p "$pkgdir"/usr/share/doc/$pkgname/ install -m644 doc/CREDITS doc/Changelog doc/FEATURES \ doc/README doc/TODO "$pkgdir"/usr/share/doc/$pkgname/ } proc libs { global pkgdesc := '"unbound shared libraries'" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/ } proc py { global pkgdesc := '"Python bindings to libunbound'" mkdir -p "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ } proc migrate { global pkgdesc := '"Simple tool to migrate from dnscache to unbound'" mkdir -p "$subpkgdir"/usr/bin/ install -m755 "$srcdir"/migrate-dnscache-to-unbound \ "$subpkgdir"/usr/bin/ } global sha512sums := '"910fd0956b8828d3db0511a85bf6ab6c4c3982f17c70ccb7123d1de1650d24c2906bc29ac4ea83fd7d95d8af29e2cbc88df666f365e51296f552292ef9753016 unbound-1.6.6.tar.gz 90faa8bf352132b63f6b33cd7d7cac164df331272568e7a442d92e021fcf727334f6e28c11ed211bcd3eb62aa606c110e4931b514fecf388d0fbea3810b7530a conf.patch b16b7b15392c0d560718ee543f1eebc5617085fb30d61cddc20dd948bd8b1634ee5b2de1c9cb172a6c0d1c5bbaf98b6fd39816d39c72a43ff619455449e668ac update-unbound-root-hints b26a13c1c88da9611a65705dc59f7233c5e0f6aced0d7d66c18536a969a2de627ca5d4bb55eedd81f2f040fa11bde48eaaeca2850f376e72e7a531678a259131 migrate-dnscache-to-unbound 0dca3470ed4ca9b76d6f47f5d20e92924e6648f0870d8594fe6735d8f1cdfeeee7296301066c2a8b2b94f7daed86c15efe00c301ca27e435e5dd2c85508dc9c8 root.hints 540e7a11fa5421e2d103c42d69faf1ba005adcadfac2f65091795a2f00e5b5acd1436b4d2adfe2bb0fdfcbfb44d0967d6bce87620c618549fcd7e32019040f29 unbound.initd'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(unbound)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(1.6.6)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(0)} spids:[15])] spids: [15] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Unbound is a validating, recursive, and caching DNS resolver"))} spids: [18] ) ] spids: [18] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgusers) op:Equal rhs:{(DQ (unbound))} spids:[23])] spids: [23] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkggroups) op:Equal rhs:{(DQ (unbound))} spids:[28])] spids: [28] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://unbound.net/"))} spids: [33] ) ] spids: [33] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[38])] spids: [38] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (BSD))} spids:[43])] spids: [43] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(DQ (dnssec-root))} spids:[48])] spids: [48] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:depends_dev) op: Equal rhs: {(DQ ("libressl-dev expat-dev ldns-dev libevent-dev"))} spids: [53] ) ] spids: [53] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ($ VSub_Name "$depends_dev") (" python2-dev swig linux-headers"))} spids: [58] ) ] spids: [58] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:install) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (.pre-install))} spids: [64] ) ] spids: [64] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") ("-dev ") ($ VSub_Name "$pkgname") ("-doc ") ($ VSub_Name "$pkgname") ("-libs ") ($ VSub_Name "$pkgname") ("-dbg py-unbound:py ") ($ VSub_Name "$pkgname") ("-migrate::noarch") ) } spids: [70] ) ] spids: [70] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("http://unbound.net/downloads/unbound-") ($ VSub_Name "$pkgver") (".tar.gz\n") ("\tconf.patch\n") ("\tupdate-unbound-root-hints\n") ("\tmigrate-dnscache-to-unbound\n") ("\troot.hints\n") ("\tunbound.initd") ) } spids: [84] ) ] spids: [84] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver")} spids: [96] ) ] spids: [96] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(./configure)} {(--build) (Lit_Other "=") ($ VSub_Name "$CBUILD")} {(--host) (Lit_Other "=") ($ VSub_Name "$CHOST")} {(--prefix) (Lit_Other "=") (/usr)} {(--sysconfdir) (Lit_Other "=") (/etc)} {(--mandir) (Lit_Other "=") (/usr/share/man)} {(--localstatedir) (Lit_Other "=") (/var)} {(--with-username) (Lit_Other "=") (unbound)} {(--with-run-dir) (Lit_Other "=") (DQ )} {(--with-pidfile) (Lit_Other "=") (/var/run/unbound/unbound.pid)} {(--with-rootkey-file) (Lit_Other "=") (/usr/share/dnssec-root/trusted-key.key)} {(--with-libevent)} {(--with-ldns)} {(--with-pthreads)} {(--disable-static)} {(--disable-rpath)} {(--with-ssl)} {(--without-pythonmodule)} {(--with-pyunbound)} ) (C {(sed)} {(-e)} {(SQ <"/^LIBS=/s/-lpython.*[[:space:]]/ /">)} {(-i)} {(Makefile)}) (C {(make)}) ] spids: [110] ) spids: [106 109] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(make)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))} {(install)}) (C {(install)} {(-D)} {(contrib/update-anchor.sh)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/share/) ($ VSub_Name "$pkgname") (/update-anchor.sh)} ) (C {(install)} {(-Dm755)} {(DQ ($ VSub_Name "$srcdir")) (/update-unbound-root-hints)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/periodic/monthly/update-unbound-root-hints)} ) (C {(install)} {(-m755)} {(-D)} {(DQ ($ VSub_Name "$srcdir")) (/unbound.initd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/init.d/unbound)} ) (C {(install)} {(-d)} {(-o)} {(unbound)} {(-g)} {(unbound)} {(DQ ($ VSub_Name "$pkgdir")) (/var/run/unbound)} ) (C {(install)} {(-m644)} {(DQ ($ VSub_Name "$srcdir")) (/root.hints)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/unbound/)} ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/share/doc/) ($ VSub_Name "$pkgname") (/)} ) (C {(install)} {(-m644)} {(doc/CREDITS)} {(doc/Changelog)} {(doc/FEATURES)} {(doc/README)} {(doc/TODO)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/share/doc/) ($ VSub_Name "$pkgname") (/)} ) ] spids: [246] ) spids: [242 245] ) (FuncDef name: libs body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("unbound shared libraries"))} spids: [398] ) ] spids: [398] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/lib/lib) (Lit_Other "*") (.so.) (Lit_Other "*")} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib/)} ) ] spids: [395] ) spids: [391 394] ) (FuncDef name: py body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Python bindings to libunbound"))} spids: [439] ) ] spids: [439] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib/)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/lib/python) (Lit_Other "*")} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib/)} ) ] spids: [436] ) spids: [432 435] ) (FuncDef name: migrate body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Simple tool to migrate from dnscache to unbound"))} spids: [478] ) ] spids: [478] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/)}) (C {(install)} {(-m755)} {(DQ ($ VSub_Name "$srcdir")) (/migrate-dnscache-to-unbound)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/)} ) ] spids: [475] ) spids: [471 474] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "910fd0956b8828d3db0511a85bf6ab6c4c3982f17c70ccb7123d1de1650d24c2906bc29ac4ea83fd7d95d8af29e2cbc88df666f365e51296f552292ef9753016 unbound-1.6.6.tar.gz\n" ) ( "90faa8bf352132b63f6b33cd7d7cac164df331272568e7a442d92e021fcf727334f6e28c11ed211bcd3eb62aa606c110e4931b514fecf388d0fbea3810b7530a conf.patch\n" ) ( "b16b7b15392c0d560718ee543f1eebc5617085fb30d61cddc20dd948bd8b1634ee5b2de1c9cb172a6c0d1c5bbaf98b6fd39816d39c72a43ff619455449e668ac update-unbound-root-hints\n" ) ( "b26a13c1c88da9611a65705dc59f7233c5e0f6aced0d7d66c18536a969a2de627ca5d4bb55eedd81f2f040fa11bde48eaaeca2850f376e72e7a531678a259131 migrate-dnscache-to-unbound\n" ) ( "0dca3470ed4ca9b76d6f47f5d20e92924e6648f0870d8594fe6735d8f1cdfeeee7296301066c2a8b2b94f7daed86c15efe00c301ca27e435e5dd2c85508dc9c8 root.hints\n" ) ( "540e7a11fa5421e2d103c42d69faf1ba005adcadfac2f65091795a2f00e5b5acd1436b4d2adfe2bb0fdfcbfb44d0967d6bce87620c618549fcd7e32019040f29 unbound.initd" ) ) } spids: [513] ) ] spids: [513] ) ] )