From Fedora Project Wiki
< PackagingDrafts | Haskell
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
%define hsc_name ghc | %define hsc_name ghc | ||
%define hsc_version 6.8.2 | %define hsc_version 6.8.2 | ||
%define pkg_name xmobar | |||
%define pkg_libdir %{_libdir}/%{hsc_name}-%{hsc_version}/%{pkg_name}-%{version} | |||
%define | |||
%define pkg_libdir %{_libdir}/%{hsc_name}-%{hsc_version}/%{ | |||
%define debug_package %{nil} | %define debug_package %{nil} | ||
#Haskell compilers do not traditionally emit DWARF data. | #Haskell compilers do not traditionally emit DWARF data. | ||
Name: %{ | Name: %{pkg_name} | ||
Version: 0.9 | Version: 0.9 | ||
Release: 2%{?dist} | Release: 2%{?dist} | ||
License: BSD | License: BSD | ||
Group: | Group: Development/Languages | ||
URL: http://code.haskell.org/~arossato/xmobar | URL: http://code.haskell.org/~arossato/xmobar | ||
Source: http://hackage.haskell.org/packages/archive/xmobar/0.9/xmobar-0.9.tar.gz | Source: http://hackage.haskell.org/packages/archive/xmobar/0.9/xmobar-0.9.tar.gz | ||
Line 26: | Line 23: | ||
BuildRequires: libXinerama-devel, libX11-devel, libXext-devel | BuildRequires: libXinerama-devel, libX11-devel, libXext-devel | ||
BuildRequires: ghc-x11 = 1.4.1, ghc-x11-prof = 1.4.1 | BuildRequires: ghc-x11 = 1.4.1, ghc-x11-prof = 1.4.1 | ||
%description | %description | ||
Line 38: | Line 32: | ||
%package -n %{hsc_name}-%{ | %package -n %{hsc_name}-%{pkg_name}-prof | ||
Summary: Profiling libraries for %{hsc_name}-%{ | Summary: Profiling libraries for %{hsc_name}-%{pkg_name} | ||
Group: Development/Libraries | Group: Development/Libraries | ||
Requires: %{hsc_name}-%{ | Requires: %{hsc_name}-%{pkg_name} = %{version} | ||
%description -n %{hsc_name}-%{ | %description -n %{hsc_name}-%{pkg_name}-prof | ||
Xmobar is a minimalistic text based status bar. | Xmobar is a minimalistic text based status bar. | ||
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 49: | ||
%prep | %prep | ||
%setup -q -n %{ | %setup -q -n %{pkg_name}-%{version} | ||
%build | %build | ||
%ghc_autotools -p enable | |||
%ghc_build | |||
%install | %install | ||
rm -rf ${RPM_BUILD_ROOT} | rm -rf ${RPM_BUILD_ROOT} | ||
%ghc_install | |||
cd ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{hsc_name}-%{ | cd ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{hsc_name}-%{pkg_name}-%{version} | ||
rm -rf doc LICENSE README | rm -rf doc LICENSE README | ||
Line 84: | Line 76: | ||
%changelog | %changelog | ||
* Wed | * Wed Aug 13 2008 Yaakov M. Nemoy <yankee@koan> - 0.9-2 | ||
- changed source | |||
- changed | - added requirements | ||
- added | |||
* Wed | * Wed Aug 13 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 14:42, 13 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.2 %define pkg_name xmobar %define pkg_libdir %{_libdir}/%{hsc_name}-%{hsc_version}/%{pkg_name}-%{version} %define debug_package %{nil} #Haskell compilers do not traditionally emit DWARF data. Name: %{pkg_name} Version: 0.9 Release: 2%{?dist} License: BSD Group: Development/Languages 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 %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}-%{pkg_name}-prof Summary: Profiling libraries for %{hsc_name}-%{pkg_name} Group: Development/Libraries Requires: %{hsc_name}-%{pkg_name} = %{version} %description -n %{hsc_name}-%{pkg_name}-prof 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. This package contains profiling libraries for %{hsc_name} %{hsc_version}. %prep %setup -q -n %{pkg_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}-%{pkg_name}-%{version} rm -rf doc LICENSE README %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root,-) %{_bindir}/xmobar %doc LICENSE %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