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