3 %bcond_with doc # build with docs (broken)
5 Summary: Tiling window manager
10 Group: X11/Window Managers
11 Source0: http://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
12 # Source0-md5: 3a45ffb3a46482da8d94873c48a79dfa
13 Source1: %{name}.desktop
14 URL: http://www.xmonad.org
15 BuildRequires: ghc >= 6.12.3
16 BuildRequires: ghc-X11 >= 1.6
17 BuildRequires: ghc-extensible-exceptions
18 BuildRequires: ghc-mtl
19 BuildRequires: ghc-setlocale
20 BuildRequires: ghc-utf8-string >= 0.3
21 BuildRequires: rpmbuild(macros) >= 1.608
23 Requires: ghc-X11 >= 1.6
24 Requires: ghc-extensible-exceptions
26 Requires: ghc-setlocale
27 Requires: ghc-utf8-string >= 0.3
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 # debuginfo is not useful for ghc
31 %define _enable_debug_packages 0
32 %define _xdeskdir %{_datadir}/xsessions
35 xmonad is a tiling window manager for X. Windows are arranged
36 automatically to tile the screen without gaps or overlap, maximising
37 screen use. All features of the window manager are accessible from the
38 keyboard: a mouse is strictly optional. xmonad is written and
39 extensible in Haskell. Custom layout algorithms, and other extensions,
40 may be written by the user in config files. Layouts are applied
41 dynamically, and different layouts may be used on each workspace.
42 Xinerama is fully supported, allowing windows to be tiled on several
46 Summary: HTML documentation for %{name}
47 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{name}
51 HTML documentation for %{name}.
53 %description doc -l pl.UTF-8
54 Dokumentacja w formacie HTML dla %{name}.
60 runhaskell Setup.lhs configure -v2 \
63 --libexecdir=%{_libexecdir} \
64 --docdir=%{_docdir}/%{name}-%{version}
66 runhaskell Setup.lhs build
68 runhaskell Setup.lhs haddock --executables
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
75 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
77 install -d $RPM_BUILD_ROOT{%{_deskdir},%{_xdeskdir}}
78 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_xdeskdir}/%{name}.desktop
80 # work around automatic haddock docs installation
81 rm -rf %{name}-%{version}-doc
83 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
85 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
87 install -d $RPM_BUILD_ROOT%{_mandir}/man1
88 cp -p man/xmonad.1 $RPM_BUILD_ROOT%{_mandir}/man1
90 runhaskell Setup.lhs register \
91 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
94 rm -rf $RPM_BUILD_ROOT
103 %defattr(644,root,root,755)
104 %doc man/xmonad.hs CHANGES.md CONFIG LICENSE README.md
105 %attr(755,root,root) %{_bindir}/xmonad
106 %{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
107 %{_libdir}/%{ghcdir}/%{name}-%{version}
108 %{_mandir}/man1/xmonad.1*
109 %{_xdeskdir}/%{name}.desktop
113 %defattr(644,root,root,755)
114 %doc %{name}-%{version}-doc/*