
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Summary: A remote mail retrieval and forwarding utility.
Summary(ja): 遠隔メール取得/フォワード用ユーティリティ
Name: fetchmail
Version: 6.3.26
Release: 3%{_dist_release}
Requires: smtpdaemon
License: GPL
Group: Applications/Internet
URL: http://fetchmail.berlios.de/
Source0: http://download.berlios.de/fetchmail/fetchmail-%{version}.tar.xz
Source1: fetchmailconf.1

Patch1: fetchmail-6.3.22-stripnul.patch
Patch2: fetchmail-6.3.22-nonewline.patch
# Patch3: fetchmail-6.3.5-malformed_spam_crash.patch

# security
# Patch100: fetchmail-6.3.8_CVE-2007-4565.patch
# Patch110: fetchmail-6.3.8_CVE-2008-2711.patch

Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: openssl-devel
BuildRequires: krb5-devel
BuildRequires: python-devel
BuildRequires: flex, bison
Requires: krb5-libs

Vendor: Project Vine
Distribution: Vine Linux
Packager: iwamoto, inagaki

%package -n fetchmailconf
Summary: A GUI utility for configuring your fetchmail preferences.
Summary(ja): fetchmail を設定する為の GUI ユーティリティ
Group: Applications/Internet
Requires: python, tk, tkinter, fetchmail = %{version}-%{release}

%description
Fetchmail is a remote mail retrieval and forwarding utility intended
for use over on-demand TCP/IP links, like SLIP or PPP connections.
Fetchmail supports every remote-mail protocol currently in use on the
Internet (POP2, POP3, RPOP, APOP, KPOP, all IMAPs, ESMTP ETRN) for
retrieval.  Then Fetchmail forwards the mail through SMTP, so you can
read it through your favorite mail client.

Install fetchmail if you need to retrieve mail over SLIP or PPP
connections.

%description -l ja
fetchmail は SLIP や PPP といったオンデマンド TCP/IP 接続環境で
使われることを念頭に置いた遠隔メール取得/フォワードユーティリティです．
fetchmail は，現在インターネット上で使われている様々なプロトコル
(POP2, POP3, RPOP, APOP, KPOP, IMAP, ESMTP, ETRN) に対応しています．
fetchmail はメールのフォワードには SMTP を用います．
ですので，あなたのお好きなメールクライアントでメールを読むことが出来ます．

SLIP や PPP 接続でメールを取得したい場合は fetchmail を
インストールして下さい．

%description -n fetchmailconf
Fetchmailconf is a Tcl/Tk GUI application which edits your
.fetchmailrc file, in order to configure the fetchmail mail retrieval
program. Fetchmail's numerous options may be confusing to new users,
but fetchmailconf may help to clear up the confusion.

Install fetchmailconf if you need help configuring fetchmail. You'll
need to have python and tk installed in order to use fetchmailconf.

%description -n fetchmailconf -l ja
fetchmailconf は fetchmail プログラムを制御する .fetchmailrc ファイルを
編集する為の Tcl/Tk GUI アプリケーションです．
fetchmail の様々なオプションは慣れないユーザにとっては混乱するばかりですが，
fetchmailconf を使うと混乱すること無く設定が行えます．

fetchmail の設定を簡単に行いたい場合は fetchmailconf をインストール
して下さい．fetchmail を使うには python と tk もインストールされている
必要があります．

%prep
%setup -q

%patch1 -p1 -b .stripnul
%patch2 -p1 -b .nonewline
# %patch3 -p0 -b .malformed_spam

# %patch100 -p0 -b .CVE-2007-4565
# %patch110 -p1 -b .CVE-2008-2711

%build
%configure \
     --enable-NTLM \
     --with-ssl \
     --with-kerberos5 \
     --with-gssapi

%__make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/fetchmailconf.1*
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1/

%find_lang %name

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root)
%doc FEATURES README NEWS NOTES *.html FAQ COPYING INSTALL
%{_bindir}/fetchmail
%{_mandir}/man1/fetchmail.1*

%files -n fetchmailconf
%defattr(-,root,root)
%{_bindir}/fetchmailconf
%{python_sitelib}/fetchmailconf.py*
%{_mandir}/man1/fetchmailconf.1*

%changelog
* Mon Nov 05 2018 Toshiaki Ara <ara_t@384.jp> 6.3.26-3
- rebuild with openssl-1.1.1

* Tue Mar  8 2016 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.26-2
- rebuilt with openssl 1.0.1s

* Thu Jan  9 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.26-1
- new upstream release  

* Sun Mar 24 2013 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.25-1
- new upstream release 

* Fri Oct 19 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.22-1
- new upstream release with security fix (CVE-2012-3482) 
- update patch1, 2
- fix changelog ver number typo

* Sat Aug 27 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.21-1
- new upstream release

* Sat Jul 16 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.20-1
- new upstream release with security fix (CVE-2011-1947)
  http://www.fetchmail.info/fetchmail-SA-2011-01.txt

