# $Id: Portfile 40767 2008-10-14 07:45:35Z gwright@macports.org $

PortSystem 1.0

name		hs-parsedate
set canonicalname	parsedate
version		3000.0.0
categories	devel haskell
maintainers	nomaintainer
platforms	darwin

description	The parsedate library for Haskell
long_description	\
		This library provides a function for parsing dates and \
		times given a date format string.

homepage	http://www.cs.chalmers.se/~bringert/darcs/parsedate/doc/
master_sites	http://hackage.haskell.org/packages/archive/${canonicalname}/${version}
distname	${canonicalname}-${version}

checksums	md5     cddd2fce4584460a91dadc3e77048bf6		\
		sha1    61e1abc896de90d7cae15f26487e6731bc525778 	\
		rmd160  6aa581e2e7cd7cfc2ae04858b5b977408d02fa31

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" }

