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