* Sun Apr  3 2011 IWAI, Masaharu <iwai@alib.jp> 6.3.19-3vl6
- build with krb5-libs 1.8.2

* Sun Jan  9 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.19-2
- rebuilt with openssl 1.0.0c

* Sun Dec 12 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.19-1
- new upstream release with security fix 
  http://fetchmail.berlios.de/fetchmail-EN-2010-03.txt
- add BRs: flex, bison

* Wed May 12 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.17-3
- rebuild with openssl 0.9.8 (2vl6 was built with openssl 1.0)

* Sun May  9 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.17-2
- change spec filename (-vl added)

* Fri May  7 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.17-1
- new upstream release with security fix (CVE-2010-1167)
- add BR: python-devel
- fix configure option (--with-hoge)

* Thu Feb 11 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.14-1
- new upstream release with security fix (CVE-2010-0562)

* Sat Nov 28 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 6.3.13-1
- new upstream release (including security fix CVE-2009-0266)

* Thu Aug  6 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.11-1
- new upstream release
- enable krb5 for Vine 5 and later
- fix configure option (drop old configure options)
- fix changelog typo

* Sat Jul  4 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.10-1
- new upstream release
- fix changelog typo

* Sat Nov 29 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.9-1
- new upstream release with CVE-2007-4565,CVE-2008-2711 fix 
- drop old pacthes which are included in new release

* Fri Jun 20 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.8-3
- add patch110 for fix CVE-2008-2711
  (if 6.3.9 will be released, patch110 is no needed)
- new versioning policy

* Fri Aug 31 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.8-0vl2
- add patch100 for fix CVE-2007-4565 
  (if 6.3.9 will be released, patch100 is no needed)

* Mon Apr 16 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.8-0vl1
- new upstream release with fixing CVE-2007-1558

* Fri Mar 30 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.7-0vl1
- new upstream release with fixing up fallout from the CVE-2006-5867

* Wed Dec 06 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.6-0vl1
- new upstream release with security fix (CVE-2006-5867,CVE-2006-5974)
  - CVE-2006-5974 is already fixed by patch3
- drop patch3 (is included in new release)
- add Vendor/Distribution Tag

* Wed Dec 06 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.5-0vl1.1
- test package
- add patch1,2 from mandrave
- add patch3 from upstream CVS

* Fri Oct 27 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 6.3.5-0vl1
- new upstream release

* Mon Jun 26 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 6.3.4-0vl1
- new upstream release

* Thu Dec 22 2005 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- 6.2.5-0vl1.1
- new upstream release 
- drop patch1
- change source tarball gz -> bz2

* Sun Aug 07 2005 Shu KONNO <owa@bg.wakwak.com> 6.2.5-0vl1.1
- add fetchmail-patch-6.2.5.2.gz

* Mon Nov 10 2003 IWAI, Masaharu <iwai@alib.jp> 6.2.5-0vl1
- new upstream release

* Tue Aug 26 2003 IWAI, Masaharu <iwai@alib.jp> 6.2.4-0vl1
- new upstream release

* Thu Jul 31 2003 IWAI Masaharu <iwai@alib.jp> 6.2.3-0vl1
- new upstream release

* Wed May 21 2003 IWAI Masaharu <iwai@alib.jp> 6.2.2-0vl2
- revise URL and Source0 URL

* Sun Mar  9 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 6.2.2-0vl1
- new upstream release
  - this version include security fix patch.

* Wed Nov 13 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 6.2.1-0vl1
- new upstream release
  (hopefully fixed several security bugs)

* Sun May 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 5.9.11-0vl1
- new upstream release

* Sun Feb 17 2002 Toru Sagami <sagami@vinelinux.org> 5.9.8-0vl1
- updated to 5.9.8

* Mon Jan 07 2002 Toru Sagami <sagami@vinelinux.org>
- 5.9.6-0vl1

* Mon Dec 10 2001 Toru Sagami <sagami@vinelinux.org>
- 5.9.5-0vl1

* Thu Oct 04 2001 Toru Sagami <sagami@vinelinux.org>
- 5.9.4-0vl1

* Tue Aug 14 2001 <sagami@vinelinux.org>
- 5.9.0-0vl1

* Thu Aug 02 2001 <sagami@vinelinux.org>
- 5.8.15-0vl1
- add tkinter for Requires

* Mon Jul 16 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
- 5.8.11-0vl2
- rebuilt with openssl-0.9.6b

* Mon Jul 09 2001 <sagami@vinelinux.org>
- 5.8.11-0vl1
- built with openssl-0.9.6

* Tue Jun 26 2001 <sagami@vinelinux.org>
- 5.8.10-0vl1

* Mon Jun 25 2001 <sagami@vinelinux.org>
- 5.8.9-0vl1

* Thu Jun 21 2001 <sagami@vinelinux.org>
- 5.8.8-0vl1: updated to 5.8.8
- use %%{find_lang}

