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

Jens Petersen petersen at fedoraproject.org
Sun Nov 18 07:45:45 UTC 2012


commit d8a48682e5351d0ba56edfb7c07d6e6207724b3c
Author: Jens Petersen <petersen at redhat.com>
Date:   Sun Nov 18 16:45:32 2012 +0900

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

 xmobar-0.15-mtl-2.1.patch |   12 ------------
 xmobar.spec               |   44 ++++++++++++++++----------------------------
 2 files changed, 16 insertions(+), 40 deletions(-)
---
diff --git a/xmobar.spec b/xmobar.spec
index 2e175b8..01a33c2 100644
--- a/xmobar.spec
+++ b/xmobar.spec
@@ -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}
-BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-rpm-macros
-# END cabal2spec
 Source1:        xmobar.desktop
+Patch0:         xmobar-flags.patch
 Patch1:         xmobar-0.13-default-fonts.patch
-Patch2:         xmobar-0.15-mtl-2.1.patch
 
-%if %{with alsa}
-BuildRequires:  ghc-alsa-mixer-devel
-%endif
+BuildRequires:  ghc-Cabal-devel
+BuildRequires:  ghc-rpm-macros
+# 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 at 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 at redhat.com> - 0.15-3
 - allow building with stm-2.4
 


More information about the scm-commits mailing list