]>
Commit | Line | Data |
---|---|---|
109d9bb2 JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with doc # build with docs (broken) | |
4 | # | |
95aecafe | 5 | Summary: Tiling window manager |
851bd102 | 6 | Summary(pl.UTF-8): Kafelkowy zarządca okien |
95aecafe | 7 | Name: xmonad |
6fcab6ed | 8 | Version: 0.15 |
f58bcee4 | 9 | Release: 4 |
95aecafe JP |
10 | License: BSD |
11 | Group: X11/Window Managers | |
c9815d67 | 12 | Source0: http://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz |
6fcab6ed | 13 | # Source0-md5: 3a45ffb3a46482da8d94873c48a79dfa |
95aecafe | 14 | Source1: %{name}.desktop |
851bd102 | 15 | URL: https://xmonad.org/ |
95aecafe | 16 | BuildRequires: ghc >= 6.12.3 |
c9815d67 | 17 | BuildRequires: ghc-X11 >= 1.6 |
ce57e46f | 18 | BuildRequires: ghc-extensible-exceptions |
95aecafe | 19 | BuildRequires: ghc-mtl |
366777fb | 20 | BuildRequires: ghc-setlocale |
109d9bb2 | 21 | BuildRequires: ghc-utf8-string >= 0.3 |
95aecafe JP |
22 | BuildRequires: rpmbuild(macros) >= 1.608 |
23 | %requires_eq ghc | |
0b85440e JR |
24 | Requires: ghc-X11 >= 1.6 |
25 | Requires: ghc-extensible-exceptions | |
26 | Requires: ghc-mtl | |
27 | Requires: ghc-setlocale | |
28 | Requires: ghc-utf8-string >= 0.3 | |
95aecafe JP |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | # debuginfo is not useful for ghc | |
32 | %define _enable_debug_packages 0 | |
33 | %define _xdeskdir %{_datadir}/xsessions | |
34 | ||
35 | %description | |
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 | |
44 | screens. | |
45 | ||
851bd102 JB |
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. | |
56 | ||
95aecafe JP |
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 | ||
78 | runhaskell Setup.lhs build | |
109d9bb2 | 79 | %if %{with doc} |
95aecafe | 80 | runhaskell Setup.lhs haddock --executables |
109d9bb2 | 81 | %endif |
95aecafe JP |
82 | |
83 | %install | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
86 | ||
87 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
88 | ||
89 | install -d $RPM_BUILD_ROOT{%{_deskdir},%{_xdeskdir}} | |
c9815d67 | 90 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_xdeskdir}/%{name}.desktop |
95aecafe JP |
91 | |
92 | # work around automatic haddock docs installation | |
93 | rm -rf %{name}-%{version}-doc | |
109d9bb2 | 94 | %if %{with doc} |
95aecafe | 95 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc |
109d9bb2 | 96 | %endif |
95aecafe JP |
97 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
98 | ||
95aecafe | 99 | install -d $RPM_BUILD_ROOT%{_mandir}/man1 |
c9815d67 | 100 | cp -p man/xmonad.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
95aecafe JP |
101 | |
102 | runhaskell Setup.lhs register \ | |
103 | --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf | |
104 | ||
105 | %clean | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
108 | %post | |
109 | %ghc_pkg_recache | |
110 | ||
111 | %postun | |
112 | %ghc_pkg_recache | |
113 | ||
114 | %files | |
115 | %defattr(644,root,root,755) | |
6fcab6ed | 116 | %doc man/xmonad.hs CHANGES.md CONFIG LICENSE README.md |
95aecafe JP |
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 | |
122 | ||
109d9bb2 | 123 | %if %{with doc} |
95aecafe JP |
124 | %files doc |
125 | %defattr(644,root,root,755) | |
126 | %doc %{name}-%{version}-doc/* | |
109d9bb2 | 127 | %endif |