From Fedora Project Wiki
< PackagingDrafts | Haskell
No edit summary |
|||
Line 4: | Line 4: | ||
<pre> | <pre> | ||
%define hsc_name ghc | %define hsc_name ghc | ||
%define hsc_version 6.8. | %define hsc_version 6.8.3 | ||
# Haskell compilers do not traditionally emit DWARF data. | |||
%define debug_package %{nil} | %define debug_package %{nil} | ||
Name: | Name: haProg | ||
Version: 0.9 | Version: 0.9 | ||
Release: 2%{?dist} | Release: 2%{?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) | ||
BuildRequires: | BuildRequires: %{hsc_name} = %{hsc_version}, %{hsc_name}-prof = %{hsc_version} | ||
BuildRequires: | BuildRequires: ... | ||
%description | %description | ||
Description of %{name}. | |||
%prep | %prep | ||
%setup -q -n %{ | %setup -q -n %{name}-%{version} | ||
Line 61: | Line 38: | ||
%ghc_install | %ghc_install | ||
cd ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{hsc_name}-%{ | cd ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{hsc_name}-%{name}-%{version} | ||
rm -rf doc LICENSE README | rm -rf doc LICENSE README | ||
Line 71: | Line 48: | ||
%files | %files | ||
%defattr(-,root,root,-) | %defattr(-,root,root,-) | ||
%doc LICENSE | %doc LICENSE | ||
%{_bindir}/%{name} | |||
Revision as of 07:32, 22 August 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 generated automatically using cabal-rpm. It contains a few minor bugs, including missing dependency declarations. This is due to a limitation in cabal-rpm that needs to be fixed. They have been added in manually.
%define hsc_name ghc %define hsc_version 6.8.3 # Haskell compilers do not traditionally emit DWARF data. %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: %{hsc_name} = %{hsc_version}, %{hsc_name}-prof = %{hsc_version} BuildRequires: ... %description Description of %{name}. %prep %setup -q -n %{name}-%{version} %build %ghc_autotools -p enable %ghc_build %install rm -rf ${RPM_BUILD_ROOT} %ghc_install cd ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{hsc_name}-%{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