| 1 | # Contributor: Thomas Mudrunka <harvie@@email..cz> |
| 2 | # Maintainer: Thomas Mudrunka <harvie@@email..cz> |
| 3 | # You can also contact me on http://blog.harvie.cz/ |
| 4 | # Patches welcome: http://github.com/harvie/archlinux-packages |
| 5 | |
| 6 | pkgname=dnssec-tools |
| 7 | pkgver=1.7 |
| 8 | pkgrel=1 |
| 9 | pkgdesc="Set of software tools, patches, applications, wrappers, extensions, and plugins that will help ease the deployment of DNSSEC related technologies" |
| 10 | url="http://www.dnssec-tools.org/" |
| 11 | license="Custom" |
| 12 | arch=('i686' 'x86_64') |
| 13 | depends=(dnssec-root-zone-trust-anchors perl perl-timedate perl-net-dns perl-net-dns-sec) |
| 14 | backup=(etc/dnssec-tools/resolv.conf etc/dnssec-tools/root.hints) |
| 15 | install="${pkgname}.install" |
| 16 | source=("http://www.dnssec-tools.org/download/${pkgname}-${pkgver}.tar.gz" dnsval.conf resolv.conf) |
| 17 | md5sums=('f3dfe18ae50cf65594936e1684d469d0' |
| 18 | '60928d281572619dfdc24c3d727c120f' |
| 19 | '8096025f849b477e4e6008b9d3dc1232') |
| 20 | |
| 21 | build() { |
| 22 | #Segfaults with optimalizations... |
| 23 | export CFLAGS="-march=$CARCH -mtune=generic" |
| 24 | export CXXFLAGS="-march=$CARCH -mtune=generic" |
| 25 | |
| 26 | cd ${srcdir}/${pkgname}-${pkgver}/ || return 1 |
| 27 | msg 'Configuring...' |
| 28 | ./configure\ |
| 29 | --exec_prefix=/usr --prefix=/usr\ |
| 30 | --sysconfdir=/etc --mandir=/usr/share/man\ |
| 31 | --with-resolv-conf=/dev/null\ |
| 32 | --with-root-hints=/etc/dnssec-tools/root.hints\ |
| 33 | --with-ipv6\ |
| 34 | --with-nsec3\ |
| 35 | --with-dlv |
| 36 | |
| 37 | msg 'Fixing bugs...' |
| 38 | #grep VAL_ROOT_HINTS ./validator/libval/val_policy.h || { |
| 39 | # msg2 'fixing missing VAL_ROOT_HINTS in ./validator/libval/val_policy.h' |
| 40 | # root_hints="$(grep '^VAL_ROOT_HINTS=' ./validator/config.log | head -n 1 | tr = ' ' | tr "'" '"' | sed -e 's/\//\\\//g')" |
| 41 | # cat ./validator/libval/val_policy.h | sed -e 's/#include "val_parse.h"/#include "val_parse.h"\n#define '"$root_hints"'/' > tmp |
| 42 | # mv tmp ./validator/libval/val_policy.h |
| 43 | #} |
| 44 | |
| 45 | msg 'Building...' |
| 46 | make -j1 |
| 47 | |
| 48 | msg 'Installing files to package...' |
| 49 | make -j1 install DESTDIR="${pkgdir}" |
| 50 | msg2 'configuration files' |
| 51 | cp -r validator/etc/* "${pkgdir}/etc/${pkgname}/" |
| 52 | rm -rf "${pkgdir}/etc/${pkgname}/${pkgname}.conf" #will be generated in post_install |
| 53 | cp -f "${srcdir}"/{dnsval,resolv}.conf "${pkgdir}/etc/dnssec-tools/" |
| 54 | msg2 'license informations' |
| 55 | mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}/" |
| 56 | cp COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" |
| 57 | |
| 58 | msg 'Cleaning...' |
| 59 | #have to do this because of some issues... |
| 60 | rm -rf "${srcdir}/" |
| 61 | } |