]> git.pld-linux.org Git - packages/xmonad.git/blob - xmonad.spec
- release 4
[packages/xmonad.git] / xmonad.spec
1 #
2 # Conditional build:
3 %bcond_with     doc     # build with docs (broken)
4 #
5 Summary:        Tiling window manager
6 Summary(pl.UTF-8):      Kafelkowy zarządca okien
7 Name:           xmonad
8 Version:        0.15
9 Release:        4
10 License:        BSD
11 Group:          X11/Window Managers
12 Source0:        http://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5:  3a45ffb3a46482da8d94873c48a79dfa
14 Source1:        %{name}.desktop
15 URL:            https://xmonad.org/
16 BuildRequires:  ghc >= 6.12.3
17 BuildRequires:  ghc-X11 >= 1.6
18 BuildRequires:  ghc-extensible-exceptions
19 BuildRequires:  ghc-mtl
20 BuildRequires:  ghc-setlocale
21 BuildRequires:  ghc-utf8-string >= 0.3
22 BuildRequires:  rpmbuild(macros) >= 1.608
23 %requires_eq    ghc
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
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
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
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
79 %if %{with doc}
80 runhaskell Setup.lhs haddock --executables
81 %endif
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}}
90 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_xdeskdir}/%{name}.desktop
91
92 # work around automatic haddock docs installation
93 rm -rf %{name}-%{version}-doc
94 %if %{with doc}
95 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
96 %endif
97 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
98
99 install -d $RPM_BUILD_ROOT%{_mandir}/man1
100 cp -p man/xmonad.1 $RPM_BUILD_ROOT%{_mandir}/man1
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)
116 %doc man/xmonad.hs CHANGES.md CONFIG LICENSE README.md
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
123 %if %{with doc}
124 %files doc
125 %defattr(644,root,root,755)
126 %doc %{name}-%{version}-doc/*
127 %endif
This page took 0.157757 seconds and 4 git commands to generate.