The cabal2spec
utility converts a given Cabal file into an RPM spec
file that
builds that package with the RPM package manager. This tool is used to generate
various Haskell package sets for the SUSE and
openSUSE familiy of distributions. Plenty of
examples for generated spec files can be found in the openSUSE Haskell
development
project.