Name:           centericq
Version:        4.21.0
Release:        12%{?dist}

Summary:        Text mode menu- and window-driven IM

Group:          Applications/Internet
License:        GPL
URL:            http://konst.org.ua/centericq/
Source0:        http://konst.org.ua/download/centericq-4.21.0.tar.bz2

Patch0:         centericq-libyahoo.patch
Patch1:         centericq-kkconsui.patch
Patch2:         centericq-kkstrtext.patch
Patch3:         centericq-src.patch
# the next two fix CVE-2005-3694
# http://www.gentoo.org/cgi-bin/viewcvs.cgi/net-im/centericq/files/
# see redhat bugzilla #174611
Patch4:         centericq-4.21.0-icq-short-read.diff.bz2
Patch5:         centericq-4.21.0-memory-handling.diff.bz2
# and see http://www.gentoo.org/security/en/glsa/glsa-200512-11.xml 
# and redhat bugzilla #176451
Patch6:         centericq-4.21.0-kkstrtext.patch
# and more security +)
# CVE-2007-0160
# http://mailman.linuxpl.org/pipermail/cicq/2007-January/004866.html
# see redhat bugzilla #227791
Patch7:         centericq-ijhook.patch
Patch8:         centericq-libjab-segv.patch

## feature fixes
# Fix libmsn 
# http://centericq.de/archive/contrib/patches/centericq-4.21.0.msn.patch
Patch100:       centericq-4.21.0.msn.patch.bz2
# Fix ljhook
Patch101:       http://www.crystalowl.net/patches/centericq-4.20.0-ljtags.patch
Patch102:       centericq-ljtypo.patch
# see #233808
# http://www.dtek.chalmers.se/~henoch/centericq.patch
Patch103:       centericq-agent-list.patch

## feature enh
# improve utf8 handling
Patch200:       centericq-ncursesw.patch
# provided by Andy Shevchenko... will ask before quit
Patch201:       centericq-quitask.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires:  krb5-devel
BuildRequires:  libidn-devel
BuildRequires:  curl-devel
BuildRequires:  ncurses-devel
BuildRequires:  gettext-devel
#BuildRequires:  gpgme-devel
BuildRequires:  automake

%description
Centericq is a text mode menu- and window-driven IM interface that supports the
ICQ2000, Yahoo!, AIM, MSN, IRC and Jabber protocols.

%prep
%setup -q -n %{name}-%{version}
%patch0
%patch1
%patch2
%patch3
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p3
%patch200 -p1
%patch201 -p1
autopoint -f
aclocal -I ./m4
autoconf
automake

%build
CFLAGS="$RPM_OPT_FLAGS" \
./configure --with-ssl --prefix=%{_prefix} --datadir=%{_datadir}

%{__make} %{?_smp_flags}

%{__make} check

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
%find_lang %{name}

rm -f $RPM_BUILD_ROOT%{_infodir}/dir
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc ABOUT-NLS AUTHORS COPYING ChangeLog FAQ NEWS README THANKS TODO
%{_bindir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_mandir}/man1/*
# we don't want that
%exclude %{_includedir}/msn

%changelog
* Sun Jun 03 2007 Milan Kerslager <kerslage@linux.cz> 4.21.0-12.ker.rhel4
- rebuild for RHEL4 (package from F7)
- gpgme-devel disabled
- add space to "aclocal -I ./m4"

* Sun Apr 01 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-12
- fix #233808 (503 jabber disco)
- fix #233901 (no sound/no translation)

* Sat Feb 10 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-11
- fix CVE-2007-160 (#227791)

* Mon Jan 08 2007 Kevin Fenzi <kevin@tummy.com>
4.21.0-10
- Tweak to build on fc7 and rebuild for new curl

* Mon Nov 06 2006 Jindrich Novy <jnovy@redhat.com>
- rebuild because of the new curl

* Tue Sep 12 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-8
- FE6 rebuild

* Thu Mar 02 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-7
- fix #183623: ask before quit
- fix #183625, #183626: fixes lj hook

* Wed Mar 01 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-6
- improve utf8 support

* Tue Feb 14 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-5
- Rebuild for Fedora Extras 5

* Tue Jan 03 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-4
- Fix more security related stuff
- Fix libmsn

* Thu Nov 10 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-2
- rebuild

* Tue Sep 27 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-1
- version upgrade (#168425)

* Mon May 30 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-10
- cleanup the x86_64 build fixes...

* Sun May 29 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-9
- hopefully the last x86_64 build fixes...

* Sun May 29 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-8
- and again more size_t fixes in src

* Sun May 29 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-7
- even more size_t build fixes in kkstrtext

* Thu May 26 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-6
- renew -5 buildfix and drop ifarch
- add another x86_64 buildfix

* Thu May 26 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-5
- x86_64 buildfix

* Mon May 23 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-4
- enable jabber encryption support via gpgme
- fix build (#156202)

* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 4.20.0-3
- rebuild on all arches

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt

* Tue Feb 08 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-1
- version upgrade
- remove libicq2000 exclude (not needed anymore)
- fixed BuildRequires

* Tue Dec 21 2004 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.13.0-1
- version upgrade
- exclude libicq2000 headers (may conflict with libicq2000-devel)
- drop GCC 3.4 patch (not needed anymore)

* Fri Nov 12 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 4.9.4-3
- Fix C++ code for FC3/GCC 3.4.

* Sun Jul 13 2003 Andreas Bierfert (awjb) <andreas.bierfert[AT]awbsworld.de>
0:4.9.4-0.fdr.2
- Fixed issues mentioned in #446 by Michael Schwendt
* Thu Jul 03 2003 Andreas Bierfert (awjb) <andreas.bierfert[AT]awbsworld.de>
0:4.9.4-0.fdr.1
- Initial RPM release.