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