From Fedora Project Wiki
< PackagingDrafts | Haskell
m (1 revision(s)) |
No edit summary |
||
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. It contains a few minor bugs, including missing dependency declarations. This is due to a limitation in cabal-rpm that needs to be fixed. | 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. | ||
<pre> | <pre> | ||
%define hsc_name ghc | %define hsc_name ghc | ||
%define hsc_version 6.8.2 | %define hsc_version 6.8.2 | ||
#The first one might be upper case, the second one isn't. | |||
%define h_pkg_name xmobar | %define h_pkg_name xmobar | ||
%define f_pkg_name xmobar | %define f_pkg_name xmobar | ||
Line 13: | Line 12: | ||
%define debug_package %{nil} | %define debug_package %{nil} | ||
#Haskell compilers do not traditionally emit DWARF data. | |||
Name: %{f_pkg_name} | Name: %{f_pkg_name} | ||
Version: 0. | Version: 0.9 | ||
Release: | Release: 2%{?dist} | ||
License: BSD | License: BSD | ||
Group: | Group: User Interface/X | ||
URL: http://code.haskell.org/~arossato/xmobar | URL: http://code.haskell.org/~arossato/xmobar | ||
Source: xmobar-0. | Source: http://hackage.haskell.org/packages/archive/xmobar/0.9/xmobar-0.9.tar.gz | ||
Summary: A Minimalistic Text Based Status Bar | Summary: A Minimalistic Text Based Status Bar | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
BuildRequires: ghc = 6.8.2 | BuildRequires: ghc = 6.8.2, ghc682-prof | ||
BuildRequires: libXinerama-devel, libX11-devel, libXext-devel | |||
BuildRequires: ghc-x11 = 1.4.1, ghc-x11-prof = 1.4.1 | |||
Requires: ghc = %{hsc_version} | |||
Requires: ghc-x11 = 1.4.1 | |||
Line 43: | Line 47: | ||
%description -n %{hsc_name}-%{f_pkg_name}-prof | %description -n %{hsc_name}-%{f_pkg_name}-prof | ||
Xmobar is a minimalistic text based status bar. | Xmobar is a minimalistic text based status bar. | ||
p | |||
Inspired by the Ion3 status bar, it supports similar features, | Inspired by the Ion3 status bar, it supports similar features, | ||
like dynamic color management, output templates, and extensibility | like dynamic color management, output templates, and extensibility | ||
Line 56: | Line 60: | ||
%build | %build | ||
if [ -f configure.ac -a ! -f configure ] ; then autoreconf; fi | if [ -f configure.ac -a ! -f configure ]; then autoreconf; fi | ||
runghc Setup configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{hsc_name}-%{f_pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --enable-library-profiling --ghc | runghc Setup configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{hsc_name}-%{f_pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --enable-library-profiling --ghc | ||
runghc Setup build | runghc Setup build | ||
Line 66: | Line 70: | ||
cd ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{hsc_name}-%{f_pkg_name}-%{version} | cd ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{hsc_name}-%{f_pkg_name}-%{version} | ||
rm -rf doc LICENSE | rm -rf doc LICENSE README | ||
Line 80: | Line 84: | ||
%changelog | %changelog | ||
* | * Wed Jul 2 2008 Yaakov M. Nemoy <yankee@koan> - 0.9-2 | ||
- Changed Group | |||
- changed Source | |||
- added BuildRequires | |||
- added Requires | |||
* Wed Jul 02 2008 cabal-rpm <cabal-devel@haskell.org> - 0.9-1 | |||
- spec file autogenerated by cabal-rpm | - spec file autogenerated by cabal-rpm | ||
</pre> | </pre> |
Revision as of 15:33, 2 July 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.2 #The first one might be upper case, the second one isn't. %define h_pkg_name xmobar %define f_pkg_name xmobar %define pkg_libdir %{_libdir}/%{hsc_name}-%{hsc_version}/%{h_pkg_name}-%{version} %define tar_dir %{_builddir}/%{?buildsubdir} %define debug_package %{nil} #Haskell compilers do not traditionally emit DWARF data. Name: %{f_pkg_name} Version: 0.9 Release: 2%{?dist} License: BSD Group: User Interface/X URL: http://code.haskell.org/~arossato/xmobar Source: http://hackage.haskell.org/packages/archive/xmobar/0.9/xmobar-0.9.tar.gz Summary: A Minimalistic Text Based Status Bar BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ghc = 6.8.2, ghc682-prof BuildRequires: libXinerama-devel, libX11-devel, libXext-devel BuildRequires: ghc-x11 = 1.4.1, ghc-x11-prof = 1.4.1 Requires: ghc = %{hsc_version} Requires: ghc-x11 = 1.4.1 %description Xmobar is a minimalistic text based status bar. Inspired by the Ion3 status bar, it supports similar features, like dynamic color management, output templates, and extensibility through plugins. %package -n %{hsc_name}-%{f_pkg_name}-prof Summary: Profiling libraries for %{hsc_name}-%{f_pkg_name} Group: Development/Libraries Requires: %{hsc_name}-%{f_pkg_name} = %{version} Provides: %{h_pkg_name}-%{hsc_name}-%{hsc_version}-prof = %{version} %description -n %{hsc_name}-%{f_pkg_name}-prof Xmobar is a minimalistic text based status bar. p Inspired by the Ion3 status bar, it supports similar features, like dynamic color management, output templates, and extensibility through plugins. This package contains profiling libraries for %{hsc_name} %{hsc_version}. %prep %setup -q -n %{h_pkg_name}-%{version} %build if [ -f configure.ac -a ! -f configure ]; then autoreconf; fi runghc Setup configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{hsc_name}-%{f_pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --enable-library-profiling --ghc runghc Setup build %install rm -rf ${RPM_BUILD_ROOT} runghc Setup copy --destdir=${RPM_BUILD_ROOT} cd ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{hsc_name}-%{f_pkg_name}-%{version} rm -rf doc LICENSE README %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root,-) %{_bindir}/xmobar %doc LICENSE %changelog * Wed Jul 2 2008 Yaakov M. Nemoy <yankee@koan> - 0.9-2 - Changed Group - changed Source - added BuildRequires - added Requires * Wed Jul 02 2008 cabal-rpm <cabal-devel@haskell.org> - 0.9-1 - spec file autogenerated by cabal-rpm