- removed zero-sized bs files
[packages/irssi.git] / irssi.spec
1 #
2 # Conditional build:
3 %bcond_without  perl    # without perl support
4 %bcond_without  ipv6    # without IPv6 support
5 %bcond_without  ssl     # without SSL  support
6 %bcond_without  dynamic # without dynamic libraries
7 %bcond_without  xmpp    # without plugin
8
9 %define         no_install_post_check_so        1
10
11 %define         idea_ver        0.1.46
12 %define         xmpp_ver        0.52
13 %define         irssi_perl_version 20140111
14 %{?with_perl:%include   /usr/lib/rpm/macros.perl}
15 Summary:        Irssi is a IRC client
16 Summary(fr.UTF-8):      Irssi est un client IRC
17 Summary(hu.UTF-8):      Irssi egy IRC kliens
18 Summary(pl.UTF-8):      Irssi - wygodny w użyciu klient IRC
19 Name:           irssi
20 Version:        0.8.16
21 Release:        2
22 License:        GPL
23 Group:          Applications/Communications
24 #Source0:       http://www.irssi.org/files/snapshots/%{name}-%{_snap}.tar.gz
25 Source0:        http://www.irssi.org/files/%{name}-%{version}.tar.gz
26 # Source0-md5:  5a8ee7144b63fa01747d6f400c40ef34
27 Source1:        %{name}.desktop
28 Source2:        %{name}.png
29 # NXDOMAIN
30 #Source3:       http://real.irssi.org/files/plugins/idea/%{name}-idea-%{idea_ver}.tar.gz
31 Source3:        %{name}-idea-%{idea_ver}.tar.gz
32 # Source3-md5:  c326efe317b8f67593a3cd46d5557280
33 Source4:        http://cybione.org/~irssi-xmpp/files/irssi-xmpp-%{xmpp_ver}.tar.gz
34 # Source4-md5:  f48d66ddf6a6d8e4d04bfc44b83dc3c7
35 Patch0:         %{name}-dcc-send-limit.patch
36 Patch1:         %{name}-home_etc.patch
37 Patch2:         %{name}-idea-listlen.patch
38 Patch3:         %{name}-gcc4.patch
39 Patch4:         %{name}-dynamic.patch
40 Patch5:         %{name}-invalid_free.patch
41 Patch6:         %{name}-color_support_for_gui_entry.patch
42 Patch7:         %{name}-libs-nopoison.patch
43 Patch8:         am.patch
44 URL:            http://www.irssi.org/
45 BuildRequires:  autoconf
46 BuildRequires:  automake
47 BuildRequires:  gettext-devel
48 # for idea only
49 BuildRequires:  glib-devel
50 BuildRequires:  glib2-devel >= 2.24.0
51 BuildRequires:  libtool
52 %{?with_xmpp:BuildRequires:     loudmouth-devel}
53 BuildRequires:  ncurses-devel >= 5.0
54 %{?with_ssl:BuildRequires:      openssl-devel >= 0.9.7d}
55 %{?with_perl:BuildRequires:     perl-devel >= 1:5.8.4}
56 BuildRequires:  pkgconfig
57 BuildRequires:  popt-devel
58 %{?with_perl:BuildRequires:     rpm-perlprov}
59 BuildRequires:  rpmbuild(macros) >= 1.315
60 BuildRequires:  sed >= 4.0
61 Requires:       glib2 >= 2.24.0
62 Provides:       perl(Irssi) = %{irssi_perl_version}
63 Obsoletes:      irssi-speech
64 Obsoletes:      irssi-sql
65 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66
67 %if %{with dynamic}
68 %define         filterout_ld    -Wl,--as-needed
69 %endif
70
71 %description
72 Irssi is a textUI IRC client with IPv6 support.
73
74 %description -l fr.UTF-8
75 Irssi est client IRC.
76
77 %description -l hu.UTF-8
78 Irssi egy szöveges felületű IRC kliens IPv6 támogatással.
79
80 %description -l pl.UTF-8
81 Irssi jest tekstowym klientem IRC ze wsparciem dla IPv6.
82
83 %package plugin-idea
84 Summary:        Irssi plugin IDEA crypt
85 Summary(hu.UTF-8):      Irssi IDEA plugin
86 Summary(pl.UTF-8):      Wtyczka do irssi do szyfrowania IDEA
87 Group:          Applications/Communications
88 Requires:       %{name} = %{version}-%{release}
89 Requires:       glib >= 1:1.2.10-13
90
91 %description plugin-idea
92 This package contains IDEA Crypt plugin for Irssi.
93
94 %description plugin-idea -l hu.UTF-8
95 Ez a csomag tartalmazza az IDEA titkosítási plugint Irssi-hez.
96
97 %description plugin-idea -l pl.UTF-8
98 Ten pakiet zawiera wtyczkę do Irssi z szyfrowaniem IDEA.
99
100 %package plugin-xmpp
101 Summary:        Irssi XMPP support plugin
102 Summary(pl.UTF-8):      Wtyczka do irssi do obsługi XMPP
103 Group:          Applications/Communications
104 Requires:       %{name} = %{version}-%{release}
105
106 %description plugin-xmpp
107 This package contains XMPP support plugin for Irssi.
108
109 %description plugin-xmpp -l pl.UTF-8
110 Ten pakiet zawiera wtyczkę do Irssi z obsługą XMPP.
111
112 %prep
113 %setup -q -a3 -a4
114 %patch0 -p1
115 %patch1 -p1
116 %patch2 -p1
117 %patch3 -p1
118 %if %{with dynamic}
119 %patch4 -p1
120 %endif
121 %patch5 -p1
122 %patch6 -p0
123 %patch7 -p1
124
125 echo 'AC_DEFUN([AM_PATH_GLIB],[:])' > glib1.m4
126
127 mv irssi-idea{-%{idea_ver},}
128 mv irssi-xmpp{-%{xmpp_ver},}
129 %patch8 -p1
130
131 # hack
132 %{__sed} -i -e 's#\./libtool#%{_bindir}/libtool#g' 'configure.in'
133
134 %build
135 ver=$(awk '/IRSSI_VERSION_DATE/{print $3}' irssi-version.h)
136 if [ "$ver" != "%{irssi_perl_version}" ]; then
137         : update irssi_perl_version to $ver
138         exit 1
139 fi
140
141 %{__libtoolize}
142 %{__aclocal} -I .
143 %{__autoconf}
144 %{__automake}
145 %configure \
146         --without-socks \
147         --with-bot \
148         --with-textui \
149         --with-proxy \
150         --with-terminfo \
151         --with-modules \
152         %{?with_perl:--with-perl=yes} \
153         %{?with_perl:--with-perl-lib=vendor} \
154         %{!?with_perl:--with-perl=no} \
155         %{?with_ipv6:--enable-ipv6} \
156         --enable-nls \
157         --%{?with_ssl:en}%{!?with_ssl:dis}able-ssl
158
159 %{__make}
160
161 # to fool idea configure script
162 touch irssi-config
163 cd irssi-idea
164 %{__libtoolize}
165 %{__aclocal} -I .
166 %{__autoconf}
167 %{__automake}
168 %configure
169 %{__make}
170
171 cd ..
172 export IRSSI_INCLUDE=`pwd`
173 cd irssi-xmpp
174 %{__make}
175
176 %install
177 rm -rf $RPM_BUILD_ROOT
178 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}}
179 %{__make} install \
180         DESTDIR=$RPM_BUILD_ROOT \
181         docdir=%{_datadir}/%{name}-%{version}
182
183 # scripts packaged by irssi-scripts.spec
184 rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts/*
185
186 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
187 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
188
189 %{__make} -C irssi-idea install \
190         DESTDIR=$RPM_BUILD_ROOT
191
192 %{__make} -C irssi-xmpp install \
193         PREFIX=%{_prefix} \
194         IRSSI_LIB=%{_libdir}/%{name} \
195         DESTDIR=$RPM_BUILD_ROOT
196
197 # -devel?
198 rm $RPM_BUILD_ROOT%{_libdir}/lib*.{so,la,a}
199 rm -r $RPM_BUILD_ROOT%{_includedir}/irssi
200 # cleanup
201 rm $RPM_BUILD_ROOT%{_libdir}/irssi/modules/lib*.{la,a}
202 %if %{with perl}
203 rm $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
204 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Irssi/.packlist
205 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Irssi/Irc/.packlist
206 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Irssi/TextUI/.packlist
207 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Irssi/UI/.packlist
208 %endif
209 rm -r $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
210
211 %clean
212 rm -rf $RPM_BUILD_ROOT
213
214 %files
215 %defattr(644,root,root,755)
216 %doc AUTHORS ChangeLog README TODO NEWS docs/*.{txt,html}
217 %attr(755,root,root) %{_bindir}/botti
218 %attr(755,root,root) %{_bindir}/irssi
219 %dir %{_libdir}/irssi
220 %dir %{_libdir}/irssi/modules
221 %attr(755,root,root) %{_libdir}/irssi/modules/libirc_proxy.so*
222 %if %{with dynamic}
223 %attr(755,root,root) %{_libdir}/libirssi*.so.*
224 %endif
225 %dir %{_datadir}/%{name}
226 %dir %{_datadir}/%{name}/scripts
227 %{_datadir}/%{name}/help
228 %{_datadir}/%{name}/themes
229 %{_desktopdir}/irssi.desktop
230 %{_pixmapsdir}/irssi.png
231 %{_sysconfdir}/irssi.conf
232 %{_mandir}/man1/irssi.1*
233
234 %if %{with perl}
235 %{perl_vendorarch}/*.pm
236 %dir %{perl_vendorarch}/Irssi
237 %{perl_vendorarch}/Irssi/*.pm
238
239 %dir %{perl_vendorarch}/auto/Irssi
240 %attr(755,root,root) %{perl_vendorarch}/auto/Irssi/*.so
241
242 %dir %{perl_vendorarch}/auto/Irssi/Irc
243 %attr(755,root,root) %{perl_vendorarch}/auto/Irssi/Irc/*.so
244
245 %dir %{perl_vendorarch}/auto/Irssi/TextUI
246 %attr(755,root,root) %{perl_vendorarch}/auto/Irssi/TextUI/*.so
247
248 %dir %{perl_vendorarch}/auto/Irssi/UI
249 %attr(755,root,root) %{perl_vendorarch}/auto/Irssi/UI/*.so
250 %endif
251
252 %files plugin-idea
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_libdir}/irssi/modules/libidea.so
255
256 %files plugin-xmpp
257 %defattr(644,root,root,755)
258 %doc irssi-xmpp/{docs/*,NEWS,README,TODO}
259 %attr(755,root,root) %{_libdir}/irssi/modules/libfe_xmpp.so
260 %attr(755,root,root) %{_libdir}/irssi/modules/libtext_xmpp.so
261 %attr(755,root,root) %{_libdir}/irssi/modules/libxmpp_core.so
This page took 0.142095 seconds and 3 git commands to generate.