]> git.pld-linux.org Git - packages/xmobar.git/blob - xmobar.spec
72ed5b380184528487f098d586eaa0452f9832a9
[packages/xmobar.git] / xmobar.spec
1 # Conditional build:
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
8 #
9 Summary:        Minimalistic, text based, status bar
10 Name:           xmobar
11 Version:        0.21
12 Release:        1
13 License:        BSD
14 Group:          X11/Window Managers
15 Source0:        http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5:  8d4442d3772ad9f475d96b955fda220d
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.8}
24 BuildRequires:  ghc-mtl >= 2.0
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
34 %requires_eq    ghc
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.8}
40 Requires:       ghc-mtl >= 2.0
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)
50
51 # debuginfo is not useful for ghc
52 %define         _enable_debug_packages  0
53
54 %description
55 Minimalistic, text based, status bar.
56
57 %package doc
58 Summary:        HTML documentation for %{name}
59 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla %{name}
60 Group:          Documentation
61
62 %description doc
63 HTML documentation for %{name}.
64
65 %description doc -l pl.UTF-8
66 Dokumentacja w formacie HTML dla %{name}.
67
68 %prep
69 %setup -q
70
71 %build
72 runhaskell Setup.lhs configure -v2 \
73         --prefix=%{_prefix} \
74         --libdir=%{_libdir} \
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"}
83
84 runhaskell Setup.lhs build
85 runhaskell Setup.lhs haddock --executables
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
91
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}
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %files
101 %defattr(644,root,root,755)
102 %attr(755,root,root) %{_bindir}/xmobar
103
104 %files doc
105 %defattr(644,root,root,755)
106 %doc %{name}-%{version}-doc/*
This page took 0.081003 seconds and 2 git commands to generate.