]> git.pld-linux.org Git - packages/weechat.git/blob - weechat.spec
- release 4 (by relup.sh)
[packages/weechat.git] / weechat.spec
1 # TODO:
2 # - consider doing subpackages for all those plugins (which one should be in main package ?)
3 #
4 # Conditional build:
5 # Features
6 %bcond_without  aspell  # don't build aspell support
7 %bcond_without  gtk     # build gtk support
8 %bcond_without  gnutls  # don't build gnutls support
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
17
18 Summary:        WeeChat - fast and light chat environment
19 Summary(pl.UTF-8):      WeeChat - szybkie i lekkie środowisko do rozmów
20 Name:           weechat
21 Version:        0.4.0
22 Release:        4
23 License:        GPL v3+
24 Group:          Applications/Communications
25 Source0:        http://www.weechat.org/files/src/%{name}-%{version}.tar.gz
26 # Source0-md5:  6d3c0f338d4ec3fb3386becd1efa6ae1
27 Patch0:         %{name}-ac.patch
28 Patch1:         %{name}-plugins_header.patch
29 Patch2:         %{name}-curses.patch
30 Patch3:         findguile.patch
31 Patch4:         weechat-0.4.0-ruby-2.0-crash.patch
32 Patch5:         weechat-0.4.0-ruby-version.patch
33 URL:            http://www.weechat.org/
34 %{?with_aspell:BuildRequires:   aspell-devel}
35 BuildRequires:  cmake
36 BuildRequires:  curl-devel
37 BuildRequires:  gettext-devel
38 %{?with_gnutls:BuildRequires:   gnutls-devel}
39 %{?with_gtk:BuildRequires:      gtk+2-devel}
40 %{?with_guile:BuildRequires:    guile-devel}
41 BuildRequires:  libatomic_ops
42 BuildRequires:  libgcrypt-devel
43 %{?with_lua:BuildRequires:      lua51-devel}
44 BuildRequires:  ncurses-devel
45 %{?with_perl:BuildRequires:     perl-devel}
46 BuildRequires:  pkgconfig
47 BuildRequires:  sed >= 4.0
48 %if %{with python}
49 BuildRequires:  python-devel
50 BuildRequires:  python-modules
51 %endif
52 BuildRequires:  rpmbuild(macros) >= 1.129
53 %{?with_ruby:BuildRequires:     ruby-devel}
54 BuildRequires:  tcl-devel
55 Requires:       %{name}-common = %{version}-%{release}
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %define         skip_post_check_so      ruby.so.0.0.0
59
60 %description
61 WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat
62 environment for many operating systems. Everything can be done with a
63 keyboard. It is customizable and extensible with scripts.
64
65 %description -l pl.UTF-8
66 WeeChat (Wee Ehanced Environment for Chat) to szybkie i lekkie
67 środowisko do rozmów dla wielu systemów operacyjnych. Pozwala wszystko
68 zrobić przy pomocy klawiatury. Jest konfigurowalne i rozszerzalne za
69 pomocą skryptów.
70
71 %package gtk
72 Summary:        GTK WeeChat UI
73 Group:          Applications/Communications
74 Requires:       %{name}-common = %{version}-%{release}
75
76 %description gtk
77 GTK WeeChat UI.
78
79 %package common
80 Summary:        WeeChat common files
81 Group:          Applications/Communications
82
83 %description common
84 WeeChat common files for Curses and GTK UI.
85
86 %package doc
87 Summary:        Manual for weechat
88 Group:          Documentation
89
90 %description doc
91 HTML documentation for weechat.
92
93 %prep
94 %setup -q
95 %patch0 -p1
96 %patch1 -p1
97 %patch2 -p0
98 %patch3 -p1
99 %patch4 -p1
100 %patch5 -p1
101
102 %{__sed} -i -e 's#PYTHON_LIB=.*#PYTHON_LIB=%{_libdir}#g' configure.in
103 %{__sed} -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in
104
105 %if %{without gtk}
106 echo 'AC_DEFUN([AM_PATH_GTK_2_0],[])' >> acinclude.m4
107 %endif
108
109 %build
110 install -d build
111 cd build
112 %cmake \
113         -DPREFIX=%{_prefix} \
114         -DLIBDIR=%{_libdir} \
115         -DENABLE_NCURSES=ON \
116         -DENABLE_ASPELL=%{?with_aspell:ON}%{!?with_aspell:OFF} \
117         -DENABLE_GTK=%{?with_gtk:ON}%{!?with_gtk:OFF} \
118         -DENABLE_GNUTLS=%{?with_gnutls:ON}%{!?with_gnutls:OFF} \
119         -DENABLE_DOC=%{?with_doc:ON}%{!?with_doc:OFF} \
120         -DENABLE_PERL=%{?with_perl:ON}%{!?with_perl:OFF} \
121         -DENABLE_PYTHON=%{?with_python:ON}%{!?with_python:OFF} \
122         -DENABLE_RUBY=%{?with_ruby:ON}%{!?with_ruby:OFF} \
123         -DENABLE_LUA=%{?with_lua:ON}%{!?with_lua:OFF} \
124         -DENABLE_GUILE=%{?with_guile:ON}%{!?with_guile:OFF} \
125         -DENABLE_TCL=%{?with_tcl:ON}%{!?with_tcl:OFF} \
126         ..
127
128 %{__make} VERBOSE=1
129
130 %install
131 rm -rf $RPM_BUILD_ROOT
132 %{__make} -C build install \
133         DESTDIR=$RPM_BUILD_ROOT
134
135 # no -devel, drop
136 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/%{name}
137 %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
138
139 %find_lang %{name}
140
141 %clean
142 rm -rf $RPM_BUILD_ROOT
143
144 %files
145 %defattr(644,root,root,755)
146 %attr(755,root,root) %{_bindir}/weechat-curses
147 %{_mandir}/man1/weechat-curses.1*
148
149 %if %{with gtk}
150 %files gtk
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_bindir}/weechat-gtk
153 %endif
154
155 %files common -f %{name}.lang
156 %defattr(644,root,root,755)
157 %doc AUTHORS ChangeLog NEWS README
158 %dir %{_libdir}/weechat
159 %dir %{_libdir}/weechat/plugins
160 %attr(755,root,root) %{_libdir}/weechat/plugins/alias.so*
161 %attr(755,root,root) %{_libdir}/weechat/plugins/charset.so*
162 %attr(755,root,root) %{_libdir}/weechat/plugins/fifo.so*
163 %attr(755,root,root) %{_libdir}/weechat/plugins/irc.so*
164 %attr(755,root,root) %{_libdir}/weechat/plugins/logger.so*
165 %attr(755,root,root) %{_libdir}/weechat/plugins/relay.so*
166 %attr(755,root,root) %{_libdir}/weechat/plugins/rmodifier.so*
167 %attr(755,root,root) %{_libdir}/weechat/plugins/script.so*
168 %attr(755,root,root) %{_libdir}/weechat/plugins/xfer.so*
169
170 # addons
171 %{?with_aspell:%attr(755,root,root) %{_libdir}/weechat/plugins/aspell.so*}
172
173 # language bindings
174 %{?with_guile:%attr(755,root,root) %{_libdir}/weechat/plugins/guile.so*}
175 %{?with_lua:%attr(755,root,root) %{_libdir}/weechat/plugins/lua.so*}
176 %{?with_perl:%attr(755,root,root) %{_libdir}/weechat/plugins/perl.so*}
177 %{?with_python:%attr(755,root,root) %{_libdir}/weechat/plugins/python.so*}
178 %{?with_ruby:%attr(755,root,root) %{_libdir}/weechat/plugins/ruby.so*}
179 %{?with_tcl:%attr(755,root,root) %{_libdir}/weechat/plugins/tcl.so*}
180
181 %if %{with doc}
182 %files doc
183 %defattr(644,root,root,755)
184 %dir %{_docdir}/%{name}
185 %lang(de) %{_docdir}/%{name}/*.de.html
186 %lang(en) %{_docdir}/%{name}/*.en.html
187 %lang(es) %{_docdir}/%{name}/*.es.html
188 %lang(fr) %{_docdir}/%{name}/*.fr.html
189 %lang(it) %{_docdir}/%{name}/*.it.html
190 %lang(ja) %{_docdir}/%{name}/*.ja.html
191 %lang(pl) %{_docdir}/%{name}/*.pl.html
192 %lang(ru) %{_docdir}/%{name}/*.ru.html
193 %endif
This page took 0.107402 seconds and 3 git commands to generate.