]> git.pld-linux.org Git - packages/weechat.git/blob - weechat.spec
f825e847fde02fc0e62aea43a28d4ed1692dd5d3
[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:        3.6
29 Release:        2
30 License:        GPL v3+
31 Group:          Applications/Communications
32 Source0:        https://www.weechat.org/files/src/%{name}-%{version}.tar.xz
33 # Source0-md5:  6a2f8256c3707c1d266106269567f1ea
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
47 %if %{with python}
48 BuildRequires:  python3-devel
49 BuildRequires:  python3-modules
50 %endif
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}
59 BuildRequires:  xz
60 BuildRequires:  zlib-devel
61 BuildRequires:  zstd-devel
62 Requires(post,postun):  desktop-file-utils
63 Suggests:       %{name}-icons
64 Suggests:       %{name}-plugin-irc
65 Obsoletes:      weechat-common
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %define         skip_post_check_so      ruby.so.0.0.0
69
70 %description
71 WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat
72 environment for many operating systems. Everything can be done with a
73 keyboard. It is customizable and extensible with scripts.
74
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.
80
81 %package doc
82 Summary:        Manual for weechat
83 Group:          Documentation
84 BuildArch:      noarch
85
86 %description doc
87 HTML documentation for weechat.
88
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
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
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
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
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
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
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
187 %prep
188 %setup -q
189
190 %build
191 install -d build
192 cd build
193 %cmake \
194         -DPREFIX=%{_prefix} \
195         -DLIBDIR=%{_libdir} \
196         -DENABLE_HEADLESS=OFF \
197         -DENABLE_NCURSES=ON \
198         %{cmake_on_off aspell ENABLE_SPELL} \
199         %{cmake_on_off doc ENABLE_DOC} \
200         %{cmake_on_off perl ENABLE_PERL} \
201         %{cmake_on_off php ENABLE_PHP} \
202         %{cmake_on_off python ENABLE_PYTHON} \
203         %{cmake_on_off ruby ENABLE_RUBY} \
204         %{cmake_on_off lua ENABLE_LUA} \
205         %{cmake_on_off guile ENABLE_GUILE} \
206         %{cmake_on_off tcl ENABLE_TCL} \
207         %{cmake_on_off doc ENABLE_MAN} \
208         %{cmake_on_off js ENABLE_JAVASCRIPT} \
209         ..
210
211 %{__make} VERBOSE=1
212
213 %install
214 rm -rf $RPM_BUILD_ROOT
215 %{__make} -C build install \
216         DESTDIR=$RPM_BUILD_ROOT
217
218 # symlink to "weechat"
219 %{__rm} $RPM_BUILD_ROOT%{_bindir}/weechat-curses
220
221 # no -devel, drop
222 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/%{name}
223 %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
224
225 %find_lang %{name}
226
227 %clean
228 rm -rf $RPM_BUILD_ROOT
229
230 %post
231 %update_desktop_database
232 %update_mime_database
233
234 %post icons
235 %update_icon_cache hicolor
236
237 %postun
238 %update_desktop_database_postun
239 %update_mime_database
240
241 %postun icons
242 %update_icon_cache hicolor
243
244 %files -f %{name}.lang
245 %defattr(644,root,root,755)
246 %doc AUTHORS.adoc ChangeLog.adoc README.adoc ReleaseNotes.adoc
247 %attr(755,root,root) %{_bindir}/weechat
248 %if %{with doc}
249 %{_mandir}/man1/weechat.1*
250 %lang(cs) %{_mandir}/cs/man1/weechat.1*
251 %lang(de) %{_mandir}/de/man1/weechat.1*
252 %lang(fr) %{_mandir}/fr/man1/weechat.1*
253 %lang(it) %{_mandir}/it/man1/weechat.1*
254 %lang(ja) %{_mandir}/ja/man1/weechat.1*
255 %lang(pl) %{_mandir}/pl/man1/weechat.1*
256 %lang(ru) %{_mandir}/ru/man1/weechat.1*
257 %endif
258 %{_desktopdir}/%{name}.desktop
259
260 %dir %{_libdir}/%{name}
261 %dir %{_libdir}/%{name}/plugins
262 %attr(755,root,root) %{_libdir}/%{name}/plugins/alias.so
263 %attr(755,root,root) %{_libdir}/%{name}/plugins/buflist.so
264 %attr(755,root,root) %{_libdir}/%{name}/plugins/charset.so
265 %attr(755,root,root) %{_libdir}/%{name}/plugins/exec.so
266 %attr(755,root,root) %{_libdir}/%{name}/plugins/fifo.so
267 %attr(755,root,root) %{_libdir}/%{name}/plugins/fset.so
268 %attr(755,root,root) %{_libdir}/%{name}/plugins/logger.so
269 %attr(755,root,root) %{_libdir}/%{name}/plugins/script.so
270 %attr(755,root,root) %{_libdir}/%{name}/plugins/trigger.so
271 %attr(755,root,root) %{_libdir}/%{name}/plugins/typing.so
272
273 %files icons
274 %defattr(644,root,root,755)
275 %{_iconsdir}/hicolor/*/apps/weechat.png
276
277 %if %{with doc}
278 %files doc
279 %defattr(644,root,root,755)
280 %dir %{_docdir}/%{name}
281 %lang(cs) %{_docdir}/%{name}/*.cs.html
282 %lang(de) %{_docdir}/%{name}/*.de.html
283 %lang(en) %{_docdir}/%{name}/*.en.html
284 %lang(es) %{_docdir}/%{name}/*.es.html
285 %lang(fr) %{_docdir}/%{name}/*.fr.html
286 %lang(it) %{_docdir}/%{name}/*.it.html
287 %lang(ja) %{_docdir}/%{name}/*.ja.html
288 %lang(pl) %{_docdir}/%{name}/*.pl.html
289 %lang(ru) %{_docdir}/%{name}/*.ru.html
290 %endif
291
292 %if %{with guile}
293 %files plugin-guile
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_libdir}/%{name}/plugins/guile.so
296 %endif
297
298 %files plugin-irc
299 %defattr(644,root,root,755)
300 %attr(755,root,root) %{_libdir}/%{name}/plugins/irc.so
301
302 %if %{with js}
303 %files plugin-javascript
304 %defattr(644,root,root,755)
305 %attr(755,root,root) %{_libdir}/%{name}/plugins/javascript.so
306 %endif
307
308 %if %{with lua}
309 %files plugin-lua
310 %defattr(644,root,root,755)
311 %attr(755,root,root) %{_libdir}/%{name}/plugins/lua.so
312 %endif
313
314 %if %{with perl}
315 %files plugin-perl
316 %defattr(644,root,root,755)
317 %attr(755,root,root) %{_libdir}/%{name}/plugins/perl.so
318 %endif
319
320 %if %{with python}
321 %files plugin-python
322 %defattr(644,root,root,755)
323 %attr(755,root,root) %{_libdir}/%{name}/plugins/python.so
324 %endif
325
326 %files plugin-relay
327 %defattr(644,root,root,755)
328 %attr(755,root,root) %{_libdir}/%{name}/plugins/relay.so
329
330 %if %{with ruby}
331 %files plugin-ruby
332 %defattr(644,root,root,755)
333 %attr(755,root,root) %{_libdir}/%{name}/plugins/ruby.so
334 %endif
335
336 %if %{with aspell}
337 %files plugin-spell
338 %defattr(644,root,root,755)
339 %attr(755,root,root) %{_libdir}/%{name}/plugins/spell.so
340 %endif
341
342 %if %{with tcl}
343 %files plugin-tcl
344 %defattr(644,root,root,755)
345 %attr(755,root,root) %{_libdir}/%{name}/plugins/tcl.so
346 %endif
347
348 %files plugin-xfer
349 %defattr(644,root,root,755)
350 %attr(755,root,root) %{_libdir}/%{name}/plugins/xfer.so
This page took 0.075914 seconds and 2 git commands to generate.