From d8a48682e5351d0ba56edfb7c07d6e6207724b3c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 18 Nov 2012 16:45:32 +0900 Subject: [PATCH] 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 | 46 +++++++++++++++------------------------ 2 files changed, 17 insertions(+), 41 deletions(-) delete mode 100644 xmobar-0.15-mtl-2.1.patch diff --git a/xmobar-0.15-mtl-2.1.patch b/xmobar-0.15-mtl-2.1.patch deleted file mode 100644 index 591a81c..0000000 --- a/xmobar-0.15-mtl-2.1.patch +++ /dev/null @@ -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.* - 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} +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 - 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 - 0.15-3 - allow building with stm-2.4