File getmail.spec of Package getmail

#
# spec file for package getmail
#
# Copyright (c) 2006-2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           getmail
Version:        4.17.0
Release:        0
Group:          Productivity/Networking/Email/Utilities
License:        GNU General Public License version 2 (GPL v2)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
URL:            http://pyropus.ca/software/getmail/
# http://pyropus.ca/software/getmail/old-versions/getmail-%{version}.tar.gz
Source:         getmail-%{version}.tar.bz2
Source99:       %{name}-rpmlintrc
Patch1:         getmail-fix_paths.patch
Summary:        Simple, Secure and Reliable Email Retriever
Provides:       python-getmailcore = %{version}-%{release}
Provides:       python-getmail = %{version}-%{release}
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%endif
BuildRequires:  python-devel perl
%py_requires

%description
getmail is intended as a simple, secure, and reliable replacement for
fetchmail. It retrieves email (either all messages, or only unread messages)
from one or more POP3, SPDS, or IMAP4 servers (with or without SSL) for one or
more email accounts, and reliably delivers into qmail-style Maildirs, mboxrd
files, or through external MDAs (command deliveries) specified on a per-account
basis. getmail also has excellent support for domain (multidrop) mailboxes,
including delivering messages to different users or destinations based on the
envelope recipient address.




Author:
--------
    %(%__python ./setup.py --author) <%(%__python ./setup.py --author-email)>
    Charles Cazabon <charlesc-getmail@pyropus.ca>

%package doc
Summary:        Documentation for %{name}
Group:          Productivity/Networking/Email/Utilities

%description doc
getmail is intended as a simple, secure, and reliable replacement for
fetchmail.

This package contains the configuration, FAQ and troubleshooting
documentation, under %{_docdir}/%{name}/

%prep
%setup -q
%patch1
%__sed -i \
	-e 's|@@DOCDIR@@|%{_docdir}/%{name}|g' \
	-e 's|@@MANDIR@@|%{_mandir}|g' \
	setup.py

pushd getmailcore
%__perl -ni -e 'print $_ unless m|^#!\s*/|' *.py
%__chmod 0644 *.py
popd #getmailcore

%build
CFLAGS="%{optflags}" \
%__python ./setup.py build

%install
%__python ./setup.py install \
	--prefix="%{_prefix}" \
	--root="%{buildroot}" \
	--record-rpm=files.lst

%__perl -ni -e 'chomp; print $_,"\n" unless m|^(%dir\s+)?%{_docdir}/?$|' files.lst
%__perl -pi -e 's/^/%doc / if m|^(%dir\s+)?%{_docdir}/|' files.lst
%__perl -pi -e 's/$/*/ if m|^%{_mandir}/|' files.lst

%__perl -ni -e 'print unless m,%{_docdir}/%{name}/.+\.(html|txt|css)$,' files.lst

%clean
[ -n "%{buildroot}" -a "%{buildroot}" != "/" ] && %__rm -rf "%{buildroot}"

%files -f files.lst
%defattr(-,root,root,0755)
%doc %dir %{_docdir}/%{name}

%files doc
%defattr(-,root,root,0755)
%doc %dir %{_docdir}/%{name}
%{_docdir}/%{name}/*.html
%{_docdir}/%{name}/*.txt
%{_docdir}/%{name}/*.css

%changelog

openSUSE Build Service is sponsored by