Rechercher une page de manuel
dh_haskell
Langue: en
Version: 2009-06-17 (debian - 07/07/09)
Section: 1 (Commandes utilisateur)
Sommaire
NAME
dh_haskell - Builds Cabalized libraries, calculates Haskell dependencies, and adds postinst and prerm Haskell scriptsSYNOPSIS
dh_haskell [debhelper options]dh_haskell_prep [debhelper options]
dh_haskell_configure [debhelper options]
dh_haskell_build [debhelper options]
dh_haskell_install [debhelper options]
dh_haskell_buildinst [debhelper options]
dh_haskell_depends [debhelper options]
DESCRIPTION
dh_haskell is a debhelper program that helps with building Haskell libraries.It does several things. It can generate postinst and prerm scripts when necessary. It automates building libraries for the different supported Haskell systems in Debian. It generates substvars for your control file so that the library packages depend on the appropriate packages. In short, it can drive the entire process.
REQUIREMENTS
dh_haskell assumes that your packages are adhering to the draft Haskell policy.Your control file must build the binary library files using packages named libtype-name-variation, where type is ghc5, ghc6, or nhc98; name is the name of your package; and variation is dev or prof. These packages should be Architecture: any.
The prof package contains profiling enabled libraries. Currently only GHC supports profiling. Due to restrictions of the GHC compiler, if you provide a dev package you should also provide a corresponding prof package.
If you build a Hugs package, name it libhugs-name. However, dh_haskell will also accept libhugs-name-dev for consistency. Most Hugs packages should be Architecture: all. If your package uses foreign methods, maybe it should be Architecture: any (please let me know if you have an answer to that).
dh_haskell figures out how to build your package based on the type, so you must adhere to this naming scheme.
dh_haskell assumes that the Haskell Cabal (see www.haskell.org/cabal) can be used to build your package. It obtains package name and version information from the Cabal Setup.Description file.
HOW TO PACKAGE A HASKELL LIBRARY
Start from a basic debian/ directory. Add entries to Build-Depends for haskell-devscripts and the compilers for any binaries you will build.In the clause in control for each binary package, make sure to add ${haskell:Depends} to the Depends: line, and the same with Recommends and Suggests.
In rules, if you're using CDBS, include /usr/share/cdbs/1/rules/debhelper.mk and /usr/share/cdbs/1/class/hlibrary.mk. This is the current recommended way to package a Haskell Library.
If you're using debhelper v7, use dh command --with haskell_devscripts .
If you're simply using debhelper, add dh_haskell in the install target and dh_haskell_depends before dh_gencontrol in binary. Your build and configure targets should be empty. Remember that you should add -a to all debhelper calls for multi-binary packages. That goes for dh_haskell too. Your clean target should contain:
"-./setup clean" "--rm -rf setup Setup.hi Setup.ho Setup.o .*config* dist"
That's it. haskell-devscripts does the rest.
EXAMPLES
See the Debian source packages for haskelldb, haskell-filepath, haskell-hsql, haskell-http etc.BUGS
hugs and ghc6 are the only supported targets at the moment. Cabal does not yet support nhc98.SEE ALSO
dh_haskell_prep(1) dh_haskell_configure(1) dh_haskell_build(1) dh_haskell_install(1) dh_haskell_buildinst(1) dh_haskell_depends(1) dh_haskell_clean(1) debhelper(7)AUTHOR
John Goerzen <jgoerzen@complete.org>Based on ideas in dh_python by Josselin Mouette <joss@debian.org>
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre