From e886df4c06c8e6e945d4e7bea1568487aab8c0ca Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 9 Jul 2011 02:01:28 -0400 Subject: [PATCH] Update to cabal2spec-0.24 xmonadpropwrite.hs is in the tarball again --- xmobar.spec | 49 ++++++++++++++++++++++++++++++++-------------- xmonadpropwrite.hs | 41 -------------------------------------- 2 files changed, 34 insertions(+), 56 deletions(-) delete mode 100644 xmonadpropwrite.hs diff --git a/xmobar.spec b/xmobar.spec index f823a5f..17a492e 100644 --- a/xmobar.spec +++ b/xmobar.spec @@ -1,40 +1,57 @@ +# For Haskell Packaging Guidelines see: +# - https://fedoraproject.org/wiki/Packaging:Haskell +# - https://fedoraproject.org/wiki/PackagingDrafts/Haskell + %bcond_without hinotify %bcond_without libmpd -%bcond_with iwlib +%bcond_without iwlib +%bcond_with alsa Name: xmobar Version: 0.13 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A minimalistic text-based status bar Group: User Interface/X License: BSD +# BEGIN: cabal2spec-0.24 URL: http://hackage.haskell.org/package/%{name} Source0: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz Source1: xmobar.desktop -# Not in the package from Hackage. -# https://github.com/jaor/xmobar/issues/#issue/6 -Source2: xmonadpropwrite.hs +Patch1: xmobar-0.13-default-fonts.patch ExclusiveArch: %{ghc_arches} BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros -BuildRequires: ghc-X11-devel >= 1.3.0 -BuildRequires: ghc-X11-xft-devel -BuildRequires: ghc-mtl-devel -BuildRequires: ghc-parsec-devel -BuildRequires: ghc-stm-devel -BuildRequires: ghc-utf8-string-devel +# END: cabal2spec-0.24 + +%if %{with alsa} +BuildRequires: ghc-alsa-mixer-devel +%endif +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 BuildRequires: desktop-file-utils %if %{with iwlib} BuildRequires: wireless-tools-devel %endif -Patch1: xmobar-0.13-default-fonts.patch %description Inspired by the Ion3 status bar, it supports similar features, like dynamic @@ -43,9 +60,7 @@ color management, output templates, and extensibility through plugins. %prep %setup -q -%patch1 -p1 -b .orig -mkdir scripts -cp %{SOURCE2} scripts/xmonadpropwrite.hs +%patch1 -p1 -b .fonts %build @@ -76,6 +91,10 @@ popd %changelog +* Mon Jul 25 2011 Ben Boeckel - 0.13-5 +- Update to cabal2spec-0.24 +- xmonadpropwrite.hs is in the tarball again + * Fri Jul 22 2011 Jens Petersen - 0.13-4 - reenable hinotify diff --git a/xmonadpropwrite.hs b/xmonadpropwrite.hs deleted file mode 100644 index f3f4a5d..0000000 --- a/xmonadpropwrite.hs +++ /dev/null @@ -1,41 +0,0 @@ --- Copyright Spencer Janssen --- Tomas Janousek --- BSD3 (see LICENSE) --- --- Reads from standard input and writes to an X propery on root window. --- To be used with XPropertyLog: --- Add it to commands: --- Run XPropertyLog "_XMONAD_LOG_CUSTOM" --- Add it to the template: --- template = "... %_XMONAD_LOG_CUSTOM% ..." --- Run: --- $ blah blah | xmonadpropwrite _XMONAD_LOG_CUSTOM - -import Control.Monad -import Graphics.X11 -import Graphics.X11.Xlib.Extras -import qualified Data.ByteString as B -import Foreign.C (CChar) -import System.IO -import System.Environment - -main = do - atom <- flip fmap getArgs $ \args -> case args of - [a] -> a - _ -> "_XMONAD_LOG" - - d <- openDisplay "" - xlog <- internAtom d atom False - ustring <- internAtom d "UTF8_STRING" False - - root <- rootWindow d (defaultScreen d) - - forever $ do - msg <- B.getLine - changeProperty8 d root xlog ustring propModeReplace (encodeCChar msg) - sync d True - - return () - -encodeCChar :: B.ByteString -> [CChar] -encodeCChar = map fromIntegral . B.unpack