Summary: The procmail mail processing program.
Summary(ja): procmail メール処理プログラム
Name: procmail
Version: 3.22
Release: 3%{?_dist_release}
License: GPL or artistic
Group: System Environment/Daemons
Source: ftp://ftp.procmail.org/pub/procmail/procmail-%{version}.tar.gz
URL: http://www.procmail.org
Patch0: procmail-3.22-rhconfig.patch
Patch1: procmail-3.15.1-man.patch
Patch2: procmail_3.22-8.debian.patch
Patch3: procmail-3.22-large_files.patch
Patch5: procmail-3.22-ipv6.patch
Patch6: procmail-3.22-getline.patch

# patches added by Vine
Patch10: procmail-3.14-OLD_PREFIX.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root

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

%description
The procmail program is MDA (Mail Delivery Agent) for local mail
delivery.  In addition to just delivering mail, procmail can be used
for automatic filtering, presorting and other mail handling jobs.

%description -l ja
procmail プログラムはローカルメール配送のためのメール配送エージェント 
(MDA) です。procmail は単にメールを配送するだけではなく
自動フィルタリングやソーティング等の処理も行う事が可能です．

%prep
%setup -q
%patch0 -p1 -b .rhconfig
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch5 -p1 -b .ipv6
%patch6 -p1 -b .getline
%patch10 -p1 -b .OLD_PREFIX
find . -type d -exec chmod 755 {} \;

%build
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"

%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,5}

make \
    BASENAME=${RPM_BUILD_ROOT}%{_prefix} MANDIR=${RPM_BUILD_ROOT}%{_mandir} \
	install

strip ${RPM_BUILD_ROOT}%{_bindir}/* || :

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%doc Artistic COPYING FAQ FEATURES HISTORY README KNOWN_BUGS examples

%{_bindir}/formail
%attr(2755,root,mail)	%{_bindir}/lockfile
%{_bindir}/mailstat
%attr(0755,root,mail)	%{_bindir}/procmail

%{_mandir}/man[15]/*


%changelog
* Sun Apr  3 2011 IWAI, Masaharu <iwai@alib.jp> 3.22-3
- add two patches from Fedora 3.22-25
  - add IPv6 support to comsat notification (Patch5)
  - rename getline to avoid conflict with glibc 2.10,11 (Patch6)
- update description

* Wed Jun 24 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.22-2
- spec in UTF-8

* Fri May  2 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.22-1
- applied new versioning policy

* Wed Sep 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 3.22-0vl4
- rebuild to add gpg sign
- add Patch2,3 from FC

* Sun May 18 2003 IWAI Masaharu <iwai@alib.jp> 3.22-0vl3
- rebuild with new toolchain
- fix typo in %%changelog

* Thu Oct 03 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 3.22-0vl2
- lose setuid/setgid bits.
  postfix do not use procmail as local mailer now.

* Tue Oct  2 2001 Daisuke SUZUKI <daisuke@linux.or.jp> 3.22-0vl1
- come back setuid/setgid bits to create lock file.

* Wed Jul 18 2001 <sagami@vinelinux.org>
- 3.20-0vl1
- sync with RedHat 6.2 updates 3.20-0.62; major changes are...
  * lose setuid/setgid (root,mail) bits (bugzilla #23257).
  * Change to "License: GPL or artistic" from "Copyright: distributable"
  * Enable LMTP
  * Fix man page (bugzilla #35825)

* Thu Feb  8 2001 Yasuhide OOMORI <dasen@icntv.ne.jp>
- 3.14-5vl2
- fixed formail to comply with RFC822 (OLD_PREFIX).

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

* Fri Aug 11 2000 Jeff Johnson <jbj@redhat.com>
- add space in delivery rules with '!' (#15947).

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

* Thu Jun 15 2000 Jeff Johnson <jbj@redhat.com>
- FHS packaging.

* Mon Feb  7 2000 Jeff Johnson <jbj@redhat.com>
- compress man pages.

* Fri Jan 14 2000 Jeff Johnson <jbj@redhat.com>
- update to 3.14.

* Mon Aug 16 1999 Bill Nottingham <notting@redhat.com>
- fix doc perms.

* Wed Apr 21 1999 Cristian Gafton <gafton@redhat.com>
- turn on GROUP_PER_USER
- add some docs to the package

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

* Fri Mar 26 1999 Cristian Gafton <gafton@redhat.com>
- fixed Group line

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

* Sun Aug 16 1998 Jeff Johnson <jbj@redhat.com>
- build root

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

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