# $Id: Portfile 40753 2008-10-14 05:58:30Z gwright@macports.org $

PortSystem 1.0

name		hs-Crypto
set canonicalname	Crypto
version		4.1.0
categories	devel haskell
maintainers	nomaintainer
platforms	darwin

description	The Haskell Cryptographic Library.
long_description	\
		The Haskell Cryptographic Library collects together	\
		existing Haskell cryptographic functions into one	\
		cabalized package, together with HUnit tests,		\
		QuickCheck property tests, examples showing how to	\
		interwork with other cryptographic implementations	\
		and examples showing how to handle other ASN.1 definitions.

homepage	http://hackage.haskell.org/
master_sites	${homepage}/packages/archive/${canonicalname}/${version}/
distname	${canonicalname}-${version}

checksums	md5     d19377c8ad518d2aff338a89507809a7		\
		sha1    5ba9c270fe445a8011dd89052d28754a06f9454a	\
		rmd160  d7f4ccc8e7071a591ccb18da765bd037cd4b28b8

depends_build	port:ghc

configure	{ system "cd ${worksrcpath} && runhaskell Setup configure --ghc --prefix=${prefix} --with-compiler=${prefix}/bin/ghc --enable-library-profiling"
		}

build		{ system "cd ${worksrcpath} && runhaskell Setup build -v"
		}

destroot	{ system "cd ${worksrcpath} && runhaskell Setup copy --copy-prefix=${destroot}${prefix}"
                  system "cd ${worksrcpath} && runhaskell Setup register   --gen-script"
                  system "cd ${worksrcpath} && runhaskell Setup unregister --gen-script"

                  file mkdir ${destroot}${prefix}/libexec/${name}
                  file copy ${worksrcpath}/register.sh \
                            ${destroot}${prefix}/libexec/${name}
                  file copy ${worksrcpath}/unregister.sh \
                            ${destroot}${prefix}/libexec/${name}
                 }

post-activate	{ system "${prefix}/libexec/${name}/register.sh" }

#pre-deactivate	{ system "${prefix}/libexec/${name}/unregister.sh" }




 
