3 %bcond_with doc # build with docs (broken)
5 Summary: Tiling window manager
6 Summary(pl.UTF-8): Kafelkowy zarządca okien
11 Group: X11/Window Managers
12 Source0: http://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5: 3a45ffb3a46482da8d94873c48a79dfa
14 Source1: %{name}.desktop
15 URL: https://xmonad.org/
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-X11 >= 1.6
18 BuildRequires: ghc-extensible-exceptions
19 BuildRequires: ghc-mtl
20 BuildRequires: ghc-setlocale
21 BuildRequires: ghc-utf8-string >= 0.3
22 BuildRequires: rpmbuild(macros) >= 1.608
24 Requires: ghc-X11 >= 1.6
25 Requires: ghc-extensible-exceptions
27 Requires: ghc-setlocale
28 Requires: ghc-utf8-string >= 0.3
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 # debuginfo is not useful for ghc
32 %define _enable_debug_packages 0
33 %define _xdeskdir %{_datadir}/xsessions
36 xmonad is a tiling window manager for X. Windows are arranged
37 automatically to tile the screen without gaps or overlap, maximising
38 screen use. All features of the window manager are accessible from the
39 keyboard: a mouse is strictly optional. xmonad is written and
40 extensible in Haskell. Custom layout algorithms, and other extensions,
41 may be written by the user in config files. Layouts are applied
42 dynamically, and different layouts may be used on each workspace.
43 Xinerama is fully supported, allowing windows to be tiled on several
46 %description -l pl.UTF-8
47 xmonad to kafelkowy zarządca okien dla X. Okna są układane
48 automatycznie, aby pokryć ekran bez przerw ani zachodzenia,
49 maksymalizując wykorzystanie ekranu. Wszystkie możliwości zarządcy są
50 dostępne z klawiatury - myszka jest całkowicie opcjonalna. xmonad jest
51 napisany i rozszerzalny w Haskellu. Użytkownik w plikach
52 konfiguracyjnych może dopisywać własne algorytmy układu i inne
53 rozszerzenia. Układy są stosowane dynamicznie, a każda przestrzeń
54 robocza może mieć swój. Xinerama jest w pełni obsługiwana, pozwalając
55 na rozłożenie okien na kilku ekranach.
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}
78 runhaskell Setup.lhs build
80 runhaskell Setup.lhs haddock --executables
84 rm -rf $RPM_BUILD_ROOT
85 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
87 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT{%{_deskdir},%{_xdeskdir}}
90 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_xdeskdir}/%{name}.desktop
92 # work around automatic haddock docs installation
93 rm -rf %{name}-%{version}-doc
95 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
97 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
99 install -d $RPM_BUILD_ROOT%{_mandir}/man1
100 cp -p man/xmonad.1 $RPM_BUILD_ROOT%{_mandir}/man1
102 runhaskell Setup.lhs register \
103 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
106 rm -rf $RPM_BUILD_ROOT
115 %defattr(644,root,root,755)
116 %doc man/xmonad.hs CHANGES.md CONFIG LICENSE README.md
117 %attr(755,root,root) %{_bindir}/xmonad
118 %{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
119 %{_libdir}/%{ghcdir}/%{name}-%{version}
120 %{_mandir}/man1/xmonad.1*
121 %{_xdeskdir}/%{name}.desktop
125 %defattr(644,root,root,755)
126 %doc %{name}-%{version}-doc/*