File procmail.spec of Package procmail

#
# spec file for package procmail
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           procmail
BuildRequires:  pcre-devel postfix
Url:            http://www.procmail.org/
License:        Artistic License .. ; GPLv2+
Group:          Productivity/Networking/Email/Clients
Requires:       /bin/sed
Recommends:     /usr/bin/mimencode
AutoReqProv:    on
Version:        3.22
Release:        252
Summary:        A program for local e-mail delivery
Source:         procmail-%{version}.tar.bz2
Patch0:         procmail-%{version}-mailstat.patch
Patch1:         procmail-%{version}.dif
Patch2:         procmail-cflags.dif
Patch3:         procmail-%{version}-headerconcat.dif
Patch4:         procmail-%{version}-owl-truncate.dif
Patch5:         procmail-%{version}-autoconf.dif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Sendmail calls procmail to deliver email into a local folder. Procmail
can be configured to store e-mail in different folders.



Authors:
--------
    Stephen R. van den Berg <srb@cuci.nl>
    Philip Guenther <guenther@sendmail.com>

%prep
%setup
%patch0 -b .mailstat
%patch1
%patch2
%patch3
%patch4
%patch5

%build
    RPM_OPT_FLAGS="-std=c89 $RPM_OPT_FLAGS -Wno-parentheses -Wno-sign-compare -Wno-unprototyped-calls"
    export RPM_OPT_FLAGS
    make %{?jobs:-j%jobs} XCFLAGS="-fno-strict-aliasing -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" MANDIR=%{_mandir} LDFLAGS0=

%install
    mkdir -p $RPM_BUILD_ROOT%{_mandir}/man{1,5} $RPM_BUILD_ROOT/usr/bin
    make MANDIR=$RPM_BUILD_ROOT%{_mandir} BINDIR=$RPM_BUILD_ROOT/usr/bin install
    install -m 644 man/mailstat.man $RPM_BUILD_ROOT%{_mandir}/man1/mailstat.1

%clean
    rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc FAQ FEATURES README examples
/usr/bin/formail
/usr/bin/lockfile
/usr/bin/mailstat
/usr/bin/procmail
%{_mandir}/man1/formail.1.gz
%{_mandir}/man1/lockfile.1.gz
%{_mandir}/man1/procmail.1.gz
%{_mandir}/man1/mailstat.1.gz
%{_mandir}/man5/procmailex.5.gz
%{_mandir}/man5/procmailrc.5.gz
%{_mandir}/man5/procmailsc.5.gz

%changelog
openSUSE Build Service is sponsored by