]>
Commit | Line | Data |
---|---|---|
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_with 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 20210409 | |
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.3 | |
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: ebbf455d8e9c847fc8106591088024ab | |
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 | %if %{with dynamic} | |
133 | %patch8 -p1 | |
134 | %endif | |
135 | %patch9 -p0 | |
136 | %patch10 -p0 | |
137 | ||
138 | # hack | |
139 | %{__sed} -i -e 's#\./libtool#%{_bindir}/libtool#g' 'configure.ac' | |
140 | ||
141 | %build | |
142 | ver=$(awk '/IRSSI_VERSION_DATE/{print $3}' irssi-version.h) | |
143 | if [ "$ver" != "%{irssi_perl_version}" ]; then | |
144 | : update irssi_perl_version to $ver | |
145 | exit 1 | |
146 | fi | |
147 | ||
148 | %{__libtoolize} | |
149 | %{__aclocal} -I . | |
150 | %{__autoconf} | |
151 | %{__automake} | |
152 | %configure \ | |
153 | --disable-silent-rules \ | |
154 | --without-socks \ | |
155 | --with-bot \ | |
156 | --with-textui \ | |
157 | --with-proxy \ | |
158 | --with-modules \ | |
159 | --with-otr \ | |
160 | %{?with_perl:--with-perl=yes} \ | |
161 | %{?with_perl:--with-perl-lib=vendor} \ | |
162 | %{!?with_perl:--with-perl=no} \ | |
163 | --enable-true-color | |
164 | ||
165 | %{__make} | |
166 | ||
167 | # to fool idea configure script | |
168 | touch irssi-config | |
169 | cd irssi-idea | |
170 | %{__libtoolize} | |
171 | %{__aclocal} -I . | |
172 | %{__autoconf} | |
173 | %{__automake} | |
174 | %configure \ | |
175 | --disable-silent-rules | |
176 | %{__make} | |
177 | cd .. | |
178 | ||
179 | export IRSSI_INCLUDE=`pwd` | |
180 | cd irssi-xmpp | |
181 | %{__make} | |
182 | ||
183 | %install | |
184 | rm -rf $RPM_BUILD_ROOT | |
185 | install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} | |
186 | %{__make} install \ | |
187 | docdir=%{_datadir}/%{name}-%{version} \ | |
188 | DESTDIR=$RPM_BUILD_ROOT | |
189 | ||
190 | # scripts packaged by irssi-scripts.spec | |
191 | rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts/* | |
192 | ||
193 | cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} | |
194 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir} | |
195 | ||
196 | %{__make} -C irssi-idea install \ | |
197 | DESTDIR=$RPM_BUILD_ROOT | |
198 | ||
199 | %{__make} -C irssi-xmpp install \ | |
200 | PREFIX=%{_prefix} \ | |
201 | IRSSI_LIB=%{_libdir}/%{name} \ | |
202 | DESTDIR=$RPM_BUILD_ROOT | |
203 | ||
204 | # -devel? | |
205 | %if %{with dynamic} | |
206 | rm $RPM_BUILD_ROOT%{_libdir}/lib*.{so,la,a} | |
207 | %endif | |
208 | rm -r $RPM_BUILD_ROOT%{_includedir}/irssi | |
209 | # cleanup | |
210 | rm $RPM_BUILD_ROOT%{_libdir}/irssi/modules/lib*.{la,a} | |
211 | %if %{with perl} | |
212 | rm $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod | |
213 | rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Irssi/.packlist | |
214 | rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Irssi/Irc/.packlist | |
215 | rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Irssi/TextUI/.packlist | |
216 | rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Irssi/UI/.packlist | |
217 | %endif | |
218 | rm -r $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version} | |
219 | ||
220 | %clean | |
221 | rm -rf $RPM_BUILD_ROOT | |
222 | ||
223 | %files | |
224 | %defattr(644,root,root,755) | |
225 | %doc AUTHORS ChangeLog README.md TODO NEWS docs/*.{txt,html} | |
226 | %attr(755,root,root) %{_bindir}/botti | |
227 | %attr(755,root,root) %{_bindir}/irssi | |
228 | %dir %{_libdir}/irssi | |
229 | %dir %{_libdir}/irssi/modules | |
230 | %attr(755,root,root) %{_libdir}/irssi/modules/libirc_proxy.so* | |
231 | %attr(755,root,root) %{_libdir}/irssi/modules/libotr_core.so* | |
232 | %if %{with dynamic} | |
233 | %attr(755,root,root) %{_libdir}/libirssi*.so.* | |
234 | %endif | |
235 | %dir %{_datadir}/%{name} | |
236 | %dir %{_datadir}/%{name}/scripts | |
237 | %{_datadir}/%{name}/help | |
238 | %{_datadir}/%{name}/themes | |
239 | %{_desktopdir}/irssi.desktop | |
240 | %{_pixmapsdir}/irssi.png | |
241 | %{_sysconfdir}/irssi.conf | |
242 | %{_mandir}/man1/irssi.1* | |
243 | ||
244 | %if %{with perl} | |
245 | %{perl_vendorarch}/*.pm | |
246 | %dir %{perl_vendorarch}/Irssi | |
247 | %{perl_vendorarch}/Irssi/*.pm | |
248 | ||
249 | %dir %{perl_vendorarch}/auto/Irssi | |
250 | %attr(755,root,root) %{perl_vendorarch}/auto/Irssi/*.so | |
251 | ||
252 | %dir %{perl_vendorarch}/auto/Irssi/Irc | |
253 | %attr(755,root,root) %{perl_vendorarch}/auto/Irssi/Irc/*.so | |
254 | ||
255 | %dir %{perl_vendorarch}/auto/Irssi/TextUI | |
256 | %attr(755,root,root) %{perl_vendorarch}/auto/Irssi/TextUI/*.so | |
257 | ||
258 | %dir %{perl_vendorarch}/auto/Irssi/UI | |
259 | %attr(755,root,root) %{perl_vendorarch}/auto/Irssi/UI/*.so | |
260 | %endif | |
261 | ||
262 | %files plugin-idea | |
263 | %defattr(644,root,root,755) | |
264 | %attr(755,root,root) %{_libdir}/irssi/modules/libidea.so | |
265 | ||
266 | %files plugin-xmpp | |
267 | %defattr(644,root,root,755) | |
268 | %doc irssi-xmpp/{docs/*,NEWS,README,TODO} | |
269 | %attr(755,root,root) %{_libdir}/irssi/modules/libfe_xmpp.so | |
270 | %attr(755,root,root) %{_libdir}/irssi/modules/libtext_xmpp.so | |
271 | %attr(755,root,root) %{_libdir}/irssi/modules/libxmpp_core.so |