2 # - consider doing subpackages for all those plugins (which one should be in main package ?)
3 # - desktop file (icon exists, but no desktop file?)
7 %bcond_without aspell # don't build aspell support
8 %bcond_without doc # don't build docs
10 %bcond_without guile # don't enable Scheme (guile) scripting language
11 %bcond_without lua # don't enable Lua scripting language
12 %bcond_without perl # don't enable Perl scripting language
13 %bcond_with php # don't enable PHP scripting language
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
17 %bcond_without js # don't enable JavaScript scripting language (V8 engine)
19 %ifnarch %{ix86} %{x8664} arm mips
23 %define php_name php%{?php_suffix}
25 Summary: WeeChat - fast and light chat environment
26 Summary(pl.UTF-8): WeeChat - szybkie i lekkie środowisko do rozmów
31 Group: Applications/Communications
32 Source0: https://www.weechat.org/files/src/%{name}-%{version}.tar.xz
33 # Source0-md5: de205a8ac9bd708ab162d85796566d4a
34 URL: http://www.weechat.org/
35 %{?with_aspell:BuildRequires: aspell-devel}
36 BuildRequires: cmake >= 3.0
37 BuildRequires: curl-devel
38 BuildRequires: gettext-tools
39 BuildRequires: gnutls-devel
40 %{?with_guile:BuildRequires: guile-devel}
41 BuildRequires: libgcrypt-devel
42 %{?with_lua:BuildRequires: lua-devel}
43 BuildRequires: ncurses-devel
44 %{?with_perl:BuildRequires: perl-devel}
45 %{?with_php:BuildRequires: %{php_name}-devel >= 4:7}
46 BuildRequires: pkgconfig
48 BuildRequires: python3-devel
49 BuildRequires: python3-modules
51 BuildRequires: rpm-build >= 4.6
52 BuildRequires: rpmbuild(macros) >= 1.752
53 %{?with_doc:BuildRequires: ruby-asciidoctor}
54 %{?with_ruby:BuildRequires: ruby-devel >= 1:1.9}
55 BuildRequires: sed >= 4.0
56 BuildRequires: tar >= 1:1.22
57 %{?with_tcl:BuildRequires: tcl-devel}
58 %{?with_js:BuildRequires: v8-devel}
60 BuildRequires: zlib-devel
61 Requires(post,postun): desktop-file-utils
62 Suggests: %{name}-icons
63 Suggests: %{name}-plugin-irc
64 Obsoletes: weechat-common
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67 %define skip_post_check_so ruby.so.0.0.0
70 WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat
71 environment for many operating systems. Everything can be done with a
72 keyboard. It is customizable and extensible with scripts.
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
81 Summary: Manual for weechat
86 HTML documentation for weechat.
89 Summary: Icon files for weechat
92 Requires(post,postun): gtk-update-icon-cache
95 Icon files for weechat.
98 Summary: Guile scripting plugin for weechat
99 Group: Applications/Communications
100 Requires: %{name} = %{version}-%{release}
102 %description plugin-guile
103 Guile scripting plugin for weechat.
106 Summary: IRC chat protocol plugin for weechat
107 Group: Applications/Communications
108 Requires: %{name} = %{version}-%{release}
110 %description plugin-irc
111 IRC chat protocol plugin for weechat.
113 %package plugin-javascript
114 Summary: JavaScript scripting plugin for weechat
115 Group: Applications/Communications
116 Requires: %{name} = %{version}-%{release}
118 %description plugin-javascript
119 JavaScript scripting plugin for weechat.
122 Summary: Lua scripting plugin for weechat
123 Group: Applications/Communications
124 Requires: %{name} = %{version}-%{release}
126 %description plugin-lua
127 Lua scripting plugin for weechat.
130 Summary: Perl scripting plugin for weechat
131 Group: Applications/Communications
132 Requires: %{name} = %{version}-%{release}
134 %description plugin-perl
135 Perl scripting plugin for weechat.
137 %package plugin-python
138 Summary: Python scripting plugin for weechat
139 Group: Applications/Communications
140 Requires: %{name} = %{version}-%{release}
142 %description plugin-python
143 Python scripting plugin for weechat.
145 %package plugin-relay
146 Summary: Relay data via network plugin for weechat
147 Group: Applications/Communications
148 Requires: %{name} = %{version}-%{release}
150 %description plugin-relay
151 Relay data via network plugin for weechat used by alternative
155 Summary: Ruby scripting plugin for weechat
156 Group: Applications/Communications
157 Requires: %{name} = %{version}-%{release}
159 %description plugin-ruby
160 Ruby scripting plugin for weechat.
162 %package plugin-spell
163 Summary: Spell checking plugin for weechat
164 Group: Applications/Communications
165 Requires: %{name} = %{version}-%{release}
167 %description plugin-spell
168 Spell checking plugin for weechat.
171 Summary: Tcl scripting plugin for weechat
172 Group: Applications/Communications
173 Requires: %{name} = %{version}-%{release}
175 %description plugin-tcl
176 Tcl scripting plugin for weechat.
179 Summary: File transfer and direct chat plugin for weechat
180 Group: Applications/Communications
181 Requires: %{name} = %{version}-%{release}
183 %description plugin-xfer
184 File transfer and direct chat plugin for weechat.
193 -DPREFIX=%{_prefix} \
194 -DLIBDIR=%{_libdir} \
195 -DENABLE_HEADLESS=OFF \
196 -DENABLE_NCURSES=ON \
197 %{cmake_on_off aspell ENABLE_SPELL} \
198 %{cmake_on_off doc ENABLE_DOC} \
199 %{cmake_on_off perl ENABLE_PERL} \
200 %{cmake_on_off php ENABLE_PHP} \
201 %{cmake_on_off python ENABLE_PYTHON} \
202 %{cmake_on_off ruby ENABLE_RUBY} \
203 %{cmake_on_off lua ENABLE_LUA} \
204 %{cmake_on_off guile ENABLE_GUILE} \
205 %{cmake_on_off tcl ENABLE_TCL} \
206 %{cmake_on_off doc ENABLE_MAN} \
207 %{cmake_on_off js ENABLE_JAVASCRIPT} \
213 rm -rf $RPM_BUILD_ROOT
214 %{__make} -C build install \
215 DESTDIR=$RPM_BUILD_ROOT
217 # symlink to "weechat"
218 %{__rm} $RPM_BUILD_ROOT%{_bindir}/weechat-curses
221 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/%{name}
222 %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
227 rm -rf $RPM_BUILD_ROOT
230 %update_desktop_database
231 %update_mime_database
234 %update_icon_cache hicolor
237 %update_desktop_database_postun
238 %update_mime_database
241 %update_icon_cache hicolor
243 %files -f %{name}.lang
244 %defattr(644,root,root,755)
245 %doc AUTHORS.adoc ChangeLog.adoc README.adoc ReleaseNotes.adoc
246 %attr(755,root,root) %{_bindir}/weechat
248 %{_mandir}/man1/weechat.1*
249 %lang(cs) %{_mandir}/cs/man1/weechat.1*
250 %lang(de) %{_mandir}/de/man1/weechat.1*
251 %lang(fr) %{_mandir}/fr/man1/weechat.1*
252 %lang(it) %{_mandir}/it/man1/weechat.1*
253 %lang(ja) %{_mandir}/ja/man1/weechat.1*
254 %lang(pl) %{_mandir}/pl/man1/weechat.1*
255 %lang(ru) %{_mandir}/ru/man1/weechat.1*
257 %{_desktopdir}/%{name}.desktop
259 %dir %{_libdir}/%{name}
260 %dir %{_libdir}/%{name}/plugins
261 %attr(755,root,root) %{_libdir}/%{name}/plugins/alias.so
262 %attr(755,root,root) %{_libdir}/%{name}/plugins/buflist.so
263 %attr(755,root,root) %{_libdir}/%{name}/plugins/charset.so
264 %attr(755,root,root) %{_libdir}/%{name}/plugins/exec.so
265 %attr(755,root,root) %{_libdir}/%{name}/plugins/fifo.so
266 %attr(755,root,root) %{_libdir}/%{name}/plugins/fset.so
267 %attr(755,root,root) %{_libdir}/%{name}/plugins/logger.so
268 %attr(755,root,root) %{_libdir}/%{name}/plugins/script.so
269 %attr(755,root,root) %{_libdir}/%{name}/plugins/trigger.so
270 %attr(755,root,root) %{_libdir}/%{name}/plugins/typing.so
273 %defattr(644,root,root,755)
274 %{_iconsdir}/hicolor/*/apps/weechat.png
278 %defattr(644,root,root,755)
279 %dir %{_docdir}/%{name}
280 %lang(cs) %{_docdir}/%{name}/*.cs.html
281 %lang(de) %{_docdir}/%{name}/*.de.html
282 %lang(en) %{_docdir}/%{name}/*.en.html
283 %lang(es) %{_docdir}/%{name}/*.es.html
284 %lang(fr) %{_docdir}/%{name}/*.fr.html
285 %lang(it) %{_docdir}/%{name}/*.it.html
286 %lang(ja) %{_docdir}/%{name}/*.ja.html
287 %lang(pl) %{_docdir}/%{name}/*.pl.html
288 %lang(ru) %{_docdir}/%{name}/*.ru.html
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_libdir}/%{name}/plugins/guile.so
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_libdir}/%{name}/plugins/irc.so
302 %files plugin-javascript
303 %defattr(644,root,root,755)
304 %attr(755,root,root) %{_libdir}/%{name}/plugins/javascript.so
309 %defattr(644,root,root,755)
310 %attr(755,root,root) %{_libdir}/%{name}/plugins/lua.so
315 %defattr(644,root,root,755)
316 %attr(755,root,root) %{_libdir}/%{name}/plugins/perl.so
321 %defattr(644,root,root,755)
322 %attr(755,root,root) %{_libdir}/%{name}/plugins/python.so
326 %defattr(644,root,root,755)
327 %attr(755,root,root) %{_libdir}/%{name}/plugins/relay.so
331 %defattr(644,root,root,755)
332 %attr(755,root,root) %{_libdir}/%{name}/plugins/ruby.so
337 %defattr(644,root,root,755)
338 %attr(755,root,root) %{_libdir}/%{name}/plugins/spell.so
343 %defattr(644,root,root,755)
344 %attr(755,root,root) %{_libdir}/%{name}/plugins/tcl.so
348 %defattr(644,root,root,755)
349 %attr(755,root,root) %{_libdir}/%{name}/plugins/xfer.so