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