]>
Commit | Line | Data |
---|---|---|
2bcfc6bc | 1 | # TODO: |
2bcfc6bc | 2 | # - consider doing subpackages for all those plugins (which one should be in main package ?) |
cb1359d3 | 3 | # - desktop file (icon exists, but no desktop file?) |
bf2eabf0 JB |
4 | # |
5 | # Conditional build: | |
875a60b1 | 6 | # Features |
dae692bf | 7 | %bcond_without aspell # don't build aspell support |
1e6a4966 | 8 | %bcond_without doc # don't build docs |
875a60b1 | 9 | # Bindings |
de60b6ba | 10 | %bcond_without guile # don't enable Scheme (guile) scripting language |
875a60b1 ER |
11 | %bcond_without lua # don't enable Lua scripting language |
12 | %bcond_without perl # don't enable Perl scripting language | |
de60b6ba | 13 | %bcond_with php # don't enable PHP scripting language |
875a60b1 ER |
14 | %bcond_without python # don't enable Python scripting language |
15 | %bcond_without ruby # don't enable Ruby scripting language | |
16 | %bcond_without tcl # don't enable Tcl scripting language | |
9fc5e4a1 | 17 | %bcond_without js # don't enable JavaScript scripting language (V8 engine) |
d4846710 | 18 | |
93f2c1d6 ER |
19 | %ifnarch %{ix86} %{x8664} arm mips |
20 | %undefine with_js | |
21 | %endif | |
22 | ||
de60b6ba JP |
23 | %define php_name php%{?php_suffix} |
24 | ||
bf2eabf0 JB |
25 | Summary: WeeChat - fast and light chat environment |
26 | Summary(pl.UTF-8): WeeChat - szybkie i lekkie środowisko do rozmów | |
88c48961 | 27 | Name: weechat |
0b6a6c42 | 28 | Version: 3.0.1 |
95f2218d | 29 | Release: 2 |
ccd085cc | 30 | License: GPL v3+ |
740c529c | 31 | Group: Applications/Communications |
1b328212 | 32 | Source0: https://www.weechat.org/files/src/%{name}-%{version}.tar.xz |
0b6a6c42 | 33 | # Source0-md5: 56cc7312aea9cb5cccab39211106316f |
27c07871 | 34 | Patch0: headless-man.patch |
46ecdc76 | 35 | URL: http://www.weechat.org/ |
bf2eabf0 | 36 | %{?with_aspell:BuildRequires: aspell-devel} |
de60b6ba | 37 | BuildRequires: cmake >= 3.0 |
ccac3bc6 | 38 | BuildRequires: curl-devel |
8131d0d8 | 39 | BuildRequires: gettext-tools |
113c8f6d | 40 | BuildRequires: gnutls-devel |
875a60b1 | 41 | %{?with_guile:BuildRequires: guile-devel} |
6c113da7 | 42 | BuildRequires: libgcrypt-devel |
ca796d8a | 43 | %{?with_lua:BuildRequires: lua-devel} |
387a8b12 | 44 | BuildRequires: ncurses-devel |
9aa8ff7b | 45 | %{?with_perl:BuildRequires: perl-devel} |
de60b6ba | 46 | %{?with_php:BuildRequires: %{php_name}-devel >= 4:7} |
6757fa8b KK |
47 | BuildRequires: pkgconfig |
48 | %if %{with python} | |
113c8f6d JP |
49 | BuildRequires: python3-devel |
50 | BuildRequires: python3-modules | |
6757fa8b | 51 | %endif |
8f33c8f1 | 52 | BuildRequires: rpmbuild(macros) >= 1.752 |
7a0f89d0 | 53 | %{?with_doc:BuildRequires: ruby-asciidoctor} |
113c8f6d | 54 | %{?with_ruby:BuildRequires: ruby-devel >= 1:1.9} |
7a0f89d0 | 55 | BuildRequires: sed >= 4.0 |
13717296 | 56 | BuildRequires: tar >= 1:1.22 |
aea7cf80 | 57 | %{?with_tcl:BuildRequires: tcl-devel} |
7a0f89d0 | 58 | %{?with_js:BuildRequires: v8-devel} |
13717296 | 59 | BuildRequires: xz |
113c8f6d | 60 | BuildRequires: zlib-devel |
de60b6ba JP |
61 | Requires(post,postun): desktop-file-utils |
62 | Requires(post,postun): gtk-update-icon-cache | |
f118d56e | 63 | Suggests: %{name}-plugin-irc |
9fb88636 | 64 | Obsoletes: weechat-common |
88c48961 | 65 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
66 | ||
18c4530e ER |
67 | %define skip_post_check_so ruby.so.0.0.0 |
68 | ||
88c48961 | 69 | %description |
70 | WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat | |
228b94b3 | 71 | environment for many operating systems. Everything can be done with a |
72 | keyboard. It is customizable and extensible with scripts. | |
88c48961 | 73 | |
bf2eabf0 JB |
74 | %description -l pl.UTF-8 |
75 | WeeChat (Wee Ehanced Environment for Chat) to szybkie i lekkie | |
76 | środowisko do rozmów dla wielu systemów operacyjnych. Pozwala wszystko | |
77 | zrobić przy pomocy klawiatury. Jest konfigurowalne i rozszerzalne za | |
78 | pomocą skryptów. | |
88c48961 | 79 | |
875a60b1 ER |
80 | %package doc |
81 | Summary: Manual for weechat | |
82 | Group: Documentation | |
8f33c8f1 | 83 | %{?noarchpackage} |
875a60b1 ER |
84 | |
85 | %description doc | |
86 | HTML documentation for weechat. | |
87 | ||
6c402603 JP |
88 | %package plugin-guile |
89 | Summary: Guile scripting plugin for weechat | |
90 | Group: Applications/Communications | |
91 | Requires: %{name} = %{version}-%{release} | |
92 | ||
93 | %description plugin-guile | |
94 | Guile scripting plugin for weechat. | |
95 | ||
f118d56e JP |
96 | %package plugin-irc |
97 | Summary: IRC chat protocol plugin for weechat | |
98 | Group: Applications/Communications | |
99 | Requires: %{name} = %{version}-%{release} | |
100 | ||
101 | %description plugin-irc | |
102 | IRC chat protocol plugin for weechat. | |
103 | ||
6c402603 JP |
104 | %package plugin-javascript |
105 | Summary: JavaScript scripting plugin for weechat | |
106 | Group: Applications/Communications | |
107 | Requires: %{name} = %{version}-%{release} | |
108 | ||
109 | %description plugin-javascript | |
110 | JavaScript scripting plugin for weechat. | |
111 | ||
112 | %package plugin-lua | |
113 | Summary: Lua scripting plugin for weechat | |
114 | Group: Applications/Communications | |
115 | Requires: %{name} = %{version}-%{release} | |
116 | ||
117 | %description plugin-lua | |
118 | Lua scripting plugin for weechat. | |
119 | ||
120 | %package plugin-perl | |
121 | Summary: Perl scripting plugin for weechat | |
122 | Group: Applications/Communications | |
123 | Requires: %{name} = %{version}-%{release} | |
124 | ||
125 | %description plugin-perl | |
126 | Perl scripting plugin for weechat. | |
127 | ||
128 | %package plugin-python | |
129 | Summary: Python scripting plugin for weechat | |
130 | Group: Applications/Communications | |
131 | Requires: %{name} = %{version}-%{release} | |
132 | ||
133 | %description plugin-python | |
134 | Python scripting plugin for weechat. | |
135 | ||
f118d56e JP |
136 | %package plugin-relay |
137 | Summary: Relay data via network plugin for weechat | |
138 | Group: Applications/Communications | |
139 | Requires: %{name} = %{version}-%{release} | |
140 | ||
141 | %description plugin-relay | |
142 | Relay data via network plugin for weechat used by alternative | |
143 | frontends. | |
144 | ||
6c402603 JP |
145 | %package plugin-ruby |
146 | Summary: Ruby scripting plugin for weechat | |
147 | Group: Applications/Communications | |
148 | Requires: %{name} = %{version}-%{release} | |
149 | ||
150 | %description plugin-ruby | |
151 | Ruby scripting plugin for weechat. | |
152 | ||
153 | %package plugin-spell | |
154 | Summary: Spell checking plugin for weechat | |
155 | Group: Applications/Communications | |
156 | Requires: %{name} = %{version}-%{release} | |
157 | ||
158 | %description plugin-spell | |
159 | Spell checking plugin for weechat. | |
160 | ||
161 | %package plugin-tcl | |
162 | Summary: Tcl scripting plugin for weechat | |
163 | Group: Applications/Communications | |
164 | Requires: %{name} = %{version}-%{release} | |
165 | ||
166 | %description plugin-tcl | |
167 | Tcl scripting plugin for weechat. | |
168 | ||
f118d56e JP |
169 | %package plugin-xfer |
170 | Summary: File transfer and direct chat plugin for weechat | |
171 | Group: Applications/Communications | |
172 | Requires: %{name} = %{version}-%{release} | |
173 | ||
174 | %description plugin-xfer | |
175 | File transfer and direct chat plugin for weechat. | |
176 | ||
88c48961 | 177 | %prep |
178 | %setup -q | |
27c07871 | 179 | %patch0 -p1 |
88c48961 | 180 | |
181 | %build | |
875a60b1 ER |
182 | install -d build |
183 | cd build | |
184 | %cmake \ | |
185 | -DPREFIX=%{_prefix} \ | |
186 | -DLIBDIR=%{_libdir} \ | |
113c8f6d | 187 | -DENABLE_HEADLESS=OFF \ |
875a60b1 | 188 | -DENABLE_NCURSES=ON \ |
113c8f6d JP |
189 | %{cmake_on_off aspell ENABLE_SPELL} \ |
190 | %{cmake_on_off doc ENABLE_DOC} \ | |
191 | %{cmake_on_off perl ENABLE_PERL} \ | |
192 | %{cmake_on_off php ENABLE_PHP} \ | |
193 | %{cmake_on_off python ENABLE_PYTHON} \ | |
194 | %{cmake_on_off ruby ENABLE_RUBY} \ | |
195 | %{cmake_on_off lua ENABLE_LUA} \ | |
196 | %{cmake_on_off guile ENABLE_GUILE} \ | |
197 | %{cmake_on_off tcl ENABLE_TCL} \ | |
198 | %{cmake_on_off doc ENABLE_MAN} \ | |
199 | %{cmake_on_off js ENABLE_JAVASCRIPT} \ | |
875a60b1 ER |
200 | .. |
201 | ||
202 | %{__make} VERBOSE=1 | |
88c48961 | 203 | |
204 | %install | |
205 | rm -rf $RPM_BUILD_ROOT | |
875a60b1 | 206 | %{__make} -C build install \ |
88c48961 | 207 | DESTDIR=$RPM_BUILD_ROOT |
208 | ||
cb1359d3 ER |
209 | # symlink to "weechat" |
210 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/weechat-curses | |
211 | ||
875a60b1 ER |
212 | # no -devel, drop |
213 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/%{name} | |
214 | %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc | |
9165132c | 215 | |
216 | %find_lang %{name} | |
217 | ||
88c48961 | 218 | %clean |
219 | rm -rf $RPM_BUILD_ROOT | |
220 | ||
de60b6ba JP |
221 | %post |
222 | %update_desktop_database | |
223 | %update_icon_cache hicolor | |
224 | %update_mime_database | |
225 | ||
226 | %postun | |
227 | %update_desktop_database_postun | |
228 | %update_icon_cache hicolor | |
229 | %update_mime_database | |
230 | ||
9fb88636 | 231 | %files -f %{name}.lang |
7f12170a | 232 | %defattr(644,root,root,755) |
c2372aac | 233 | %doc AUTHORS.adoc ChangeLog.adoc README.adoc ReleaseNotes.adoc |
7c82dcb8 | 234 | %attr(755,root,root) %{_bindir}/weechat |
c2372aac | 235 | %if %{with doc} |
7c82dcb8 | 236 | %{_mandir}/man1/weechat.1* |
5fb273c2 | 237 | %lang(cs) %{_mandir}/cs/man1/weechat.1* |
be004e51 AS |
238 | %lang(de) %{_mandir}/de/man1/weechat.1* |
239 | %lang(fr) %{_mandir}/fr/man1/weechat.1* | |
240 | %lang(it) %{_mandir}/it/man1/weechat.1* | |
241 | %lang(ja) %{_mandir}/ja/man1/weechat.1* | |
cb1359d3 ER |
242 | %lang(pl) %{_mandir}/pl/man1/weechat.1* |
243 | %lang(ru) %{_mandir}/ru/man1/weechat.1* | |
c2372aac | 244 | %endif |
cb1359d3 | 245 | %{_iconsdir}/hicolor/*/apps/weechat.png |
de60b6ba | 246 | %{_desktopdir}/%{name}.desktop |
7f12170a | 247 | |
cb1359d3 ER |
248 | %dir %{_libdir}/%{name} |
249 | %dir %{_libdir}/%{name}/plugins | |
250 | %attr(755,root,root) %{_libdir}/%{name}/plugins/alias.so | |
c2372aac | 251 | %attr(755,root,root) %{_libdir}/%{name}/plugins/buflist.so |
cb1359d3 ER |
252 | %attr(755,root,root) %{_libdir}/%{name}/plugins/charset.so |
253 | %attr(755,root,root) %{_libdir}/%{name}/plugins/exec.so | |
254 | %attr(755,root,root) %{_libdir}/%{name}/plugins/fifo.so | |
c2372aac | 255 | %attr(755,root,root) %{_libdir}/%{name}/plugins/fset.so |
cb1359d3 | 256 | %attr(755,root,root) %{_libdir}/%{name}/plugins/logger.so |
cb1359d3 ER |
257 | %attr(755,root,root) %{_libdir}/%{name}/plugins/script.so |
258 | %attr(755,root,root) %{_libdir}/%{name}/plugins/trigger.so | |
875a60b1 | 259 | |
875a60b1 ER |
260 | %if %{with doc} |
261 | %files doc | |
262 | %defattr(644,root,root,755) | |
263 | %dir %{_docdir}/%{name} | |
5fb273c2 | 264 | %lang(cs) %{_docdir}/%{name}/*.cs.html |
875a60b1 ER |
265 | %lang(de) %{_docdir}/%{name}/*.de.html |
266 | %lang(en) %{_docdir}/%{name}/*.en.html | |
267 | %lang(es) %{_docdir}/%{name}/*.es.html | |
268 | %lang(fr) %{_docdir}/%{name}/*.fr.html | |
269 | %lang(it) %{_docdir}/%{name}/*.it.html | |
270 | %lang(ja) %{_docdir}/%{name}/*.ja.html | |
271 | %lang(pl) %{_docdir}/%{name}/*.pl.html | |
272 | %lang(ru) %{_docdir}/%{name}/*.ru.html | |
273 | %endif | |
6c402603 JP |
274 | |
275 | %if %{with guile} | |
276 | %files plugin-guile | |
277 | %defattr(644,root,root,755) | |
278 | %attr(755,root,root) %{_libdir}/%{name}/plugins/guile.so | |
279 | %endif | |
280 | ||
f118d56e JP |
281 | %files plugin-irc |
282 | %defattr(644,root,root,755) | |
283 | %attr(755,root,root) %{_libdir}/%{name}/plugins/irc.so | |
284 | ||
6c402603 JP |
285 | %if %{with js} |
286 | %files plugin-javascript | |
287 | %defattr(644,root,root,755) | |
288 | %attr(755,root,root) %{_libdir}/%{name}/plugins/javascript.so | |
289 | %endif | |
290 | ||
291 | %if %{with lua} | |
292 | %files plugin-lua | |
293 | %defattr(644,root,root,755) | |
294 | %attr(755,root,root) %{_libdir}/%{name}/plugins/lua.so | |
295 | %endif | |
296 | ||
297 | %if %{with perl} | |
298 | %files plugin-perl | |
299 | %defattr(644,root,root,755) | |
300 | %attr(755,root,root) %{_libdir}/%{name}/plugins/perl.so | |
301 | %endif | |
302 | ||
303 | %if %{with python} | |
304 | %files plugin-python | |
305 | %defattr(644,root,root,755) | |
306 | %attr(755,root,root) %{_libdir}/%{name}/plugins/python.so | |
307 | %endif | |
308 | ||
f118d56e JP |
309 | %files plugin-relay |
310 | %defattr(644,root,root,755) | |
311 | %attr(755,root,root) %{_libdir}/%{name}/plugins/relay.so | |
312 | ||
6c402603 JP |
313 | %if %{with ruby} |
314 | %files plugin-ruby | |
315 | %defattr(644,root,root,755) | |
316 | %attr(755,root,root) %{_libdir}/%{name}/plugins/ruby.so | |
317 | %endif | |
318 | ||
319 | %if %{with aspell} | |
320 | %files plugin-spell | |
321 | %defattr(644,root,root,755) | |
322 | %attr(755,root,root) %{_libdir}/%{name}/plugins/spell.so | |
323 | %endif | |
324 | ||
325 | %if %{with tcl} | |
326 | %files plugin-tcl | |
327 | %defattr(644,root,root,755) | |
328 | %attr(755,root,root) %{_libdir}/%{name}/plugins/tcl.so | |
329 | %endif | |
f118d56e JP |
330 | |
331 | %files plugin-xfer | |
332 | %defattr(644,root,root,755) | |
333 | %attr(755,root,root) %{_libdir}/%{name}/plugins/xfer.so |