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