]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without perl # without perl support | |
4 | %bcond_without dynamic # without dynamic libraries | |
5 | %bcond_without xmpp # without plugin | |
6 | ||
7 | %define no_install_post_check_so 1 | |
8 | ||
9 | %define idea_ver 0.1.46 | |
10 | %define xmpp_ver 0.53 | |
11 | %define irssi_perl_version 20180213 | |
12 | %{?with_perl:%include /usr/lib/rpm/macros.perl} | |
13 | Summary: Irssi is a IRC client | |
14 | Summary(fr.UTF-8): Irssi est un client IRC | |
15 | Summary(hu.UTF-8): Irssi egy IRC kliens | |
16 | Summary(pl.UTF-8): Irssi - wygodny w użyciu klient IRC | |
17 | Name: irssi | |
18 | Version: 1.1.1 | |
19 | Release: 1 | |
20 | License: GPL | |
21 | Group: Applications/Communications | |
22 | Source0: https://github.com/irssi/irssi/releases/download/%{version}/%{name}-%{version}.tar.gz | |
23 | # Source0-md5: 8c2c494b2a7e3ab3ea6657f413ec890c | |
24 | Source1: %{name}.desktop | |
25 | Source2: %{name}.png | |
26 | # NXDOMAIN | |
27 | #Source3: http://real.irssi.org/files/plugins/idea/%{name}-idea-%{idea_ver}.tar.gz | |
28 | Source3: %{name}-idea-%{idea_ver}.tar.gz | |
29 | # Source3-md5: c326efe317b8f67593a3cd46d5557280 | |
30 | Source4: http://cybione.org/~irssi-xmpp/files/irssi-xmpp-%{xmpp_ver}.tar.gz | |
31 | # Source4-md5: 8c9906e4efbd6f3c8bd8420f0ac8fd91 | |
32 | Patch0: %{name}-dcc-send-limit.patch | |
33 | Patch1: %{name}-home_etc.patch | |
34 | Patch2: %{name}-idea-listlen.patch | |
35 | Patch3: %{name}-gcc4.patch | |
36 | Patch4: %{name}-dynamic.patch | |
37 | Patch5: %{name}-invalid_free.patch | |
38 | Patch6: %{name}-color_support_for_gui_entry.patch | |
39 | Patch7: %{name}-libs-nopoison.patch | |
40 | Patch8: am.patch | |
41 | Patch9: %{name}-idea-glib.patch | |
42 | Patch10: %{name}-xmpp.patch | |
43 | URL: http://www.irssi.org/ | |
44 | BuildRequires: autoconf | |
45 | BuildRequires: automake | |
46 | BuildRequires: gettext-tools | |
47 | # for idea only | |
48 | BuildRequires: glib-devel | |
49 | BuildRequires: glib2-devel >= 2.24.0 | |
50 | BuildRequires: libtool | |
51 | %{?with_xmpp:BuildRequires: loudmouth-devel} | |
52 | BuildRequires: ncurses-devel >= 5.0 | |
53 | BuildRequires: openssl-devel >= 0.9.7d | |
54 | %{?with_perl:BuildRequires: perl-devel >= 1:5.8.4} | |
55 | BuildRequires: pkgconfig | |
56 | BuildRequires: popt-devel | |
57 | %{?with_perl:BuildRequires: rpm-perlprov} | |
58 | BuildRequires: rpmbuild(macros) >= 1.315 | |
59 | BuildRequires: sed >= 4.0 | |
60 | Requires: glib2 >= 2.24.0 | |
61 | Provides: perl(Irssi) = %{irssi_perl_version} | |
62 | Obsoletes: irssi-speech | |
63 | Obsoletes: irssi-sql | |
64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
65 | ||
66 | %if %{with dynamic} | |
67 | %define filterout_ld -Wl,--as-needed | |
68 | %endif | |
69 | ||
70 | %description | |
71 | Irssi is a textUI IRC client with IPv6 support. | |
72 | ||
73 | %description -l fr.UTF-8 | |
74 | Irssi est client IRC. | |
75 | ||
76 | %description -l hu.UTF-8 | |
77 | Irssi egy szöveges felületű IRC kliens IPv6 támogatással. | |
78 | ||
79 | %description -l pl.UTF-8 | |
80 | Irssi jest tekstowym klientem IRC ze wsparciem dla IPv6. | |
81 | ||
82 | %package plugin-idea | |
83 | Summary: Irssi plugin IDEA crypt | |
84 | Summary(hu.UTF-8): Irssi IDEA plugin | |
85 | Summary(pl.UTF-8): Wtyczka do irssi do szyfrowania IDEA | |
86 | Group: Applications/Communications | |
87 | Requires: %{name} = %{version}-%{release} | |
88 | Requires: glib >= 1:1.2.10-13 | |
89 | ||
90 | %description plugin-idea | |
91 | This package contains IDEA Crypt plugin for Irssi. | |
92 | ||
93 | %description plugin-idea -l hu.UTF-8 | |
94 | Ez a csomag tartalmazza az IDEA titkosítási plugint Irssi-hez. | |
95 | ||
96 | %description plugin-idea -l pl.UTF-8 | |
97 | Ten pakiet zawiera wtyczkę do Irssi z szyfrowaniem IDEA. | |
98 | ||
99 | %package plugin-xmpp | |
100 | Summary: Irssi XMPP support plugin | |
101 | Summary(pl.UTF-8): Wtyczka do irssi do obsługi XMPP | |
102 | Group: Applications/Communications | |
103 | Requires: %{name} = %{version}-%{release} | |
104 | ||
105 | %description plugin-xmpp | |
106 | This package contains XMPP support plugin for Irssi. | |
107 | ||
108 | %description plugin-xmpp -l pl.UTF-8 | |
109 | Ten pakiet zawiera wtyczkę do Irssi z obsługą XMPP. | |
110 | ||
111 | %prep | |
112 | %setup -q -a3 -a4 | |
113 | %patch0 -p1 | |
114 | %patch1 -p1 | |
115 | %patch2 -p1 | |
116 | %patch3 -p1 | |
117 | %if %{with dynamic} | |
118 | %patch4 -p1 | |
119 | %endif | |
120 | %patch5 -p1 | |
121 | %patch6 -p0 | |
122 | %patch7 -p1 | |
123 | ||
124 | echo 'AC_DEFUN([AM_PATH_GLIB],[:])' > glib1.m4 | |
125 | ||
126 | mv irssi-idea{-%{idea_ver},} | |
127 | mv irssi-xmpp{-%{xmpp_ver},} | |
128 | %patch8 -p1 | |
129 | %patch9 -p0 | |
130 | %patch10 -p0 | |
131 | ||
132 | # hack | |
133 | %{__sed} -i -e 's#\./libtool#%{_bindir}/libtool#g' 'configure.ac' | |
134 | ||
135 | %build | |
136 | ver=$(awk '/IRSSI_VERSION_DATE/{print $3}' irssi-version.h) | |
137 | if [ "$ver" != "%{irssi_perl_version}" ]; then | |
138 | : update irssi_perl_version to $ver | |
139 | exit 1 | |
140 | fi | |
141 | ||
142 | %{__libtoolize} | |
143 | %{__aclocal} -I . | |
144 | %{__autoconf} | |
145 | %{__automake} | |
146 | %configure \ | |
147 | --disable-silent-rules \ | |
148 | --without-socks \ | |
149 | --with-bot \ | |
150 | --with-textui \ | |
151 | --with-proxy \ | |
152 | --with-modules \ | |
153 | %{?with_perl:--with-perl=yes} \ | |
154 | %{?with_perl:--with-perl-lib=vendor} \ | |
155 | %{!?with_perl:--with-perl=no} \ | |
156 | --enable-true-color | |
157 | ||
158 | %{__make} | |
159 | ||
160 | # to fool idea configure script | |
161 | touch irssi-config | |
162 | cd irssi-idea | |
163 | %{__libtoolize} | |
164 | %{__aclocal} -I . | |
165 | %{__autoconf} | |
166 | %{__automake} | |
167 | %configure \ | |
168 | --disable-silent-rules | |
169 | %{__make} | |
170 | cd .. | |
171 | ||
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 | docdir=%{_datadir}/%{name}-%{version} \ | |
181 | DESTDIR=$RPM_BUILD_ROOT | |
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.md 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 |