]>
Commit | Line | Data |
---|---|---|
2bcfc6bc | 1 | # TODO: |
2bcfc6bc | 2 | # - consider doing subpackages for all those plugins (which one should be in main package ?) |
cb1359d3 | 3 | # - desktop file (icon exists, but no desktop file?) |
bf2eabf0 JB |
4 | # |
5 | # Conditional build: | |
875a60b1 | 6 | # Features |
dae692bf | 7 | %bcond_without aspell # don't build aspell support |
9aa8ff7b | 8 | %bcond_without gnutls # don't build gnutls support |
875a60b1 ER |
9 | %bcond_without 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_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 | |
9fc5e4a1 | 17 | %bcond_without js # don't enable JavaScript scripting language (V8 engine) |
d4846710 | 18 | |
93f2c1d6 ER |
19 | %ifnarch %{ix86} %{x8664} arm mips |
20 | %undefine with_js | |
21 | %endif | |
22 | ||
bf2eabf0 JB |
23 | Summary: WeeChat - fast and light chat environment |
24 | Summary(pl.UTF-8): WeeChat - szybkie i lekkie środowisko do rozmów | |
88c48961 | 25 | Name: weechat |
aea7cf80 | 26 | Version: 1.5 |
616b47a4 | 27 | Release: 8 |
ccd085cc | 28 | License: GPL v3+ |
740c529c | 29 | Group: Applications/Communications |
46ecdc76 | 30 | Source0: http://www.weechat.org/files/src/%{name}-%{version}.tar.gz |
aea7cf80 | 31 | # Source0-md5: 6e4f9c2ec870aab0696c43936800d733 |
996e14d1 | 32 | Patch2: %{name}-curses.patch |
46ecdc76 | 33 | URL: http://www.weechat.org/ |
15b21d5d | 34 | %{?with_doc:BuildRequires: asciidoc} |
bf2eabf0 | 35 | %{?with_aspell:BuildRequires: aspell-devel} |
875a60b1 | 36 | BuildRequires: cmake |
ccac3bc6 | 37 | BuildRequires: curl-devel |
8131d0d8 | 38 | BuildRequires: gettext-tools |
ccd085cc | 39 | %{?with_gnutls:BuildRequires: gnutls-devel} |
875a60b1 | 40 | %{?with_guile:BuildRequires: guile-devel} |
6c113da7 | 41 | BuildRequires: libgcrypt-devel |
21f7ad0d | 42 | %{?with_lua:BuildRequires: lua51-devel} |
387a8b12 | 43 | BuildRequires: ncurses-devel |
9aa8ff7b | 44 | %{?with_perl:BuildRequires: perl-devel} |
6757fa8b | 45 | BuildRequires: pkgconfig |
18c4530e | 46 | BuildRequires: sed >= 4.0 |
15b21d5d | 47 | %{?with_doc:BuildRequires: source-highlight} |
9fc5e4a1 | 48 | %{?with_js:BuildRequires: v8-devel} |
6757fa8b KK |
49 | %if %{with python} |
50 | BuildRequires: python-devel | |
51 | BuildRequires: python-modules | |
52 | %endif | |
88c48961 | 53 | BuildRequires: rpmbuild(macros) >= 1.129 |
9aa8ff7b | 54 | %{?with_ruby:BuildRequires: ruby-devel} |
aea7cf80 | 55 | %{?with_tcl:BuildRequires: tcl-devel} |
9fb88636 | 56 | Obsoletes: weechat-common |
88c48961 | 57 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
58 | ||
18c4530e ER |
59 | %define skip_post_check_so ruby.so.0.0.0 |
60 | ||
88c48961 | 61 | %description |
62 | WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat | |
228b94b3 | 63 | environment for many operating systems. Everything can be done with a |
64 | keyboard. It is customizable and extensible with scripts. | |
88c48961 | 65 | |
bf2eabf0 JB |
66 | %description -l pl.UTF-8 |
67 | WeeChat (Wee Ehanced Environment for Chat) to szybkie i lekkie | |
68 | środowisko do rozmów dla wielu systemów operacyjnych. Pozwala wszystko | |
69 | zrobić przy pomocy klawiatury. Jest konfigurowalne i rozszerzalne za | |
70 | pomocą skryptów. | |
88c48961 | 71 | |
875a60b1 ER |
72 | %package doc |
73 | Summary: Manual for weechat | |
74 | Group: Documentation | |
5c9f949b ER |
75 | %if "%{_rpmversion}" >= "5" |
76 | BuildArch: noarch | |
77 | %endif | |
875a60b1 ER |
78 | |
79 | %description doc | |
80 | HTML documentation for weechat. | |
81 | ||
88c48961 | 82 | %prep |
83 | %setup -q | |
996e14d1 | 84 | %patch2 -p0 |
88c48961 | 85 | |
7c82dcb8 AS |
86 | %{__sed} -i -e 's#PYTHON_LIB=.*#PYTHON_LIB=%{_libdir}#g' configure.ac |
87 | %{__sed} -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac | |
9ce1fb53 | 88 | |
88c48961 | 89 | %build |
875a60b1 ER |
90 | install -d build |
91 | cd build | |
92 | %cmake \ | |
93 | -DPREFIX=%{_prefix} \ | |
94 | -DLIBDIR=%{_libdir} \ | |
95 | -DENABLE_NCURSES=ON \ | |
96 | -DENABLE_ASPELL=%{?with_aspell:ON}%{!?with_aspell:OFF} \ | |
875a60b1 ER |
97 | -DENABLE_GNUTLS=%{?with_gnutls:ON}%{!?with_gnutls:OFF} \ |
98 | -DENABLE_DOC=%{?with_doc:ON}%{!?with_doc:OFF} \ | |
99 | -DENABLE_PERL=%{?with_perl:ON}%{!?with_perl:OFF} \ | |
100 | -DENABLE_PYTHON=%{?with_python:ON}%{!?with_python:OFF} \ | |
101 | -DENABLE_RUBY=%{?with_ruby:ON}%{!?with_ruby:OFF} \ | |
102 | -DENABLE_LUA=%{?with_lua:ON}%{!?with_lua:OFF} \ | |
103 | -DENABLE_GUILE=%{?with_guile:ON}%{!?with_guile:OFF} \ | |
104 | -DENABLE_TCL=%{?with_tcl:ON}%{!?with_tcl:OFF} \ | |
34e14467 | 105 | -DENABLE_MAN=ON \ |
875a60b1 ER |
106 | .. |
107 | ||
108 | %{__make} VERBOSE=1 | |
88c48961 | 109 | |
110 | %install | |
111 | rm -rf $RPM_BUILD_ROOT | |
875a60b1 | 112 | %{__make} -C build install \ |
88c48961 | 113 | DESTDIR=$RPM_BUILD_ROOT |
114 | ||
cb1359d3 ER |
115 | # symlink to "weechat" |
116 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/weechat-curses | |
117 | ||
875a60b1 ER |
118 | # no -devel, drop |
119 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/%{name} | |
120 | %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc | |
9165132c | 121 | |
122 | %find_lang %{name} | |
123 | ||
88c48961 | 124 | %clean |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
9fb88636 | 127 | %files -f %{name}.lang |
7f12170a | 128 | %defattr(644,root,root,755) |
9fb88636 | 129 | %doc AUTHORS.asciidoc ChangeLog.asciidoc README.asciidoc ReleaseNotes.asciidoc |
7c82dcb8 AS |
130 | %attr(755,root,root) %{_bindir}/weechat |
131 | %{_mandir}/man1/weechat.1* | |
5fb273c2 | 132 | %lang(cs) %{_mandir}/cs/man1/weechat.1* |
be004e51 AS |
133 | %lang(de) %{_mandir}/de/man1/weechat.1* |
134 | %lang(fr) %{_mandir}/fr/man1/weechat.1* | |
135 | %lang(it) %{_mandir}/it/man1/weechat.1* | |
136 | %lang(ja) %{_mandir}/ja/man1/weechat.1* | |
cb1359d3 ER |
137 | %lang(pl) %{_mandir}/pl/man1/weechat.1* |
138 | %lang(ru) %{_mandir}/ru/man1/weechat.1* | |
139 | %{_iconsdir}/hicolor/*/apps/weechat.png | |
7f12170a | 140 | |
cb1359d3 ER |
141 | %dir %{_libdir}/%{name} |
142 | %dir %{_libdir}/%{name}/plugins | |
143 | %attr(755,root,root) %{_libdir}/%{name}/plugins/alias.so | |
144 | %attr(755,root,root) %{_libdir}/%{name}/plugins/charset.so | |
145 | %attr(755,root,root) %{_libdir}/%{name}/plugins/exec.so | |
146 | %attr(755,root,root) %{_libdir}/%{name}/plugins/fifo.so | |
147 | %attr(755,root,root) %{_libdir}/%{name}/plugins/irc.so | |
cb1359d3 ER |
148 | %attr(755,root,root) %{_libdir}/%{name}/plugins/logger.so |
149 | %attr(755,root,root) %{_libdir}/%{name}/plugins/relay.so | |
150 | %attr(755,root,root) %{_libdir}/%{name}/plugins/script.so | |
151 | %attr(755,root,root) %{_libdir}/%{name}/plugins/trigger.so | |
152 | %attr(755,root,root) %{_libdir}/%{name}/plugins/xfer.so | |
875a60b1 ER |
153 | |
154 | # addons | |
cb1359d3 | 155 | %{?with_aspell:%attr(755,root,root) %{_libdir}/%{name}/plugins/aspell.so} |
875a60b1 ER |
156 | |
157 | # language bindings | |
cb1359d3 ER |
158 | %{?with_guile:%attr(755,root,root) %{_libdir}/%{name}/plugins/guile.so} |
159 | %{?with_lua:%attr(755,root,root) %{_libdir}/%{name}/plugins/lua.so} | |
160 | %{?with_perl:%attr(755,root,root) %{_libdir}/%{name}/plugins/perl.so} | |
161 | %{?with_python:%attr(755,root,root) %{_libdir}/%{name}/plugins/python.so} | |
162 | %{?with_ruby:%attr(755,root,root) %{_libdir}/%{name}/plugins/ruby.so} | |
163 | %{?with_tcl:%attr(755,root,root) %{_libdir}/%{name}/plugins/tcl.so} | |
9fc5e4a1 | 164 | %{?with_js:%attr(755,root,root) %{_libdir}/%{name}/plugins/javascript.so} |
875a60b1 ER |
165 | |
166 | %if %{with doc} | |
167 | %files doc | |
168 | %defattr(644,root,root,755) | |
169 | %dir %{_docdir}/%{name} | |
5fb273c2 | 170 | %lang(cs) %{_docdir}/%{name}/*.cs.html |
875a60b1 ER |
171 | %lang(de) %{_docdir}/%{name}/*.de.html |
172 | %lang(en) %{_docdir}/%{name}/*.en.html | |
173 | %lang(es) %{_docdir}/%{name}/*.es.html | |
174 | %lang(fr) %{_docdir}/%{name}/*.fr.html | |
175 | %lang(it) %{_docdir}/%{name}/*.it.html | |
176 | %lang(ja) %{_docdir}/%{name}/*.ja.html | |
177 | %lang(pl) %{_docdir}/%{name}/*.pl.html | |
178 | %lang(ru) %{_docdir}/%{name}/*.ru.html | |
179 | %endif |