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