]> git.pld-linux.org Git - packages/weechat.git/blob - weechat.spec
cosmetic patch to skip man building for weechat-headless
[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.0
29 Release:        1
30 License:        GPL v3+
31 Group:          Applications/Communications
32 Source0:        http://www.weechat.org/files/src/%{name}-%{version}.tar.gz
33 # Source0-md5:  32f1df27dc643c4e7b4cee25d821e7ed
34 Patch0:         headless-man.patch
35 URL:            http://www.weechat.org/
36 %{?with_aspell:BuildRequires:   aspell-devel}
37 BuildRequires:  cmake >= 3.0
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 %{?with_doc:BuildRequires:      ruby-asciidoctor}
49 BuildRequires:  sed >= 4.0
50 %{?with_js:BuildRequires:       v8-devel}
51 %if %{with python}
52 BuildRequires:  python3-devel
53 BuildRequires:  python3-modules
54 %endif
55 BuildRequires:  rpmbuild(macros) >= 1.752
56 %{?with_ruby:BuildRequires:     ruby-devel >= 1:1.9}
57 %{?with_tcl:BuildRequires:      tcl-devel}
58 BuildRequires:  zlib-devel
59 Requires(post,postun):  desktop-file-utils
60 Requires(post,postun):  gtk-update-icon-cache
61 Suggests:       %{name}-plugin-irc
62 Obsoletes:      weechat-common
63 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65 %define         skip_post_check_so      ruby.so.0.0.0
66
67 %description
68 WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat
69 environment for many operating systems. Everything can be done with a
70 keyboard. It is customizable and extensible with scripts.
71
72 %description -l pl.UTF-8
73 WeeChat (Wee Ehanced Environment for Chat) to szybkie i lekkie
74 środowisko do rozmów dla wielu systemów operacyjnych. Pozwala wszystko
75 zrobić przy pomocy klawiatury. Jest konfigurowalne i rozszerzalne za
76 pomocą skryptów.
77
78 %package doc
79 Summary:        Manual for weechat
80 Group:          Documentation
81 %{?noarchpackage}
82
83 %description doc
84 HTML documentation for weechat.
85
86 %package plugin-guile
87 Summary:        Guile scripting plugin for weechat
88 Group:          Applications/Communications
89 Requires:       %{name} = %{version}-%{release}
90
91 %description plugin-guile
92 Guile scripting plugin for weechat.
93
94 %package plugin-irc
95 Summary:        IRC chat protocol plugin for weechat
96 Group:          Applications/Communications
97 Requires:       %{name} = %{version}-%{release}
98
99 %description plugin-irc
100 IRC chat protocol plugin for weechat.
101
102 %package plugin-javascript
103 Summary:        JavaScript scripting plugin for weechat
104 Group:          Applications/Communications
105 Requires:       %{name} = %{version}-%{release}
106
107 %description plugin-javascript
108 JavaScript scripting plugin for weechat.
109
110 %package plugin-lua
111 Summary:        Lua scripting plugin for weechat
112 Group:          Applications/Communications
113 Requires:       %{name} = %{version}-%{release}
114
115 %description plugin-lua
116 Lua scripting plugin for weechat.
117
118 %package plugin-perl
119 Summary:        Perl scripting plugin for weechat
120 Group:          Applications/Communications
121 Requires:       %{name} = %{version}-%{release}
122
123 %description plugin-perl
124 Perl scripting plugin for weechat.
125
126 %package plugin-python
127 Summary:        Python scripting plugin for weechat
128 Group:          Applications/Communications
129 Requires:       %{name} = %{version}-%{release}
130
131 %description plugin-python
132 Python scripting plugin for weechat.
133
134 %package plugin-relay
135 Summary:        Relay data via network plugin for weechat
136 Group:          Applications/Communications
137 Requires:       %{name} = %{version}-%{release}
138
139 %description plugin-relay
140 Relay data via network plugin for weechat used by alternative
141 frontends.
142
143 %package plugin-ruby
144 Summary:        Ruby scripting plugin for weechat
145 Group:          Applications/Communications
146 Requires:       %{name} = %{version}-%{release}
147
148 %description plugin-ruby
149 Ruby scripting plugin for weechat.
150
151 %package plugin-spell
152 Summary:        Spell checking plugin for weechat
153 Group:          Applications/Communications
154 Requires:       %{name} = %{version}-%{release}
155
156 %description plugin-spell
157 Spell checking plugin for weechat.
158
159 %package plugin-tcl
160 Summary:        Tcl scripting plugin for weechat
161 Group:          Applications/Communications
162 Requires:       %{name} = %{version}-%{release}
163
164 %description plugin-tcl
165 Tcl scripting plugin for weechat.
166
167 %package plugin-xfer
168 Summary:        File transfer and direct chat plugin for weechat
169 Group:          Applications/Communications
170 Requires:       %{name} = %{version}-%{release}
171
172 %description plugin-xfer
173 File transfer and direct chat plugin for weechat.
174
175 %prep
176 %setup -q
177 %patch0 -p1
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
258 %if %{with doc}
259 %files doc
260 %defattr(644,root,root,755)
261 %dir %{_docdir}/%{name}
262 %lang(cs) %{_docdir}/%{name}/*.cs.html
263 %lang(de) %{_docdir}/%{name}/*.de.html
264 %lang(en) %{_docdir}/%{name}/*.en.html
265 %lang(es) %{_docdir}/%{name}/*.es.html
266 %lang(fr) %{_docdir}/%{name}/*.fr.html
267 %lang(it) %{_docdir}/%{name}/*.it.html
268 %lang(ja) %{_docdir}/%{name}/*.ja.html
269 %lang(pl) %{_docdir}/%{name}/*.pl.html
270 %lang(ru) %{_docdir}/%{name}/*.ru.html
271 %endif
272
273 %if %{with guile}
274 %files plugin-guile
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_libdir}/%{name}/plugins/guile.so
277 %endif
278
279 %files plugin-irc
280 %defattr(644,root,root,755)
281 %attr(755,root,root) %{_libdir}/%{name}/plugins/irc.so
282
283 %if %{with js}
284 %files plugin-javascript
285 %defattr(644,root,root,755)
286 %attr(755,root,root) %{_libdir}/%{name}/plugins/javascript.so
287 %endif
288
289 %if %{with lua}
290 %files plugin-lua
291 %defattr(644,root,root,755)
292 %attr(755,root,root) %{_libdir}/%{name}/plugins/lua.so
293 %endif
294
295 %if %{with perl}
296 %files plugin-perl
297 %defattr(644,root,root,755)
298 %attr(755,root,root) %{_libdir}/%{name}/plugins/perl.so
299 %endif
300
301 %if %{with python}
302 %files plugin-python
303 %defattr(644,root,root,755)
304 %attr(755,root,root) %{_libdir}/%{name}/plugins/python.so
305 %endif
306
307 %files plugin-relay
308 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_libdir}/%{name}/plugins/relay.so
310
311 %if %{with ruby}
312 %files plugin-ruby
313 %defattr(644,root,root,755)
314 %attr(755,root,root) %{_libdir}/%{name}/plugins/ruby.so
315 %endif
316
317 %if %{with aspell}
318 %files plugin-spell
319 %defattr(644,root,root,755)
320 %attr(755,root,root) %{_libdir}/%{name}/plugins/spell.so
321 %endif
322
323 %if %{with tcl}
324 %files plugin-tcl
325 %defattr(644,root,root,755)
326 %attr(755,root,root) %{_libdir}/%{name}/plugins/tcl.so
327 %endif
328
329 %files plugin-xfer
330 %defattr(644,root,root,755)
331 %attr(755,root,root) %{_libdir}/%{name}/plugins/xfer.so
This page took 0.106941 seconds and 4 git commands to generate.