# $Id: Portfile 65170 2010-03-23 10:03:06Z milosh@macports.org $

PortSystem  1.0

name        signing-party
version     1.1.3
categories  mail security
maintainers milosh openmaintainer
platforms   darwin
description Various OpenPGP related tools
long_description    \
    signing-party is a collection for all kinds of PGP/GnuPG related things, \
    including signing scripts, party preparation scripts, etc.

homepage        http://pgp-tools.alioth.debian.org/
master_sites    http://ftp.de.debian.org/debian/pool/main/s/signing-party/
distname        ${name}_${version}
worksrcdir      ${name}-${version}
extract.suffix  .orig.tar.gz
checksums       md5     7d0207ce9415c1687b610be14da0b048 \
                sha1    072c306e8c63e205aff07b6c4165140a7d59cdba \
                rmd160  cfbc658854e0e9f562bd31221eaa0e1a25bcb742
use_configure   no

depends_lib path:bin/perl:perl5 \
        port:p5-gnupg-interface \
        port:p5-text-iconv \
        port:p5-text-template \
        port:p5-mime-tools \
        port:qprint
depends_run bin:gpg:gnupg port:dialog

pre-build   {
        reinplace "s|/usr/bin/perl|${prefix}/bin/perl|" \
        ${worksrcpath}/caff/caff ${worksrcpath}/caff/pgp-clean \
        ${worksrcpath}/caff/pgp-fixkey ${worksrcpath}/gpg-key2ps/gpg-key2ps \
        ${worksrcpath}/gpgdir/bump_version.pl ${worksrcpath}/gpgdir/gpgdir \
        ${worksrcpath}/gpgdir/install.pl \
        ${worksrcpath}/gpglist/gpglist ${worksrcpath}/gpgsigs/gpgsigs \
        ${worksrcpath}/keylookup/keylookup ${worksrcpath}/sig2dot/sig2dot \
        ${worksrcpath}/springgraph/springgraph
}

platform macosx {
        post-patch {
                  reinplace "s!getent.*$!dscl . -read /Users/\$USER \| awk \'\{print \$2\}\'\`!" ${worksrcpath}/gpg-mailkeys/gpg-mailkeys
        }
}

destroot    {
        xinstall -m 0755 ${worksrcpath}/caff/caff ${worksrcpath}/caff/pgp-clean ${worksrcpath}/caff/pgp-fixkey ${destroot}${prefix}/bin
        xinstall -m 0755  ${worksrcpath}/gpg-key2ps/gpg-key2ps ${worksrcpath}/gpg-mailkeys/gpg-mailkeys ${worksrcpath}/gpglist/gpglist ${worksrcpath}/gpgparticipants/gpgparticipants ${worksrcpath}/gpgsigs/gpgsigs ${worksrcpath}/gpgwrap/bin/gpgwrap ${worksrcpath}/keyanalyze/keyanalyze ${worksrcpath}/keyanalyze/process_keys ${worksrcpath}/keylookup/keylookup ${worksrcpath}/sig2dot/sig2dot ${worksrcpath}/springgraph/springgraph ${destroot}${prefix}/bin
        xinstall -m 0644 ${worksrcpath}/caff/caff.1 ${worksrcpath}/caff/pgp-clean.1 ${worksrcpath}/caff/pgp-fixkey.1 ${destroot}${prefix}/share/man/man1
        xinstall -m 0644 ${worksrcpath}/gpg-key2ps/gpg-key2ps.1 ${worksrcpath}/gpg-mailkeys/gpg-mailkeys.1 ${worksrcpath}/gpglist/gpglist.1 ${worksrcpath}/gpgparticipants/gpgparticipants.1 ${worksrcpath}/gpgwrap/doc/gpgwrap.1 ${worksrcpath}/sig2dot/sig2dot.1 ${worksrcpath}/springgraph/springgraph.1 ${worksrcpath}/gpgsigs/gpgsigs.1 ${worksrcpath}/keyanalyze/keyanalyze.1 ${worksrcpath}/keylookup/keylookup.1 ${destroot}${prefix}/share/man/man1
        xinstall -d ${destroot}${prefix}/share/doc/signing-party
        xinstall -m 0644 ${worksrcpath}/caff/caffrc.sample ${worksrcpath}/gpg-mailkeys/example.gpg-mailkeysrc ${worksrcpath}/gpgsigs/gpgsigs-eps-helper ${destroot}${prefix}/share/doc/signing-party
}

livecheck.type  regex
livecheck.url   http://packages.debian.org/unstable/misc/${name}
livecheck.regex ${name} .(\[0-9.\]+)

