]>
Commit | Line | Data |
---|---|---|
95aecafe JP |
1 | Summary: Tiling window manager |
2 | Name: xmonad | |
c9815d67 | 3 | Version: 0.11.1 |
e2b8a282 | 4 | Release: 1 |
95aecafe JP |
5 | License: BSD |
6 | Group: X11/Window Managers | |
c9815d67 JP |
7 | Source0: http://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz |
8 | # Source0-md5: 20792f4e428db24e6c0dbecbd77f69e0 | |
95aecafe | 9 | Source1: %{name}.desktop |
b0c421b3 | 10 | Patch0: %{name}-border.patch |
95aecafe JP |
11 | URL: http://www.xmonad.org |
12 | BuildRequires: ghc >= 6.12.3 | |
c9815d67 | 13 | BuildRequires: ghc-X11 >= 1.6 |
ce57e46f | 14 | BuildRequires: ghc-extensible-exceptions |
95aecafe | 15 | BuildRequires: ghc-mtl |
95aecafe | 16 | BuildRequires: ghc-utf8-string |
95aecafe JP |
17 | BuildRequires: rpmbuild(macros) >= 1.608 |
18 | %requires_eq ghc | |
c9815d67 JP |
19 | %requires_releq ghc-extensible-exceptions |
20 | %requires_releq ghc-mtl | |
21 | %requires_releq ghc-utf8-string | |
22 | %requires_releq ghc-X11 | |
95aecafe JP |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | # debuginfo is not useful for ghc | |
26 | %define _enable_debug_packages 0 | |
27 | %define _xdeskdir %{_datadir}/xsessions | |
28 | ||
29 | %description | |
30 | xmonad is a tiling window manager for X. Windows are arranged | |
31 | automatically to tile the screen without gaps or overlap, maximising | |
32 | screen use. All features of the window manager are accessible from the | |
33 | keyboard: a mouse is strictly optional. xmonad is written and | |
34 | extensible in Haskell. Custom layout algorithms, and other extensions, | |
35 | may be written by the user in config files. Layouts are applied | |
36 | dynamically, and different layouts may be used on each workspace. | |
37 | Xinerama is fully supported, allowing windows to be tiled on several | |
38 | screens. | |
39 | ||
40 | %package doc | |
41 | Summary: HTML documentation for %{name} | |
42 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{name} | |
43 | Group: Documentation | |
44 | ||
45 | %description doc | |
46 | HTML documentation for %{name}. | |
47 | ||
48 | %description doc -l pl.UTF-8 | |
49 | Dokumentacja w formacie HTML dla %{name}. | |
50 | ||
51 | %prep | |
52 | %setup -q | |
b0c421b3 | 53 | %patch0 -p1 |
95aecafe JP |
54 | |
55 | %build | |
56 | runhaskell Setup.lhs configure -v2 \ | |
57 | --prefix=%{_prefix} \ | |
58 | --libdir=%{_libdir} \ | |
59 | --libexecdir=%{_libexecdir} \ | |
60 | --docdir=%{_docdir}/%{name}-%{version} | |
61 | ||
62 | runhaskell Setup.lhs build | |
63 | runhaskell Setup.lhs haddock --executables | |
64 | ||
65 | %install | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
68 | ||
69 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
70 | ||
71 | install -d $RPM_BUILD_ROOT{%{_deskdir},%{_xdeskdir}} | |
c9815d67 | 72 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_xdeskdir}/%{name}.desktop |
95aecafe JP |
73 | |
74 | # work around automatic haddock docs installation | |
75 | rm -rf %{name}-%{version}-doc | |
76 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc | |
77 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
78 | ||
79 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/man | |
80 | %{__rmdir} $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version} | |
81 | install -d $RPM_BUILD_ROOT%{_mandir}/man1 | |
c9815d67 | 82 | cp -p man/xmonad.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
95aecafe JP |
83 | |
84 | runhaskell Setup.lhs register \ | |
85 | --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf | |
86 | ||
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %post | |
91 | %ghc_pkg_recache | |
92 | ||
93 | %postun | |
94 | %ghc_pkg_recache | |
95 | ||
96 | %files | |
97 | %defattr(644,root,root,755) | |
98 | %doc man/xmonad.hs | |
99 | %attr(755,root,root) %{_bindir}/xmonad | |
100 | %{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf | |
101 | %{_libdir}/%{ghcdir}/%{name}-%{version} | |
102 | %{_mandir}/man1/xmonad.1* | |
103 | %{_xdeskdir}/%{name}.desktop | |
104 | ||
105 | %files doc | |
106 | %defattr(644,root,root,755) | |
107 | %doc %{name}-%{version}-doc/* |