
On Wed, Sep 22, 2010 at 7:53 AM, Pedro Baltazar Vasconcelos
I wrote a simple interactive tableaux theorem prover as a cgi in Haskell (http://www.ncc.up.pt/~pbv/cgi/tableaux.cgi) and would like to submit to hackage but need some advice on how to package it using cabal. In particular, the binary, CSS and bitmap files need to be installed under the web server directory (public_html or alike) rather than system or user directories.
Any thoughts on how to do this?
You could probably use a post-install (postInst) user hook to do it, but that can get a little hairy. (I'm not certain what modules you can reasonably use from code invoked via Setup.hs, and you'll have to worry about tracking down/detecting/creating a public_html directory) To use user hooks with cabal-install, you will also have to set the build-type to Custom. The list of user hooks is here: http://hackage.haskell.org/packages/archive/Cabal/1.8.0.6/doc/html/Distribut... Ed Yang has a blog post that discusses using user hooks to do relatively complex build tasks. While the context and objective are a bit different, his examples may help to understand the syntax and interactions between the cabal file and Setup.hs: http://blog.ezyang.com/2010/06/setting-up-cabal-the-ffi-and-c2hs/ --Rogan
Regards,
Pedro Vasconcelos
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe