]> git.pld-linux.org Git - packages/weechat.git/blob - weechat.spec
add cmake flag for enabling/disabling js
[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  gnutls  # don't build gnutls support
9 %bcond_with     doc     # don't build docs
10 # Bindings
11 %bcond_without  guile   # don't enable Scheme (guile) scripting language
12 %bcond_without  lua     # don't enable Lua scripting language
13 %bcond_without  perl    # don't enable Perl scripting language
14 %bcond_with     php     # don't enable PHP scripting language
15 %bcond_without  python  # don't enable Python scripting language
16 %bcond_without  ruby    # don't enable Ruby scripting language
17 %bcond_without  tcl     # don't enable Tcl scripting language
18 %bcond_without  js      # don't enable JavaScript scripting language (V8 engine)
19
20 %ifnarch %{ix86} %{x8664} arm mips
21 %undefine       with_js
22 %endif
23
24 %define         php_name        php%{?php_suffix}
25
26 Summary:        WeeChat - fast and light chat environment
27 Summary(pl.UTF-8):      WeeChat - szybkie i lekkie środowisko do rozmów
28 Name:           weechat
29 Version:        2.7.1
30 Release:        1
31 License:        GPL v3+
32 Group:          Applications/Communications
33 Source0:        http://www.weechat.org/files/src/%{name}-%{version}.tar.gz
34 # Source0-md5:  2766e82e5500dadfcc0e2bcfdb0ec5b0
35 Patch0:         %{name}-curses.patch
36 URL:            http://www.weechat.org/
37 %{?with_doc:BuildRequires:      asciidoctor}
38 %{?with_aspell:BuildRequires:   aspell-devel}
39 BuildRequires:  cmake >= 3.0
40 BuildRequires:  curl-devel
41 BuildRequires:  gettext-tools
42 %{?with_gnutls:BuildRequires:   gnutls-devel}
43 %{?with_guile:BuildRequires:    guile-devel}
44 BuildRequires:  libgcrypt-devel
45 %{?with_lua:BuildRequires:      lua51-devel}
46 BuildRequires:  ncurses-devel
47 %{?with_perl:BuildRequires:     perl-devel}
48 %{?with_php:BuildRequires:      %{php_name}-devel >= 4:7}
49 BuildRequires:  pkgconfig
50 BuildRequires:  sed >= 4.0
51 %{?with_js:BuildRequires:       v8-devel}
52 %if %{with python}
53 BuildRequires:  python-devel
54 BuildRequires:  python-modules
55 %endif
56 BuildRequires:  rpmbuild(macros) >= 1.129
57 %{?with_ruby:BuildRequires:     ruby-devel}
58 %{?with_tcl:BuildRequires:      tcl-devel}
59 Requires(post,postun):  desktop-file-utils
60 Requires(post,postun):  gtk-update-icon-cache
61 Obsoletes:      weechat-common
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %define         skip_post_check_so      ruby.so.0.0.0
65
66 %description
67 WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat
68 environment for many operating systems. Everything can be done with a
69 keyboard. It is customizable and extensible with scripts.
70
71 %description -l pl.UTF-8
72 WeeChat (Wee Ehanced Environment for Chat) to szybkie i lekkie
73 środowisko do rozmów dla wielu systemów operacyjnych. Pozwala wszystko
74 zrobić przy pomocy klawiatury. Jest konfigurowalne i rozszerzalne za
75 pomocą skryptów.
76
77 %package doc
78 Summary:        Manual for weechat
79 Group:          Documentation
80 %if "%{_rpmversion}" >= "5"
81 BuildArch:      noarch
82 %endif
83
84 %description doc
85 HTML documentation for weechat.
86
87 %prep
88 %setup -q
89 %patch0 -p0
90
91 %build
92 install -d build
93 cd build
94 %cmake \
95         -DPREFIX=%{_prefix} \
96         -DLIBDIR=%{_libdir} \
97         -DENABLE_NCURSES=ON \
98         -DENABLE_ASPELL=%{?with_aspell:ON}%{!?with_aspell:OFF} \
99         -DENABLE_GNUTLS=%{?with_gnutls:ON}%{!?with_gnutls:OFF} \
100         -DENABLE_DOC=%{?with_doc:ON}%{!?with_doc:OFF} \
101         -DENABLE_PERL=%{?with_perl:ON}%{!?with_perl:OFF} \
102         -DENABLE_PHP=%{?with_php:ON}%{!?with_php:OFF} \
103         -DENABLE_PYTHON=%{?with_python:ON}%{!?with_python:OFF} \
104         -DENABLE_RUBY=%{?with_ruby:ON}%{!?with_ruby:OFF} \
105         -DENABLE_LUA=%{?with_lua:ON}%{!?with_lua:OFF} \
106         -DENABLE_GUILE=%{?with_guile:ON}%{!?with_guile:OFF} \
107         -DENABLE_TCL=%{?with_tcl:ON}%{!?with_tcl:OFF} \
108         -DENABLE_MAN=%{?with_doc:ON}%{!?with_doc:OFF} \
109         -DENABLE_JAVASCRIPT=%{?with_js:ON}%{!?with_js:OFF} \
110         ..
111
112 %{__make} VERBOSE=1
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116 %{__make} -C build install \
117         DESTDIR=$RPM_BUILD_ROOT
118
119 # symlink to "weechat"
120 %{__rm} $RPM_BUILD_ROOT%{_bindir}/weechat-curses
121
122 # no -devel, drop
123 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/%{name}
124 %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
125
126 %find_lang %{name}
127
128 %clean
129 rm -rf $RPM_BUILD_ROOT
130
131 %post
132 %update_desktop_database
133 %update_icon_cache hicolor
134 %update_mime_database
135
136 %postun
137 %update_desktop_database_postun
138 %update_icon_cache hicolor
139 %update_mime_database
140
141 %files -f %{name}.lang
142 %defattr(644,root,root,755)
143 %doc AUTHORS.adoc ChangeLog.adoc README.adoc ReleaseNotes.adoc
144 %attr(755,root,root) %{_bindir}/weechat
145 %attr(755,root,root) %{_bindir}/weechat-headless
146 %if %{with doc}
147 %{_mandir}/man1/weechat.1*
148 %lang(cs) %{_mandir}/cs/man1/weechat.1*
149 %lang(de) %{_mandir}/de/man1/weechat.1*
150 %lang(fr) %{_mandir}/fr/man1/weechat.1*
151 %lang(it) %{_mandir}/it/man1/weechat.1*
152 %lang(ja) %{_mandir}/ja/man1/weechat.1*
153 %lang(pl) %{_mandir}/pl/man1/weechat.1*
154 %lang(ru) %{_mandir}/ru/man1/weechat.1*
155 %endif
156 %{_iconsdir}/hicolor/*/apps/weechat.png
157 %{_desktopdir}/%{name}.desktop
158
159 %dir %{_libdir}/%{name}
160 %dir %{_libdir}/%{name}/plugins
161 %attr(755,root,root) %{_libdir}/%{name}/plugins/alias.so
162 %attr(755,root,root) %{_libdir}/%{name}/plugins/buflist.so
163 %attr(755,root,root) %{_libdir}/%{name}/plugins/charset.so
164 %attr(755,root,root) %{_libdir}/%{name}/plugins/exec.so
165 %attr(755,root,root) %{_libdir}/%{name}/plugins/fifo.so
166 %attr(755,root,root) %{_libdir}/%{name}/plugins/fset.so
167 %attr(755,root,root) %{_libdir}/%{name}/plugins/irc.so
168 %attr(755,root,root) %{_libdir}/%{name}/plugins/logger.so
169 %attr(755,root,root) %{_libdir}/%{name}/plugins/relay.so
170 %attr(755,root,root) %{_libdir}/%{name}/plugins/script.so
171 %attr(755,root,root) %{_libdir}/%{name}/plugins/trigger.so
172 %attr(755,root,root) %{_libdir}/%{name}/plugins/xfer.so
173
174 # addons
175 %{?with_aspell:%attr(755,root,root) %{_libdir}/%{name}/plugins/spell.so}
176
177 # language bindings
178 %{?with_guile:%attr(755,root,root) %{_libdir}/%{name}/plugins/guile.so}
179 %{?with_lua:%attr(755,root,root) %{_libdir}/%{name}/plugins/lua.so}
180 %{?with_perl:%attr(755,root,root) %{_libdir}/%{name}/plugins/perl.so}
181 %{?with_python:%attr(755,root,root) %{_libdir}/%{name}/plugins/python.so}
182 %{?with_ruby:%attr(755,root,root) %{_libdir}/%{name}/plugins/ruby.so}
183 %{?with_tcl:%attr(755,root,root) %{_libdir}/%{name}/plugins/tcl.so}
184 %{?with_js:%attr(755,root,root) %{_libdir}/%{name}/plugins/javascript.so}
185
186 %if %{with doc}
187 %files doc
188 %defattr(644,root,root,755)
189 %dir %{_docdir}/%{name}
190 %lang(cs) %{_docdir}/%{name}/*.cs.html
191 %lang(de) %{_docdir}/%{name}/*.de.html
192 %lang(en) %{_docdir}/%{name}/*.en.html
193 %lang(es) %{_docdir}/%{name}/*.es.html
194 %lang(fr) %{_docdir}/%{name}/*.fr.html
195 %lang(it) %{_docdir}/%{name}/*.it.html
196 %lang(ja) %{_docdir}/%{name}/*.ja.html
197 %lang(pl) %{_docdir}/%{name}/*.pl.html
198 %lang(ru) %{_docdir}/%{name}/*.ru.html
199 %endif
This page took 0.072987 seconds and 4 git commands to generate.