2 %bcond_without alsa # don't use alsa
3 %bcond_without datezone # don't use datezone
4 %bcond_without dbus # don't use dbus
5 %bcond_without inotify # don't use inotify
6 %bcond_without mpd # don't use mpd
7 %bcond_without xft # don't use xft
9 Summary: Minimalistic, text based, status bar
14 Group: X11/Window Managers
15 Source0: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5: dd92f64600830054458494e75bf90824
17 URL: http://projects.haskell.org/xmobar/
18 BuildRequires: ghc >= 6.12.3
19 %{?with_alsa:BuildRequires: ghc-alsa-core >= 0.5}
20 %{?with_alsa:BuildRequires: ghc-alsa-mixer >= 0.2}
21 %{?with_dbus:BuildRequires: ghc-dbus >= 0.10}
22 %{?with_inotify:BuildRequires: ghc-hinotify >= 0.3}
23 %{?with_mpd:BuildRequires: ghc-libmpd >= 0.9}
24 BuildRequires: ghc-mtl >= 2.2.1
25 BuildRequires: ghc-parsec >= 3.1
26 BuildRequires: ghc-regex-compat
27 BuildRequires: ghc-stm >= 2.3
28 %{?with_datezone:BuildRequires: ghc-timezone-olson >= 0.1}
29 %{?with_datezone:BuildRequires: ghc-timezone-series >= 0.1}
30 BuildRequires: ghc-utf8-string
31 BuildRequires: ghc-X11 >= 1.6
32 %{?with_xft:BuildRequires: ghc-X11-xft >= 0.2}
33 BuildRequires: rpmbuild(macros) >= 1.608
35 %{?with_alsa:Requires: ghc-alsa-core >= 0.5}
36 %{?with_alsa:Requires: ghc-alsa-mixer >= 0.1}
37 %{?with_dbus:Requires: ghc-dbus >= 0.10}
38 %{?with_inotify:Requires: ghc-hinotify >= 0.3}
39 %{?with_mpd:Requires: ghc-libmpd >= 0.9}
40 Requires: ghc-mtl >= 2.2.1
41 Requires: ghc-parsec >= 3.1
42 Requires: ghc-regex-compat
43 Requires: ghc-stm >= 2.3
44 %{?with_datezone:Requires: ghc-timezone-olson >= 0.1}
45 %{?with_datezone:Requires: ghc-timezone-series >= 0.1}
46 Requires: ghc-utf8-string
47 Requires: ghc-X11 >= 1.6.1
48 %{?with_xft:Requires: ghc-X11-xft >= 0.2}
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 # debuginfo is not useful for ghc
52 %define _enable_debug_packages 0
55 Minimalistic, text based, status bar.
58 Summary: HTML documentation for %{name}
59 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{name}
63 HTML documentation for %{name}.
65 %description doc -l pl.UTF-8
66 Dokumentacja w formacie HTML dla %{name}.
72 runhaskell Setup.lhs configure -v2 \
75 --libexecdir=%{_libexecdir} \
76 --docdir=%{_docdir}/%{name}-%{version} \
77 %{?with_alsa:--flags="with_alsa"} \
78 %{?with_datezone:--flags="with_datezone"} \
79 %{?with_dbus:--flags="with_dbus"} \
80 %{?with_inotify:--flags="with_inotify"} \
81 %{?with_mpd:--flags="with_mpd"} \
82 %{?with_xft:--flags="with_xft"}
84 runhaskell Setup.lhs build
85 runhaskell Setup.lhs haddock --executables
88 rm -rf $RPM_BUILD_ROOT
90 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
92 # work around automatic haddock docs installation
93 rm -rf %{name}-%{version}-doc
94 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
95 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
98 rm -rf $RPM_BUILD_ROOT
101 %defattr(644,root,root,755)
102 %attr(755,root,root) %{_bindir}/xmobar
105 %defattr(644,root,root,755)
106 %doc %{name}-%{version}-doc/*