cabal-rpm: RPM package creator for Haskell Cabal-based packages

[ distribution, gpl, program ] [ Propose Tags ]

This package generates RPM spec files from Haskell Cabal packages.

Recent changes:

[Skip to Readme]
Versions [faq] 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.3.1, 0.3.2, 0.3.3, 0.4, 0.5, 0.5.1, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.7.0, 0.7.1, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.8.9, 0.8.10, 0.8.11, 0.9, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5,, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 0.9.10, 0.9.11, 0.10.0, 0.10.1, 0.11, 0.11.1, 0.11.2, 0.12, 0.12.1, 0.12.2, 0.12.3, 0.12.4, 0.12.5, 0.12.6, 0.13, 0.13.1, 0.13.2, 0.13.3, 1.0.1
Change log NEWS
Dependencies base (<5), Cabal (>1.10), directory, filepath, old-locale, process, time, unix [details]
License GPL-3.0-only
Copyright 2007-2008 Bryan O'Sullivan <>, 2012 Jens Petersen <>
Author Bryan O'Sullivan <>
Maintainer Jens Petersen <>
Category Distribution
Home page
Bug tracker
Source repo head: git clone
Uploaded by JensPetersen at Tue Sep 25 02:47:21 UTC 2012
Distributions Fedora:0.13.3, LTSHaskell:0.12.6, NixOS:1.0.1, Stackage:0.13.3
Executables cabal-rpm
Downloads 29345 total (1758 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
Last success reported on 2015-05-24 [all 9 reports]


Maintainer's Corner

For package maintainers and hackage trustees

Readme for cabal-rpm-0.6.4

[back to package description]


cabal-rpm creates RPM spec files for packaging Haskell Cabal-based packages.

This version updates the older cabal-rpm-0.5.1 package by Bryan O'Sullivan (see README.orig) to work with current Cabal and also updated to current RPM packaging conventions defined until now by cabal2spec which is used by Fedora and also OpenSuSE. It is licensed under the terms of the GPL version 3 (see the COPYING file). It is designed to replace the simple cabal2spec tool shell script made by the maintainer.

You can build from source as normal by running cabal install or via Hackage with cabal install cabal-rpm.


cabal-rpm assumes you are using ghc-rpm-macros for Haskell RPM packaging. It currently needs Cabal 1.10 or later to build (ie ghc7), but it should not be hard to patch it to build at least for ghc-6.12.


To create a .spec file for a Haskell src package in the current dir:

$ cabal-rpm

or directly on a .cabal file:

$ cabal-rpm path/to/mypkg.cabal

or tarball:

$ cabal-rpm path/to/mypkg-version.tar.gz

or on a package source dir:

$ cabal-rpm mypkg-0.1

You can also package directly from hackage:

$ cabal-rpm somepkg


$ cabal-rpm somepkg-0.1

will unpack the (latest) 'somepkg' package from hackage (if the dir does not exist, otherwise it uses the existing dir) and create a spec file for it.

cabal-rpm always creates .spec files in the current dir and if a .spec file already exists it will append .cabal-rpm to the generated filename to avoid overwriting an existing file.


The latest source code is available from:


More features are planned and patches welcome. Including restoring the rpmbuild feature and recursive packaging and hopefully yum integration. See the TODO file for more details.