#
# package info file
# field descriptions at http://www.finkproject.org/doc/packaging/reference.php?phpLang=en
#
Package: dnssec-tools
Conflicts: %N
Replaces: %N
Version: 1.7
Revision: 1
Source: http://www.dnssec-tools.org/download/%n-%v.tar.gz
Maintainer: DNSSEC Tools team <sparta-dnssec@tislabs.com>
HomePage: http://%n.sourceforge.net
License: BSD
Source-MD5: f3dfe18ae50cf65594936e1684d469d0
Description: Tools for DNSSEC
DescDetail: <<
 Detailed description of DNSSEC Tools goes here
<<
#------------------------------------------------------------
# pthreads and crypto are core OS X libs, no depends needed
#BuildDepends:

#------------------------------------------------------------
# Congifuring the package
#
#UpdateConfigGuess
#UpdateLibtool
#Patch
PatchScript: sed 's|@PREFIX@|%p|g' <%a/%n.patch | patch -p0

#------------------------------------------------------------
# Building the package
#
ConfigureParams: --sysconfdir='${prefix}/etc' --mandir='${prefix}/share/man' --datadir='${prefix}/share/doc/%n' --with-ipv6 --with-resolv-conf=%p/etc/dnssec-tools/resolv.conf --with-root-hints=/var/named/named.ca
CompileScript: <<
  #!/bin/bash -ev
  ./configure %c
  make -C validator
<<
#TestScript

ConfFiles: %p/etc/%n/dnsval.conf %p/etc/%n/resolv.conf %p/etc/%n/root.hints

#------------------------------------------------------------
# Installing the package
#
InstallScript: <<
#! /bin/sh -ev
  make -C validator install DESTDIR=%d mandir=%p/share/man datadir=%p/share/doc/%n
  mkdir -p %i/etc/%n/
  install -m 644 validator/etc/resolv.conf %i/etc/%n/resolv.conf
  install -m 644 validator/etc/dnsval.conf %i/etc/%n/dnsval.conf
  install -m 644 validator/etc/root.hints %i/etc/%n/root.hints
<<

#------------------------------------------------------------
# Sub-packages
#
SplitOff: <<
  Package: dnssectool-shlibs
  Description: DNSSEC Tools - libsres shared libraries
  Conflicts: %N
  Replaces: %N
  DocFiles: validator/doc/
  Files: lib/lib*.8*.dylib
  Shlibs: <<
    %p/lib/libsres.8.dylib 8.0.0 %n (>= 1.7-1)
    %p/lib/libval-threads.8.dylib 8.0.0 %n (>= 1.7-1)
  <<
<<
SplitOff2: <<
  Package: dnssec-tools-dev
  Description: DNSSEC Tools - libval-threads dev
  Conflicts: %N
  Replaces: %N
  BuildDependsOnly: True
  Files: <<
    lib/libsres.dylib
    lib/libval-threads.dylib
    lib/libval-threads*.*a
    lib/libsres*.*a
    include
  <<
  Shlibs: <<
    %p/lib/libsres.dylib 8.0.0 %n (>= 1.7-1)
    %p/lib/libval-threads.dylib 8.0.0 %n (>= 1.7-1)
  <<
<<
#------------------------------------------------------------
# Developer stuff
#
InfoTest: <<
  TestConfigureParams: --cache=%d/../config.cache.%n
<<