* Wed Jan 10 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 5.6.0-2vl1
- based on 5.6.0-2 from Rawhide
- added Japanese summary and description

* Tue Nov 28 2000 Nalin Dahyabhai <nalin@redhat.com>
- enable NLS (#21419)

* Mon Nov 27 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 5.6.0
- revert "untagged" patch, which went upstream

* Wed Nov  8 2000 Nalin Dahyabhai <nalin@redhat.com>
- patch to handle untagged responses during IMAP-GSS authentication
- update to 5.5.5

* Thu Aug 17 2000 Nalin Dahyabhai <nalin@redhat.com>
- enable SSL support

* Sat Aug 12 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 5.5.0
- change Copyright: to License: GPL

* Tue Aug  8 2000 Nalin Dahyabhai <nalin@redhat.com>
- back out MDA patch; sendmail started listening by default again

* Thu Aug  3 2000 Nalin Dahyabhai <nalin@redhat.com>
- patch to use procmail as an MDA by default
- patch to not run makedepend

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Sun Jul  2 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 5.4.3

* Thu Jun 29 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix a typo in 5.4.2

* Wed Jun 28 2000 Matt Wilson <msw@redhat.com>
- fixed configure arguments to not have a continuation at the end of the last
  one

* Tue Jun 27 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 5.4.2

* Fri Jun  9 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 5.4.1
- FHS fixes, with mandir override
- change fetchmailconf.1 symlink to an include

* Thu May 25 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix Kerberos configure patch to work correctly for krb5 1.0, too

* Fri May 19 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 5.4.0
- rework Kerberos dependencies

* Fri Apr 21 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 5.3.8

* Tue Apr  4 2000 Bill Nottingham <notting@redhat.com>
- eliminate explicit krb5-configs dependency

* Mon Mar  6 2000 Bernhard Rosenkr舅zer <bero@redhat.com>
- 5.3.1 - This fixes Bugs #9982 and #9987

* Wed Mar  1 2000 Nalin Dahyabhai <nalin@redhat.com>
- make kerberos support conditional at build-time

* Wed Mar  1 2000 Bill Nottingham <notting@redhat.com>
- integrate kerberos support into main tree

* Fri Feb 25 2000 Nalin Dahyabhai <nalin@redhat.com>
- Add Kerberos and GSS authenticator support

* Fri Feb 25 2000 Cristian Gafton <gafton@redhat.com>
- version 5.3.0 has a correct version of the rfc822 patch

* Fri Feb 25 2000 Jeff Johnson <jbj@redhat.com>
- fix length of rfc822 headers in strcncasecmp().

* Tue Feb 15 2000 Bernhard Rosenkr舅zer <bero@redhat.com>
- 5.2.8 (fixes the POP3-UIDL bug)
- Fix up the fetchmailconf man page symlink

* Fri Feb 11 2000 Cristian Gafton <gafton@redhat.com>
- version 5.2.7
- add patch so that fetchmailconf will not output ssl configure statements
  is no ssl is configured

* Mon Jan 31 2000 Cristian Gafton <gafton@redhat.com>
- rebuild to fix deps
- man pages are compressed
- enable %clean

* Tue Jan 11 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- 5.2.3
- fetchmailconf requires fetchmail = %{version}
- fix compilation

* Mon Dec 27 1999 Bernhard Rosenkraenzer <bero@redhat.com>
- 5.2.2

* Thu Sep 23 1999 Preston Brown <pbrown@redhat.com>
- got 5.1.0, fixes potential buffer overflow...

* Sat Jun 12 1999 Jeff Johnson <jbj@redhat.com>
- update to 5.0.4.

* Mon Apr 05 1999 Cristian Gafton <gafton@redhat.com>
- 5.0.0

* Tue Mar 30 1999 Preston Brown <pbrown@redhat.com>
- subpackage for fetchmailconf

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 2)

* Thu Dec 17 1998 Cristian Gafton <gafton@redhat.com>
- version 4.7.0
- build against glibc 2.1

* Sat Sep 19 1998 Jeff Johnson <jbj@redhat.com>
- correct typo in dangling symlink fix.

* Wed Sep 09 1998 Cristian Gafton <gafton@redhat.com>
- update to 4.5.8

* Wed Jul 22 1998 Jeff Johnson <jbj@redhat.com>
- update to 4.5.3.

* Fri May 08 1998 Cristian Gafton <gafton@redhat.com>
- fixed spelung eror in the decsriptoin

* Thu May 07 1998 Cristian Gafton <gafton@redhat.com>
- new version 4.4.4 fixes a lot of bugs

* Fri Apr 24 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Thu Apr 09 1998 Cristian Gafton <gafton@redhat.com>
- upgraded to 4.4.1
- buildroot

* Thu Oct 23 1997 Michael Fulbright <msf@redhat.com>
- Updated to 4.3.2 using SRPM from Eric Raymond

* Thu Jul 10 1997 Erik Troan <ewt@redhat.com>
- built against glibc
