update with cabal-rpm; use cabal-tweak-dep-ver for mtl; set flags with patch

This commit is contained in:
Jens Petersen 2012-11-18 16:45:32 +09:00
parent 4e5dc89b34
commit d8a48682e5
2 changed files with 17 additions and 41 deletions

View File

@ -1,12 +0,0 @@
diff -up xmobar-0.15/xmobar.cabal~ xmobar-0.15/xmobar.cabal
--- xmobar-0.15/xmobar.cabal~ 2012-06-04 09:55:49.000000000 +0900
+++ xmobar-0.15/xmobar.cabal 2012-06-11 12:35:33.020448077 +0900
@@ -112,7 +112,7 @@ executable xmobar
time,
filepath,
X11 == 1.6.*,
- mtl == 2.0.*,
+ mtl >= 2.0 && <2.2,
parsec == 3.1.*,
stm == 2.3.*

View File

@ -1,58 +1,41 @@
# cabal2spec-0.25.2
# https://fedoraproject.org/wiki/Packaging:Haskell
# https://fedoraproject.org/wiki/PackagingDrafts/Haskell
%bcond_without hinotify
%bcond_without libmpd
%bcond_without iwlib
%bcond_with alsa
Name: xmobar
Version: 0.15
Release: 3%{?dist}
Release: 4%{?dist}
Summary: A minimalistic text-based status bar
Group: User Interface/X
License: BSD
# BEGIN cabal2spec
URL: http://hackage.haskell.org/package/%{name}
Source0: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
ExclusiveArch: %{ghc_arches}
Source1: xmobar.desktop
Patch0: xmobar-flags.patch
Patch1: xmobar-0.13-default-fonts.patch
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
# END cabal2spec
Source1: xmobar.desktop
Patch1: xmobar-0.13-default-fonts.patch
Patch2: xmobar-0.15-mtl-2.1.patch
%if %{with alsa}
BuildRequires: ghc-alsa-mixer-devel
%endif
# Begin cabal-rpm deps:
BuildRequires: ghc-X11-devel
BuildRequires: ghc-X11-xft-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-directory-devel
BuildRequires: ghc-filepath-devel
%if %{with hinotify}
BuildRequires: ghc-hinotify-devel
%endif
%if %{with libmpd}
BuildRequires: ghc-libmpd-devel
%endif
BuildRequires: ghc-mtl-devel
BuildRequires: ghc-old-locale-devel
BuildRequires: ghc-old-time-devel
BuildRequires: ghc-parsec-devel
BuildRequires: ghc-process-devel
BuildRequires: ghc-stm-devel
BuildRequires: ghc-time-devel
BuildRequires: ghc-unix-devel
BuildRequires: ghc-utf8-string-devel
BuildRequires: ghc-X11-devel >= 1.3.0
BuildRequires: ghc-X11-xft-devel
# End cabal-rpm deps
BuildRequires: desktop-file-utils
%if %{with iwlib}
#BuildRequires: ghc-alsa-mixer-devel
BuildRequires: wireless-tools-devel
%endif
BuildRequires: libXrandr-devel
%description
@ -62,14 +45,14 @@ color management, output templates, and extensibility through plugins.
%prep
%setup -q
%patch0 -p1 -b .orig
%patch1 -p1 -b .fonts
%patch2 -p1 -b .orig
cabal-tweak-dep-ver mtl "== 2.0.*" ">= 2.0"
cabal-tweak-dep-ver stm "== 2.3.*" ">= 2.3"
%build
%define cabal_configure_options --flags="with_utf8 with_xft %{?with_hinotify:with_inotify} %{?with_libmpd:with_mpd} %{?with_iwlib:with_iwlib}"
%ghc_bin_build
cd samples
%{_bindir}/ghc %{!?ghc_without_dynamic:-dynamic} --make xmonadpropwrite.hs
@ -92,6 +75,11 @@ install --mode=0755 -p samples/xmonadpropwrite %{buildroot}%{_bindir}/xmonadprop
%changelog
* Sat Nov 17 2012 Jens Petersen <petersen@redhat.com> - 0.15-4
- update with cabal-rpm
- set flags with patch for cabal-rpm
- override mtl version with cabal-tweak-dep-ver
* Mon Oct 29 2012 Jens Petersen <petersen@redhat.com> - 0.15-3
- allow building with stm-2.4