From Fedora Project Wiki
< PackagingDrafts | Haskell
No edit summary |
|||
(7 intermediate revisions by the same user not shown) | |||
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> | ||
# ghc does not emit debug information | |||
%define debug_package %{nil} | %define debug_package %{nil} | ||
Name: | Name: haProg | ||
Version: | Version: version | ||
Release: | Release: 1%{?dist} | ||
License: BSD | License: BSD | ||
Group: Development/Languages | Group: Development/Languages | ||
URL: http:// | URL: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{name} | ||
Source: http://hackage.haskell.org/packages/archive/ | Source: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz | ||
Summary: | Summary: Summary of %{name} | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
# ghc has only been bootstrapped on the following archs: | |||
BuildRequires: | ExclusiveArch: i386 x86_64 ppc | ||
BuildRequires: | BuildRequires: ghc | ||
BuildRequires: ... | |||
%description | %description | ||
Description of %{name}. | |||
%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 | ||
Line 71: | Line 44: | ||
%files | %files | ||
%defattr(-,root,root,-) | %defattr(-,root,root,-) | ||
%doc LICENSE | %doc LICENSE | ||
%{_bindir}/%{name} | |||
%changelog | %changelog | ||
* | * Day Month Date Year Fedora Haskell Packager <email@address> - version-release | ||
- | - initial packaging for Fedora | ||
</pre> | </pre> |
Latest revision as of 04:17, 25 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.
# ghc does not emit debug information %define debug_package %{nil} Name: haProg Version: version Release: 1%{?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) # ghc has only been bootstrapped on the following archs: ExclusiveArch: i386 x86_64 ppc BuildRequires: ghc BuildRequires: ... %description Description of %{name}. %prep %setup -q %build %cabal_configure %cabal_build %install rm -rf ${RPM_BUILD_ROOT} %cabal_install %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root,-) %doc LICENSE %{_bindir}/%{name} %changelog * Day Month Date Year Fedora Haskell Packager <email@address> - version-release - initial packaging for Fedora