From Fedora Project Wiki
< PackagingDrafts | Haskell
(→Binary Only Template: update ghc version and changelog) |
|||
Line 3: | Line 3: | ||
<pre> | <pre> | ||
%define ghc_version 6. | %define ghc_version 6.10.1 | ||
# Haskell compilers do not emit debug information | # Haskell compilers do not emit debug information | ||
Line 52: | Line 52: | ||
%changelog | %changelog | ||
* | * Today Fedora Haskell Packager <email@address> - version-release | ||
- | - initial packaging for Fedora | ||
</pre> | </pre> |
Revision as of 00:38, 10 November 2008
Binary Only Template
This is a sample spec file for a Haskell Cabal package. This sample demonstrates how to package a Haskell Cabal package that contains only a binary. It was orginally generated automatically using cabal-rpm, and then modified to overcome some of cabal-rpm's limitations: including missing dependency declarations which need to be added in manually.
%define ghc_version 6.10.1 # Haskell compilers do not emit debug information %define debug_package %{nil} Name: haProg Version: 0.9 Release: 2%{?dist} License: BSD Group: Development/Languages URL: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{name} Source: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz Summary: Summary of %{name} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ghc = %{ghc_version} BuildRequires: ... %description Description of %{name}. %prep %setup -q %build %cabal_configure %cabal_build %install rm -rf ${RPM_BUILD_ROOT} %cabal_install cd ${RPM_BUILD_ROOT}/%{_docdir}/%{name}-%{version} rm -rf doc LICENSE README %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root,-) %doc LICENSE %{_bindir}/%{name} %changelog * Today Fedora Haskell Packager <email@address> - version-release - initial packaging for Fedora