From Fedora Project Wiki
< PackagingDrafts | Haskell
Line 1: | Line 1: | ||
= Binary Only Template = | = 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 generated automatically using cabal-rpm | 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. | ||
<pre> | <pre> | ||
%define | %define ghc_version 6.8.3 | ||
# Haskell compilers do not | # Haskell compilers do not emit debug information | ||
%define debug_package %{nil} | %define debug_package %{nil} | ||
Line 18: | Line 17: | ||
Summary: Summary of %{name} | Summary: Summary of %{name} | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
BuildRequires: | BuildRequires: ghc = %{ghc_version} | ||
BuildRequires: ... | BuildRequires: ... | ||
Line 26: | Line 25: | ||
%prep | %prep | ||
%setup -q | %setup -q | ||
%build | %build | ||
% | %cabal_configure | ||
% | %cabal_build | ||
%install | %install | ||
rm -rf ${RPM_BUILD_ROOT} | rm -rf ${RPM_BUILD_ROOT} | ||
% | %cabal_install | ||
cd ${RPM_BUILD_ROOT}/%{ | cd ${RPM_BUILD_ROOT}/%{_docdir}/%{name}-%{version} | ||
rm -rf doc LICENSE README | rm -rf doc LICENSE README | ||
Revision as of 10:34, 9 September 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.8.3 # 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 * Wed Aug 13 2008 Yaakov M. Nemoy <yankee@koan> - 0.9-2 - changed source - added requirements * Wed Aug 13 2008 cabal-rpm <cabal-devel@haskell.org> - 0.9-1 - spec file autogenerated by cabal-rpm