Update to cabal2spec-0.24
xmonadpropwrite.hs is in the tarball again
This commit is contained in:
parent
53a5330f6e
commit
e886df4c06
49
xmobar.spec
49
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 hinotify
|
||||||
%bcond_without libmpd
|
%bcond_without libmpd
|
||||||
%bcond_with iwlib
|
%bcond_without iwlib
|
||||||
|
%bcond_with alsa
|
||||||
|
|
||||||
Name: xmobar
|
Name: xmobar
|
||||||
Version: 0.13
|
Version: 0.13
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: A minimalistic text-based status bar
|
Summary: A minimalistic text-based status bar
|
||||||
|
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
License: BSD
|
License: BSD
|
||||||
|
# BEGIN: cabal2spec-0.24
|
||||||
URL: http://hackage.haskell.org/package/%{name}
|
URL: http://hackage.haskell.org/package/%{name}
|
||||||
Source0: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
|
Source0: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
|
||||||
Source1: xmobar.desktop
|
Source1: xmobar.desktop
|
||||||
# Not in the package from Hackage.
|
Patch1: xmobar-0.13-default-fonts.patch
|
||||||
# https://github.com/jaor/xmobar/issues/#issue/6
|
|
||||||
Source2: xmonadpropwrite.hs
|
|
||||||
ExclusiveArch: %{ghc_arches}
|
ExclusiveArch: %{ghc_arches}
|
||||||
BuildRequires: ghc-Cabal-devel
|
BuildRequires: ghc-Cabal-devel
|
||||||
BuildRequires: ghc-rpm-macros
|
BuildRequires: ghc-rpm-macros
|
||||||
BuildRequires: ghc-X11-devel >= 1.3.0
|
# END: cabal2spec-0.24
|
||||||
BuildRequires: ghc-X11-xft-devel
|
|
||||||
BuildRequires: ghc-mtl-devel
|
%if %{with alsa}
|
||||||
BuildRequires: ghc-parsec-devel
|
BuildRequires: ghc-alsa-mixer-devel
|
||||||
BuildRequires: ghc-stm-devel
|
%endif
|
||||||
BuildRequires: ghc-utf8-string-devel
|
BuildRequires: ghc-bytestring-devel
|
||||||
|
BuildRequires: ghc-containers-devel
|
||||||
|
BuildRequires: ghc-directory-devel
|
||||||
|
BuildRequires: ghc-filepath-devel
|
||||||
%if %{with hinotify}
|
%if %{with hinotify}
|
||||||
BuildRequires: ghc-hinotify-devel
|
BuildRequires: ghc-hinotify-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with libmpd}
|
%if %{with libmpd}
|
||||||
BuildRequires: ghc-libmpd-devel
|
BuildRequires: ghc-libmpd-devel
|
||||||
%endif
|
%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
|
BuildRequires: desktop-file-utils
|
||||||
%if %{with iwlib}
|
%if %{with iwlib}
|
||||||
BuildRequires: wireless-tools-devel
|
BuildRequires: wireless-tools-devel
|
||||||
%endif
|
%endif
|
||||||
Patch1: xmobar-0.13-default-fonts.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Inspired by the Ion3 status bar, it supports similar features, like dynamic
|
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
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .orig
|
%patch1 -p1 -b .fonts
|
||||||
mkdir scripts
|
|
||||||
cp %{SOURCE2} scripts/xmonadpropwrite.hs
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -76,6 +91,10 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 25 2011 Ben Boeckel <mathstuf@gmail.com> - 0.13-5
|
||||||
|
- Update to cabal2spec-0.24
|
||||||
|
- xmonadpropwrite.hs is in the tarball again
|
||||||
|
|
||||||
* Fri Jul 22 2011 Jens Petersen <petersen@redhat.com> - 0.13-4
|
* Fri Jul 22 2011 Jens Petersen <petersen@redhat.com> - 0.13-4
|
||||||
- reenable hinotify
|
- reenable hinotify
|
||||||
|
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
-- Copyright Spencer Janssen <spencerjanssen@gmail.com>
|
|
||||||
-- Tomas Janousek <tomi@nomi.cz>
|
|
||||||
-- 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
|
|
Loading…
Reference in New Issue
Block a user