]> git.pld-linux.org Git - packages/weechat.git/blob - weechat.spec
b7aac1b79572e470ac18aae60399893819f35108
[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.3
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:  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
47 %if %{with python}
48 BuildRequires:  python3-devel
49 BuildRequires:  python3-modules
50 %endif
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}
58 BuildRequires:  xz
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)
65
66 %define         skip_post_check_so      ruby.so.0.0.0
67
68 %description
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.
72
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
77 pomocą skryptów.
78
79 %package doc
80 Summary:        Manual for weechat
81 Group:          Documentation
82 BuildArch:      noarch
83
84 %description doc
85 HTML documentation for weechat.
86
87 %package plugin-guile
88 Summary:        Guile scripting plugin for weechat
89 Group:          Applications/Communications
90 Requires:       %{name} = %{version}-%{release}
91
92 %description plugin-guile
93 Guile scripting plugin for weechat.
94
95 %package plugin-irc
96 Summary:        IRC chat protocol plugin for weechat
97 Group:          Applications/Communications
98 Requires:       %{name} = %{version}-%{release}
99
100 %description plugin-irc
101 IRC chat protocol plugin for weechat.
102
103 %package plugin-javascript
104 Summary:        JavaScript scripting plugin for weechat
105 Group:          Applications/Communications
106 Requires:       %{name} = %{version}-%{release}
107
108 %description plugin-javascript
109 JavaScript scripting plugin for weechat.
110
111 %package plugin-lua
112 Summary:        Lua scripting plugin for weechat
113 Group:          Applications/Communications
114 Requires:       %{name} = %{version}-%{release}
115
116 %description plugin-lua
117 Lua scripting plugin for weechat.
118
119 %package plugin-perl
120 Summary:        Perl scripting plugin for weechat
121 Group:          Applications/Communications
122 Requires:       %{name} = %{version}-%{release}
123
124 %description plugin-perl
125 Perl scripting plugin for weechat.
126
127 %package plugin-python
128 Summary:        Python scripting plugin for weechat
129 Group:          Applications/Communications
130 Requires:       %{name} = %{version}-%{release}
131
132 %description plugin-python
133 Python scripting plugin for weechat.
134
135 %package plugin-relay
136 Summary:        Relay data via network plugin for weechat
137 Group:          Applications/Communications
138 Requires:       %{name} = %{version}-%{release}
139
140 %description plugin-relay
141 Relay data via network plugin for weechat used by alternative
142 frontends.
143
144 %package plugin-ruby
145 Summary:        Ruby scripting plugin for weechat
146 Group:          Applications/Communications
147 Requires:       %{name} = %{version}-%{release}
148
149 %description plugin-ruby
150 Ruby scripting plugin for weechat.
151
152 %package plugin-spell
153 Summary:        Spell checking plugin for weechat
154 Group:          Applications/Communications
155 Requires:       %{name} = %{version}-%{release}
156
157 %description plugin-spell
158 Spell checking plugin for weechat.
159
160 %package plugin-tcl
161 Summary:        Tcl scripting plugin for weechat
162 Group:          Applications/Communications
163 Requires:       %{name} = %{version}-%{release}
164
165 %description plugin-tcl
166 Tcl scripting plugin for weechat.
167
168 %package plugin-xfer
169 Summary:        File transfer and direct chat plugin for weechat
170 Group:          Applications/Communications
171 Requires:       %{name} = %{version}-%{release}
172
173 %description plugin-xfer
174 File transfer and direct chat plugin for weechat.
175
176 %prep
177 %setup -q
178
179 %build
180 install -d build
181 cd build
182 %cmake \
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} \
198         ..
199
200 %{__make} VERBOSE=1
201
202 %install
203 rm -rf $RPM_BUILD_ROOT
204 %{__make} -C build install \
205         DESTDIR=$RPM_BUILD_ROOT
206
207 # symlink to "weechat"
208 %{__rm} $RPM_BUILD_ROOT%{_bindir}/weechat-curses
209
210 # no -devel, drop
211 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/%{name}
212 %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
213
214 %find_lang %{name}
215
216 %clean
217 rm -rf $RPM_BUILD_ROOT
218
219 %post
220 %update_desktop_database
221 %update_icon_cache hicolor
222 %update_mime_database
223
224 %postun
225 %update_desktop_database_postun
226 %update_icon_cache hicolor
227 %update_mime_database
228
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
233 %if %{with doc}
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*
242 %endif
243 %{_iconsdir}/hicolor/*/apps/weechat.png
244 %{_desktopdir}/%{name}.desktop
245
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
258
259 %if %{with doc}
260 %files doc
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
272 %endif
273
274 %if %{with guile}
275 %files plugin-guile
276 %defattr(644,root,root,755)
277 %attr(755,root,root) %{_libdir}/%{name}/plugins/guile.so
278 %endif
279
280 %files plugin-irc
281 %defattr(644,root,root,755)
282 %attr(755,root,root) %{_libdir}/%{name}/plugins/irc.so
283
284 %if %{with js}
285 %files plugin-javascript
286 %defattr(644,root,root,755)
287 %attr(755,root,root) %{_libdir}/%{name}/plugins/javascript.so
288 %endif
289
290 %if %{with lua}
291 %files plugin-lua
292 %defattr(644,root,root,755)
293 %attr(755,root,root) %{_libdir}/%{name}/plugins/lua.so
294 %endif
295
296 %if %{with perl}
297 %files plugin-perl
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_libdir}/%{name}/plugins/perl.so
300 %endif
301
302 %if %{with python}
303 %files plugin-python
304 %defattr(644,root,root,755)
305 %attr(755,root,root) %{_libdir}/%{name}/plugins/python.so
306 %endif
307
308 %files plugin-relay
309 %defattr(644,root,root,755)
310 %attr(755,root,root) %{_libdir}/%{name}/plugins/relay.so
311
312 %if %{with ruby}
313 %files plugin-ruby
314 %defattr(644,root,root,755)
315 %attr(755,root,root) %{_libdir}/%{name}/plugins/ruby.so
316 %endif
317
318 %if %{with aspell}
319 %files plugin-spell
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/%{name}/plugins/spell.so
322 %endif
323
324 %if %{with tcl}
325 %files plugin-tcl
326 %defattr(644,root,root,755)
327 %attr(755,root,root) %{_libdir}/%{name}/plugins/tcl.so
328 %endif
329
330 %files plugin-xfer
331 %defattr(644,root,root,755)
332 %attr(755,root,root) %{_libdir}/%{name}/plugins/xfer.so
This page took 0.08971 seconds and 2 git commands to generate.