]>
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 |
75a1b040 JP |
28 | Version: 4.0.0 |
29 | Release: 1 | |
ccd085cc | 30 | License: GPL v3+ |
740c529c | 31 | Group: Applications/Communications |
1b328212 | 32 | Source0: https://www.weechat.org/files/src/%{name}-%{version}.tar.xz |
75a1b040 | 33 | # Source0-md5: d372a76f52b212623b96bfddd63b3d68 |
46ecdc76 | 34 | URL: http://www.weechat.org/ |
bf2eabf0 | 35 | %{?with_aspell:BuildRequires: aspell-devel} |
de60b6ba | 36 | BuildRequires: cmake >= 3.0 |
ccac3bc6 | 37 | BuildRequires: curl-devel |
8131d0d8 | 38 | BuildRequires: gettext-tools |
113c8f6d | 39 | BuildRequires: gnutls-devel |
875a60b1 | 40 | %{?with_guile:BuildRequires: guile-devel} |
6c113da7 | 41 | BuildRequires: libgcrypt-devel |
ca796d8a | 42 | %{?with_lua:BuildRequires: lua-devel} |
387a8b12 | 43 | BuildRequires: ncurses-devel |
9aa8ff7b | 44 | %{?with_perl:BuildRequires: perl-devel} |
de60b6ba | 45 | %{?with_php:BuildRequires: %{php_name}-devel >= 4:7} |
6757fa8b KK |
46 | BuildRequires: pkgconfig |
47 | %if %{with python} | |
113c8f6d JP |
48 | BuildRequires: python3-devel |
49 | BuildRequires: python3-modules | |
6757fa8b | 50 | %endif |
ead211ff | 51 | BuildRequires: rpm-build >= 4.6 |
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 |
1339b86e | 61 | BuildRequires: zstd-devel |
de60b6ba | 62 | Requires(post,postun): desktop-file-utils |
ead211ff | 63 | Suggests: %{name}-icons |
f118d56e | 64 | Suggests: %{name}-plugin-irc |
f2eaed13 | 65 | Obsoletes: weechat-common < 1.2 |
88c48961 | 66 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
67 | ||
18c4530e ER |
68 | %define skip_post_check_so ruby.so.0.0.0 |
69 | ||
88c48961 | 70 | %description |
71 | WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat | |
228b94b3 | 72 | environment for many operating systems. Everything can be done with a |
73 | keyboard. It is customizable and extensible with scripts. | |
88c48961 | 74 | |
bf2eabf0 JB |
75 | %description -l pl.UTF-8 |
76 | WeeChat (Wee Ehanced Environment for Chat) to szybkie i lekkie | |
77 | środowisko do rozmów dla wielu systemów operacyjnych. Pozwala wszystko | |
78 | zrobić przy pomocy klawiatury. Jest konfigurowalne i rozszerzalne za | |
79 | pomocą skryptów. | |
88c48961 | 80 | |
875a60b1 ER |
81 | %package doc |
82 | Summary: Manual for weechat | |
83 | Group: Documentation | |
4a6303d1 | 84 | BuildArch: noarch |
875a60b1 ER |
85 | |
86 | %description doc | |
87 | HTML documentation for weechat. | |
88 | ||
ead211ff JP |
89 | %package icons |
90 | Summary: Icon files for weechat | |
91 | Group: Applications | |
92 | BuildArch: noarch | |
93 | Requires(post,postun): gtk-update-icon-cache | |
94 | ||
95 | %description icons | |
96 | Icon files for weechat. | |
97 | ||
6c402603 JP |
98 | %package plugin-guile |
99 | Summary: Guile scripting plugin for weechat | |
100 | Group: Applications/Communications | |
101 | Requires: %{name} = %{version}-%{release} | |
102 | ||
103 | %description plugin-guile | |
104 | Guile scripting plugin for weechat. | |
105 | ||
f118d56e JP |
106 | %package plugin-irc |
107 | Summary: IRC chat protocol plugin for weechat | |
108 | Group: Applications/Communications | |
109 | Requires: %{name} = %{version}-%{release} | |
110 | ||
111 | %description plugin-irc | |
112 | IRC chat protocol plugin for weechat. | |
113 | ||
6c402603 JP |
114 | %package plugin-javascript |
115 | Summary: JavaScript scripting plugin for weechat | |
116 | Group: Applications/Communications | |
117 | Requires: %{name} = %{version}-%{release} | |
118 | ||
119 | %description plugin-javascript | |
120 | JavaScript scripting plugin for weechat. | |
121 | ||
122 | %package plugin-lua | |
123 | Summary: Lua scripting plugin for weechat | |
124 | Group: Applications/Communications | |
125 | Requires: %{name} = %{version}-%{release} | |
126 | ||
127 | %description plugin-lua | |
128 | Lua scripting plugin for weechat. | |
129 | ||
130 | %package plugin-perl | |
131 | Summary: Perl scripting plugin for weechat | |
132 | Group: Applications/Communications | |
133 | Requires: %{name} = %{version}-%{release} | |
134 | ||
135 | %description plugin-perl | |
136 | Perl scripting plugin for weechat. | |
137 | ||
138 | %package plugin-python | |
139 | Summary: Python scripting plugin for weechat | |
140 | Group: Applications/Communications | |
141 | Requires: %{name} = %{version}-%{release} | |
142 | ||
143 | %description plugin-python | |
144 | Python scripting plugin for weechat. | |
145 | ||
f118d56e JP |
146 | %package plugin-relay |
147 | Summary: Relay data via network plugin for weechat | |
148 | Group: Applications/Communications | |
149 | Requires: %{name} = %{version}-%{release} | |
150 | ||
151 | %description plugin-relay | |
152 | Relay data via network plugin for weechat used by alternative | |
153 | frontends. | |
154 | ||
6c402603 JP |
155 | %package plugin-ruby |
156 | Summary: Ruby scripting plugin for weechat | |
157 | Group: Applications/Communications | |
158 | Requires: %{name} = %{version}-%{release} | |
159 | ||
160 | %description plugin-ruby | |
161 | Ruby scripting plugin for weechat. | |
162 | ||
163 | %package plugin-spell | |
164 | Summary: Spell checking plugin for weechat | |
165 | Group: Applications/Communications | |
166 | Requires: %{name} = %{version}-%{release} | |
167 | ||
168 | %description plugin-spell | |
169 | Spell checking plugin for weechat. | |
170 | ||
171 | %package plugin-tcl | |
172 | Summary: Tcl scripting plugin for weechat | |
173 | Group: Applications/Communications | |
174 | Requires: %{name} = %{version}-%{release} | |
175 | ||
176 | %description plugin-tcl | |
177 | Tcl scripting plugin for weechat. | |
178 | ||
f118d56e JP |
179 | %package plugin-xfer |
180 | Summary: File transfer and direct chat plugin for weechat | |
181 | Group: Applications/Communications | |
182 | Requires: %{name} = %{version}-%{release} | |
183 | ||
184 | %description plugin-xfer | |
185 | File transfer and direct chat plugin for weechat. | |
186 | ||
88c48961 | 187 | %prep |
188 | %setup -q | |
189 | ||
190 | %build | |
875a60b1 ER |
191 | install -d build |
192 | cd build | |
193 | %cmake \ | |
194 | -DPREFIX=%{_prefix} \ | |
195 | -DLIBDIR=%{_libdir} \ | |
75a1b040 JP |
196 | -DENABLE_HEADLESS=ON \ |
197 | -DENABLE_DOC_INCOMPLETE=ON \ | |
875a60b1 | 198 | -DENABLE_NCURSES=ON \ |
113c8f6d JP |
199 | %{cmake_on_off aspell ENABLE_SPELL} \ |
200 | %{cmake_on_off doc ENABLE_DOC} \ | |
201 | %{cmake_on_off perl ENABLE_PERL} \ | |
202 | %{cmake_on_off php ENABLE_PHP} \ | |
203 | %{cmake_on_off python ENABLE_PYTHON} \ | |
204 | %{cmake_on_off ruby ENABLE_RUBY} \ | |
205 | %{cmake_on_off lua ENABLE_LUA} \ | |
206 | %{cmake_on_off guile ENABLE_GUILE} \ | |
207 | %{cmake_on_off tcl ENABLE_TCL} \ | |
208 | %{cmake_on_off doc ENABLE_MAN} \ | |
209 | %{cmake_on_off js ENABLE_JAVASCRIPT} \ | |
875a60b1 ER |
210 | .. |
211 | ||
212 | %{__make} VERBOSE=1 | |
88c48961 | 213 | |
214 | %install | |
215 | rm -rf $RPM_BUILD_ROOT | |
875a60b1 | 216 | %{__make} -C build install \ |
88c48961 | 217 | DESTDIR=$RPM_BUILD_ROOT |
218 | ||
cb1359d3 ER |
219 | # symlink to "weechat" |
220 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/weechat-curses | |
221 | ||
875a60b1 ER |
222 | # no -devel, drop |
223 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/%{name} | |
224 | %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc | |
9165132c | 225 | |
226 | %find_lang %{name} | |
227 | ||
88c48961 | 228 | %clean |
229 | rm -rf $RPM_BUILD_ROOT | |
230 | ||
de60b6ba JP |
231 | %post |
232 | %update_desktop_database | |
de60b6ba JP |
233 | %update_mime_database |
234 | ||
ead211ff JP |
235 | %post icons |
236 | %update_icon_cache hicolor | |
237 | ||
de60b6ba JP |
238 | %postun |
239 | %update_desktop_database_postun | |
de60b6ba JP |
240 | %update_mime_database |
241 | ||
ead211ff JP |
242 | %postun icons |
243 | %update_icon_cache hicolor | |
244 | ||
9fb88636 | 245 | %files -f %{name}.lang |
7f12170a | 246 | %defattr(644,root,root,755) |
c2372aac | 247 | %doc AUTHORS.adoc ChangeLog.adoc README.adoc ReleaseNotes.adoc |
7c82dcb8 | 248 | %attr(755,root,root) %{_bindir}/weechat |
75a1b040 | 249 | %attr(755,root,root) %{_bindir}/weechat-headless |
c2372aac | 250 | %if %{with doc} |
7c82dcb8 | 251 | %{_mandir}/man1/weechat.1* |
75a1b040 | 252 | %{_mandir}/man1/weechat-headless.1* |
5fb273c2 | 253 | %lang(cs) %{_mandir}/cs/man1/weechat.1* |
75a1b040 | 254 | %lang(cs) %{_mandir}/cs/man1/weechat-headless.1* |
be004e51 | 255 | %lang(de) %{_mandir}/de/man1/weechat.1* |
75a1b040 | 256 | %lang(de) %{_mandir}/de/man1/weechat-headless.1* |
be004e51 | 257 | %lang(fr) %{_mandir}/fr/man1/weechat.1* |
75a1b040 | 258 | %lang(fr) %{_mandir}/fr/man1/weechat-headless.1* |
be004e51 | 259 | %lang(it) %{_mandir}/it/man1/weechat.1* |
75a1b040 | 260 | %lang(it) %{_mandir}/it/man1/weechat-headless.1* |
be004e51 | 261 | %lang(ja) %{_mandir}/ja/man1/weechat.1* |
75a1b040 | 262 | %lang(ja) %{_mandir}/ja/man1/weechat-headless.1* |
cb1359d3 | 263 | %lang(pl) %{_mandir}/pl/man1/weechat.1* |
75a1b040 | 264 | %lang(pl) %{_mandir}/pl/man1/weechat-headless.1* |
cb1359d3 | 265 | %lang(ru) %{_mandir}/ru/man1/weechat.1* |
75a1b040 JP |
266 | %lang(ru) %{_mandir}/ru/man1/weechat-headless.1* |
267 | %lang(sr) %{_mandir}/sr/man1/weechat.1* | |
268 | %lang(sr) %{_mandir}/sr/man1/weechat-headless.1* | |
c2372aac | 269 | %endif |
de60b6ba | 270 | %{_desktopdir}/%{name}.desktop |
7f12170a | 271 | |
cb1359d3 ER |
272 | %dir %{_libdir}/%{name} |
273 | %dir %{_libdir}/%{name}/plugins | |
274 | %attr(755,root,root) %{_libdir}/%{name}/plugins/alias.so | |
c2372aac | 275 | %attr(755,root,root) %{_libdir}/%{name}/plugins/buflist.so |
cb1359d3 ER |
276 | %attr(755,root,root) %{_libdir}/%{name}/plugins/charset.so |
277 | %attr(755,root,root) %{_libdir}/%{name}/plugins/exec.so | |
278 | %attr(755,root,root) %{_libdir}/%{name}/plugins/fifo.so | |
c2372aac | 279 | %attr(755,root,root) %{_libdir}/%{name}/plugins/fset.so |
cb1359d3 | 280 | %attr(755,root,root) %{_libdir}/%{name}/plugins/logger.so |
cb1359d3 ER |
281 | %attr(755,root,root) %{_libdir}/%{name}/plugins/script.so |
282 | %attr(755,root,root) %{_libdir}/%{name}/plugins/trigger.so | |
67248240 | 283 | %attr(755,root,root) %{_libdir}/%{name}/plugins/typing.so |
875a60b1 | 284 | |
ead211ff JP |
285 | %files icons |
286 | %defattr(644,root,root,755) | |
287 | %{_iconsdir}/hicolor/*/apps/weechat.png | |
288 | ||
875a60b1 ER |
289 | %if %{with doc} |
290 | %files doc | |
291 | %defattr(644,root,root,755) | |
292 | %dir %{_docdir}/%{name} | |
5fb273c2 | 293 | %lang(cs) %{_docdir}/%{name}/*.cs.html |
875a60b1 ER |
294 | %lang(de) %{_docdir}/%{name}/*.de.html |
295 | %lang(en) %{_docdir}/%{name}/*.en.html | |
296 | %lang(es) %{_docdir}/%{name}/*.es.html | |
297 | %lang(fr) %{_docdir}/%{name}/*.fr.html | |
298 | %lang(it) %{_docdir}/%{name}/*.it.html | |
299 | %lang(ja) %{_docdir}/%{name}/*.ja.html | |
300 | %lang(pl) %{_docdir}/%{name}/*.pl.html | |
301 | %lang(ru) %{_docdir}/%{name}/*.ru.html | |
75a1b040 | 302 | %lang(sr) %{_docdir}/%{name}/*.sr.html |
875a60b1 | 303 | %endif |
6c402603 JP |
304 | |
305 | %if %{with guile} | |
306 | %files plugin-guile | |
307 | %defattr(644,root,root,755) | |
308 | %attr(755,root,root) %{_libdir}/%{name}/plugins/guile.so | |
309 | %endif | |
310 | ||
f118d56e JP |
311 | %files plugin-irc |
312 | %defattr(644,root,root,755) | |
313 | %attr(755,root,root) %{_libdir}/%{name}/plugins/irc.so | |
314 | ||
6c402603 JP |
315 | %if %{with js} |
316 | %files plugin-javascript | |
317 | %defattr(644,root,root,755) | |
318 | %attr(755,root,root) %{_libdir}/%{name}/plugins/javascript.so | |
319 | %endif | |
320 | ||
321 | %if %{with lua} | |
322 | %files plugin-lua | |
323 | %defattr(644,root,root,755) | |
324 | %attr(755,root,root) %{_libdir}/%{name}/plugins/lua.so | |
325 | %endif | |
326 | ||
327 | %if %{with perl} | |
328 | %files plugin-perl | |
329 | %defattr(644,root,root,755) | |
330 | %attr(755,root,root) %{_libdir}/%{name}/plugins/perl.so | |
331 | %endif | |
332 | ||
333 | %if %{with python} | |
334 | %files plugin-python | |
335 | %defattr(644,root,root,755) | |
336 | %attr(755,root,root) %{_libdir}/%{name}/plugins/python.so | |
337 | %endif | |
338 | ||
f118d56e JP |
339 | %files plugin-relay |
340 | %defattr(644,root,root,755) | |
341 | %attr(755,root,root) %{_libdir}/%{name}/plugins/relay.so | |
342 | ||
6c402603 JP |
343 | %if %{with ruby} |
344 | %files plugin-ruby | |
345 | %defattr(644,root,root,755) | |
346 | %attr(755,root,root) %{_libdir}/%{name}/plugins/ruby.so | |
347 | %endif | |
348 | ||
349 | %if %{with aspell} | |
350 | %files plugin-spell | |
351 | %defattr(644,root,root,755) | |
352 | %attr(755,root,root) %{_libdir}/%{name}/plugins/spell.so | |
353 | %endif | |
354 | ||
355 | %if %{with tcl} | |
356 | %files plugin-tcl | |
357 | %defattr(644,root,root,755) | |
358 | %attr(755,root,root) %{_libdir}/%{name}/plugins/tcl.so | |
359 | %endif | |
f118d56e JP |
360 | |
361 | %files plugin-xfer | |
362 | %defattr(644,root,root,755) | |
363 | %attr(755,root,root) %{_libdir}/%{name}/plugins/xfer.so |