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