]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without perl # without perl support | |
4 | %bcond_without ipv6 # without IPv6 support | |
5 | %bcond_without ssl # without SSL support | |
6 | %bcond_without dynamic # without dynamic libraries | |
7 | ||
8 | %define no_install_post_check_so 1 | |
9 | ||
10 | %define idea_ver 0.1.46 | |
11 | %define irssi_perl_version 20100403 | |
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: 0.8.15 | |
19 | Release: 9 | |
20 | License: GPL | |
21 | Group: Applications/Communications | |
22 | #Source0: http://www.irssi.org/files/snapshots/%{name}-%{_snap}.tar.gz | |
23 | Source0: http://www.irssi.org/files/%{name}-%{version}.tar.gz | |
24 | # Source0-md5: 870db8e319f640c2bf446c30d0c24ef6 | |
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 | Patch0: %{name}-dcc-send-limit.patch | |
32 | Patch1: %{name}-home_etc.patch | |
33 | Patch2: %{name}-idea-listlen.patch | |
34 | Patch3: %{name}-gcc4.patch | |
35 | Patch4: %{name}-dynamic.patch | |
36 | Patch5: %{name}-invalid_free.patch | |
37 | Patch6: %{name}-color_support_for_gui_entry.patch | |
38 | Patch7: %{name}-libs-nopoison.patch | |
39 | URL: http://www.irssi.org/ | |
40 | BuildRequires: autoconf | |
41 | BuildRequires: automake | |
42 | BuildRequires: gettext-devel | |
43 | # for idea only | |
44 | BuildRequires: glib-devel | |
45 | BuildRequires: glib2-devel >= 2.24.0 | |
46 | BuildRequires: libtool | |
47 | BuildRequires: ncurses-devel >= 5.0 | |
48 | %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d} | |
49 | %{?with_perl:BuildRequires: perl-devel >= 1:5.8.4} | |
50 | BuildRequires: pkgconfig | |
51 | BuildRequires: popt-devel | |
52 | %{?with_perl:BuildRequires: rpm-perlprov} | |
53 | BuildRequires: rpmbuild(macros) >= 1.315 | |
54 | BuildRequires: sed >= 4.0 | |
55 | Requires: glib2 >= 2.24.0 | |
56 | Provides: perl(Irssi) = %{irssi_perl_version} | |
57 | Obsoletes: irssi-speech | |
58 | Obsoletes: irssi-sql | |
59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
60 | ||
61 | %if %{with dynamic} | |
62 | %define filterout_ld -Wl,--as-needed | |
63 | %endif | |
64 | ||
65 | %description | |
66 | Irssi is a textUI IRC client with IPv6 support. | |
67 | ||
68 | %description -l fr.UTF-8 | |
69 | Irssi est client IRC. | |
70 | ||
71 | %description -l hu.UTF-8 | |
72 | Irssi egy szöveges felületű IRC kliens IPv6 támogatással. | |
73 | ||
74 | %description -l pl.UTF-8 | |
75 | Irssi jest tekstowym klientem IRC ze wsparciem dla IPv6. | |
76 | ||
77 | %package plugin-idea | |
78 | Summary: Irssi plugin IDEA crypt | |
79 | Summary(hu.UTF-8): Irssi IDEA plugin | |
80 | Summary(pl.UTF-8): Wtyczka do irssi do szyfrowania IDEA | |
81 | Group: Applications/Communications | |
82 | Requires: %{name} = %{version}-%{release} | |
83 | Requires: glib >= 1:1.2.10-13 | |
84 | ||
85 | %description plugin-idea | |
86 | This package contains IDEA Crypt plugin for Irssi. | |
87 | ||
88 | %description plugin-idea -l hu.UTF-8 | |
89 | Ez a csomag tartalmazza az IDEA titkosítási plugint Irssi-hez. | |
90 | ||
91 | %description plugin-idea -l pl.UTF-8 | |
92 | Ten pakiet zawiera wtyczkę do Irssi z szyfrowaniem IDEA. | |
93 | ||
94 | %prep | |
95 | %setup -q -a3 | |
96 | %patch0 -p1 | |
97 | %patch1 -p1 | |
98 | %patch2 -p1 | |
99 | %patch3 -p1 | |
100 | %if %{with dynamic} | |
101 | %patch4 -p1 | |
102 | %endif | |
103 | %patch5 -p1 | |
104 | %patch6 -p0 | |
105 | %patch7 -p1 | |
106 | ||
107 | echo 'AC_DEFUN([AM_PATH_GLIB],[:])' > glib1.m4 | |
108 | ||
109 | mv irssi-idea{-%{idea_ver},} | |
110 | ||
111 | # hack | |
112 | %{__sed} -i -e 's#\./libtool#%{_bindir}/libtool#g' 'configure.in' | |
113 | ||
114 | %build | |
115 | ver=$(awk '/IRSSI_VERSION_DATE/{print $3}' irssi-version.h) | |
116 | if [ "$ver" != "%{irssi_perl_version}" ]; then | |
117 | : update irssi_perl_version to $ver | |
118 | exit 1 | |
119 | fi | |
120 | ||
121 | %{__libtoolize} | |
122 | %{__aclocal} -I . | |
123 | %{__autoconf} | |
124 | %{__automake} | |
125 | %configure \ | |
126 | --without-socks \ | |
127 | --with-bot \ | |
128 | --with-textui \ | |
129 | --with-proxy \ | |
130 | --with-terminfo \ | |
131 | --with-modules \ | |
132 | %{?with_perl:--with-perl=yes} \ | |
133 | %{?with_perl:--with-perl-lib=vendor} \ | |
134 | %{!?with_perl:--with-perl=no} \ | |
135 | %{?with_ipv6:--enable-ipv6} \ | |
136 | --enable-nls \ | |
137 | --%{?with_ssl:en}%{!?with_ssl:dis}able-ssl | |
138 | ||
139 | %{__make} | |
140 | ||
141 | # to fool idea configure script | |
142 | touch irssi-config | |
143 | cd irssi-idea | |
144 | %{__libtoolize} | |
145 | %{__aclocal} -I . | |
146 | %{__autoconf} | |
147 | %{__automake} | |
148 | %configure | |
149 | %{__make} | |
150 | ||
151 | %install | |
152 | rm -rf $RPM_BUILD_ROOT | |
153 | install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} | |
154 | %{__make} install \ | |
155 | DESTDIR=$RPM_BUILD_ROOT \ | |
156 | docdir=%{_datadir}/%{name}-%{version} | |
157 | ||
158 | # scripts packaged by irssi-scripts.spec | |
159 | rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts/* | |
160 | ||
161 | cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} | |
162 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir} | |
163 | ||
164 | %{__make} -C irssi-idea install \ | |
165 | DESTDIR=$RPM_BUILD_ROOT | |
166 | ||
167 | # -devel? | |
168 | rm $RPM_BUILD_ROOT%{_libdir}/lib*.{so,la,a} | |
169 | rm -r $RPM_BUILD_ROOT%{_includedir}/irssi | |
170 | # cleanup | |
171 | rm $RPM_BUILD_ROOT%{_libdir}/irssi/modules/lib*.{la,a} | |
172 | %if %{with perl} | |
173 | rm $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod | |
174 | rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Irssi/.packlist | |
175 | rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Irssi/Irc/.packlist | |
176 | rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Irssi/TextUI/.packlist | |
177 | rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Irssi/UI/.packlist | |
178 | %endif | |
179 | rm -r $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version} | |
180 | ||
181 | %clean | |
182 | rm -rf $RPM_BUILD_ROOT | |
183 | ||
184 | %files | |
185 | %defattr(644,root,root,755) | |
186 | %doc AUTHORS ChangeLog README TODO NEWS docs/*.{txt,html} | |
187 | %attr(755,root,root) %{_bindir}/botti | |
188 | %attr(755,root,root) %{_bindir}/irssi | |
189 | %dir %{_libdir}/irssi | |
190 | %dir %{_libdir}/irssi/modules | |
191 | %attr(755,root,root) %{_libdir}/irssi/modules/libirc_proxy.so* | |
192 | %if %{with dynamic} | |
193 | %attr(755,root,root) %{_libdir}/libirssi*.so.* | |
194 | %endif | |
195 | %dir %{_datadir}/%{name} | |
196 | %dir %{_datadir}/%{name}/scripts | |
197 | %{_datadir}/%{name}/help | |
198 | %{_datadir}/%{name}/themes | |
199 | %{_desktopdir}/irssi.desktop | |
200 | %{_pixmapsdir}/irssi.png | |
201 | %{_sysconfdir}/irssi.conf | |
202 | %{_mandir}/man1/irssi.1* | |
203 | ||
204 | %if %{with perl} | |
205 | %{perl_vendorarch}/*.pm | |
206 | %dir %{perl_vendorarch}/Irssi | |
207 | %{perl_vendorarch}/Irssi/*.pm | |
208 | ||
209 | %dir %{perl_vendorarch}/auto/Irssi | |
210 | %{perl_vendorarch}/auto/Irssi/*.bs | |
211 | %attr(755,root,root) %{perl_vendorarch}/auto/Irssi/*.so | |
212 | ||
213 | %dir %{perl_vendorarch}/auto/Irssi/Irc | |
214 | %{perl_vendorarch}/auto/Irssi/Irc/*.bs | |
215 | %attr(755,root,root) %{perl_vendorarch}/auto/Irssi/Irc/*.so | |
216 | ||
217 | %dir %{perl_vendorarch}/auto/Irssi/TextUI | |
218 | %{perl_vendorarch}/auto/Irssi/TextUI/*.bs | |
219 | %attr(755,root,root) %{perl_vendorarch}/auto/Irssi/TextUI/*.so | |
220 | ||
221 | %dir %{perl_vendorarch}/auto/Irssi/UI | |
222 | %{perl_vendorarch}/auto/Irssi/UI/*.bs | |
223 | %attr(755,root,root) %{perl_vendorarch}/auto/Irssi/UI/*.so | |
224 | %endif | |
225 | ||
226 | %files plugin-idea | |
227 | %defattr(644,root,root,755) | |
228 | %attr(755,root,root) %{_libdir}/irssi/modules/libidea.so |