# $Id: Portfile 40948 2008-10-18 20:05:04Z ryandesign@macports.org $

PortSystem 1.0

name		hs-bytestring-csv
set canonicalname	bytestring-csv
version		0.1.2
categories	devel haskell
maintainers	nomaintainer
platforms	darwin

description	Parse CSV formatted data efficiently
long_description	\
		Parse CSV data from a bytestring.

homepage	http://code.haskell.org/~dons/code/bytestring-csv
master_sites	http://hackage.haskell.org/packages/archive/${canonicalname}/${version}
distname	${canonicalname}-${version}

checksums	md5     45adcabc345af6bc8201e254a7de0683		\
		sha1    fbcd2e6cb980133ec259f492246cd23cef339574	\
		rmd160  24eb8ddc311b2643ab9b56cd15b060481c9e1b6a

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

