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: rpmbuild(macros) >= 1.752
52 %{?with_doc:BuildRequires: ruby-asciidoctor}
53 %{?with_ruby:BuildRequires: ruby-devel >= 1:1.9}
54 BuildRequires: sed >= 4.0
55 BuildRequires: tar >= 1:1.22
56 %{?with_tcl:BuildRequires: tcl-devel}
57 %{?with_js:BuildRequires: v8-devel}
59 BuildRequires: zlib-devel
60 Requires(post,postun): desktop-file-utils
61 Requires(post,postun): gtk-update-icon-cache
62 Suggests: %{name}-plugin-irc
63 Obsoletes: weechat-common
64 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66 %define skip_post_check_so ruby.so.0.0.0
69 WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat
70 environment for many operating systems. Everything can be done with a
71 keyboard. It is customizable and extensible with scripts.
73 %description -l pl.UTF-8
74 WeeChat (Wee Ehanced Environment for Chat) to szybkie i lekkie
75 środowisko do rozmów dla wielu systemów operacyjnych. Pozwala wszystko
76 zrobić przy pomocy klawiatury. Jest konfigurowalne i rozszerzalne za
80 Summary: Manual for weechat
85 HTML documentation for weechat.
88 Summary: Guile scripting plugin for weechat
89 Group: Applications/Communications
90 Requires: %{name} = %{version}-%{release}
92 %description plugin-guile
93 Guile scripting plugin for weechat.
96 Summary: IRC chat protocol plugin for weechat
97 Group: Applications/Communications
98 Requires: %{name} = %{version}-%{release}
100 %description plugin-irc
101 IRC chat protocol plugin for weechat.
103 %package plugin-javascript
104 Summary: JavaScript scripting plugin for weechat
105 Group: Applications/Communications
106 Requires: %{name} = %{version}-%{release}
108 %description plugin-javascript
109 JavaScript scripting plugin for weechat.
112 Summary: Lua scripting plugin for weechat
113 Group: Applications/Communications
114 Requires: %{name} = %{version}-%{release}
116 %description plugin-lua
117 Lua scripting plugin for weechat.
120 Summary: Perl scripting plugin for weechat
121 Group: Applications/Communications
122 Requires: %{name} = %{version}-%{release}
124 %description plugin-perl
125 Perl scripting plugin for weechat.
127 %package plugin-python
128 Summary: Python scripting plugin for weechat
129 Group: Applications/Communications
130 Requires: %{name} = %{version}-%{release}
132 %description plugin-python
133 Python scripting plugin for weechat.
135 %package plugin-relay
136 Summary: Relay data via network plugin for weechat
137 Group: Applications/Communications
138 Requires: %{name} = %{version}-%{release}
140 %description plugin-relay
141 Relay data via network plugin for weechat used by alternative
145 Summary: Ruby scripting plugin for weechat
146 Group: Applications/Communications
147 Requires: %{name} = %{version}-%{release}
149 %description plugin-ruby
150 Ruby scripting plugin for weechat.
152 %package plugin-spell
153 Summary: Spell checking plugin for weechat
154 Group: Applications/Communications
155 Requires: %{name} = %{version}-%{release}
157 %description plugin-spell
158 Spell checking plugin for weechat.
161 Summary: Tcl scripting plugin for weechat
162 Group: Applications/Communications
163 Requires: %{name} = %{version}-%{release}
165 %description plugin-tcl
166 Tcl scripting plugin for weechat.
169 Summary: File transfer and direct chat plugin for weechat
170 Group: Applications/Communications
171 Requires: %{name} = %{version}-%{release}
173 %description plugin-xfer
174 File transfer and direct chat plugin for weechat.
183 -DPREFIX=%{_prefix} \
184 -DLIBDIR=%{_libdir} \
185 -DENABLE_HEADLESS=OFF \
186 -DENABLE_NCURSES=ON \
187 %{cmake_on_off aspell ENABLE_SPELL} \
188 %{cmake_on_off doc ENABLE_DOC} \
189 %{cmake_on_off perl ENABLE_PERL} \
190 %{cmake_on_off php ENABLE_PHP} \
191 %{cmake_on_off python ENABLE_PYTHON} \
192 %{cmake_on_off ruby ENABLE_RUBY} \
193 %{cmake_on_off lua ENABLE_LUA} \
194 %{cmake_on_off guile ENABLE_GUILE} \
195 %{cmake_on_off tcl ENABLE_TCL} \
196 %{cmake_on_off doc ENABLE_MAN} \
197 %{cmake_on_off js ENABLE_JAVASCRIPT} \
203 rm -rf $RPM_BUILD_ROOT
204 %{__make} -C build install \
205 DESTDIR=$RPM_BUILD_ROOT
207 # symlink to "weechat"
208 %{__rm} $RPM_BUILD_ROOT%{_bindir}/weechat-curses
211 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/%{name}
212 %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
217 rm -rf $RPM_BUILD_ROOT
220 %update_desktop_database
221 %update_icon_cache hicolor
222 %update_mime_database
225 %update_desktop_database_postun
226 %update_icon_cache hicolor
227 %update_mime_database
229 %files -f %{name}.lang
230 %defattr(644,root,root,755)
231 %doc AUTHORS.adoc ChangeLog.adoc README.adoc ReleaseNotes.adoc
232 %attr(755,root,root) %{_bindir}/weechat
234 %{_mandir}/man1/weechat.1*
235 %lang(cs) %{_mandir}/cs/man1/weechat.1*
236 %lang(de) %{_mandir}/de/man1/weechat.1*
237 %lang(fr) %{_mandir}/fr/man1/weechat.1*
238 %lang(it) %{_mandir}/it/man1/weechat.1*
239 %lang(ja) %{_mandir}/ja/man1/weechat.1*
240 %lang(pl) %{_mandir}/pl/man1/weechat.1*
241 %lang(ru) %{_mandir}/ru/man1/weechat.1*
243 %{_iconsdir}/hicolor/*/apps/weechat.png
244 %{_desktopdir}/%{name}.desktop
246 %dir %{_libdir}/%{name}
247 %dir %{_libdir}/%{name}/plugins
248 %attr(755,root,root) %{_libdir}/%{name}/plugins/alias.so
249 %attr(755,root,root) %{_libdir}/%{name}/plugins/buflist.so
250 %attr(755,root,root) %{_libdir}/%{name}/plugins/charset.so
251 %attr(755,root,root) %{_libdir}/%{name}/plugins/exec.so
252 %attr(755,root,root) %{_libdir}/%{name}/plugins/fifo.so
253 %attr(755,root,root) %{_libdir}/%{name}/plugins/fset.so
254 %attr(755,root,root) %{_libdir}/%{name}/plugins/logger.so
255 %attr(755,root,root) %{_libdir}/%{name}/plugins/script.so
256 %attr(755,root,root) %{_libdir}/%{name}/plugins/trigger.so
257 %attr(755,root,root) %{_libdir}/%{name}/plugins/typing.so
261 %defattr(644,root,root,755)
262 %dir %{_docdir}/%{name}
263 %lang(cs) %{_docdir}/%{name}/*.cs.html
264 %lang(de) %{_docdir}/%{name}/*.de.html
265 %lang(en) %{_docdir}/%{name}/*.en.html
266 %lang(es) %{_docdir}/%{name}/*.es.html
267 %lang(fr) %{_docdir}/%{name}/*.fr.html
268 %lang(it) %{_docdir}/%{name}/*.it.html
269 %lang(ja) %{_docdir}/%{name}/*.ja.html
270 %lang(pl) %{_docdir}/%{name}/*.pl.html
271 %lang(ru) %{_docdir}/%{name}/*.ru.html
276 %defattr(644,root,root,755)
277 %attr(755,root,root) %{_libdir}/%{name}/plugins/guile.so
281 %defattr(644,root,root,755)
282 %attr(755,root,root) %{_libdir}/%{name}/plugins/irc.so
285 %files plugin-javascript
286 %defattr(644,root,root,755)
287 %attr(755,root,root) %{_libdir}/%{name}/plugins/javascript.so
292 %defattr(644,root,root,755)
293 %attr(755,root,root) %{_libdir}/%{name}/plugins/lua.so
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_libdir}/%{name}/plugins/perl.so
304 %defattr(644,root,root,755)
305 %attr(755,root,root) %{_libdir}/%{name}/plugins/python.so
309 %defattr(644,root,root,755)
310 %attr(755,root,root) %{_libdir}/%{name}/plugins/relay.so
314 %defattr(644,root,root,755)
315 %attr(755,root,root) %{_libdir}/%{name}/plugins/ruby.so
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/%{name}/plugins/spell.so
326 %defattr(644,root,root,755)
327 %attr(755,root,root) %{_libdir}/%{name}/plugins/tcl.so
331 %defattr(644,root,root,755)
332 %attr(755,root,root) %{_libdir}/%{name}/plugins/xfer.so