Creating Debian packages from Cabal package: Difference between revisions
(Separating packaging of libraries and programs (no info on the latter though), and some beautification) |
(typo) |
||
Line 8: | Line 8: | ||
<li><tt>wget http://hackage.haskell.org/packages/archive/mtl/1.0/mtl-1.0.tar.gz -O haskell-mtl_1.0.1.orig.tar.gz</tt></li> | <li><tt>wget http://hackage.haskell.org/packages/archive/mtl/1.0/mtl-1.0.tar.gz -O haskell-mtl_1.0.1.orig.tar.gz</tt></li> | ||
<li><tt>tar -zxf haskell-mtl_1.0.1.orig.tar.gz</tt></li> | <li><tt>tar -zxf haskell-mtl_1.0.1.orig.tar.gz</tt></li> | ||
<li><tt>cd mtl-1.0</tt> | <li><tt>cd mtl-1.0</tt></li> | ||
<li><tt>mkdir -p debian/varfiles</tt></li> | <li><tt>mkdir -p debian/varfiles</tt></li> | ||
<li>Create <tt>debian/varfiles/varfile</tt> with your favorite editor: | <li>Create <tt>debian/varfiles/varfile</tt> with your favorite editor: |
Revision as of 18:33, 18 October 2008
Packaging a Cabal library package in 10 easy steps
This process requires the haskell-utils package.
Here is an example on was created a new Debian package out of an Haskell Cabal library package: mtl.
- wget http://hackage.haskell.org/packages/archive/mtl/1.0/mtl-1.0.tar.gz -O haskell-mtl_1.0.1.orig.tar.gz
- tar -zxf haskell-mtl_1.0.1.orig.tar.gz
- cd mtl-1.0
- mkdir -p debian/varfiles
- Create debian/varfiles/varfile with your favorite editor:
maintainer="Ian Lynagh (wibble) <igloo@debian.org>" short_description="Haskell monad transformer library for GHC" long_description=" MTL is a monad transformer library, inspired by the paper \"Functional Programming with Overloading and Higher-Order Polymorphism\", by Mark P Jones (<http://www.cse.ogi.edu/~mpj/>), Advanced School of Functional Programming, 1995." c_dev_libs="" extra_build_deps=""
(Pay attention to the leading space in long_description. It's necessary due to the format of Debian's control file.) - Create debian/copyright with your favorite editor:
Debianised by ... Author ... Copyright: BSD ... /usr/share/common-licenses/BSD ... EOF
- dch --create -D unstable --package haskell-mtl --newversion 1.0.1-1
- update-debian-haskell-files
- debian/rules update-generated-files
- debuild -us -uc
With luck the .cabal file will provide most of the text for steps 5 and 6.
When making future changes, apart from adding a changelog entry (use dch), only steps 9 and 10 need to be repeated.
Even if packaging Haskell libraries seems easy, the Debian Policy and the Developers Reference contains a lot of valuable informations on how to create a policy compliant Debian package.
Please subscribe to the debian-haskell mailling-list if you are interested in creating new Haskell packages for Debian.
Packaging a Cabal program package in N easy steps
TBD