Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 15815b5415e17577e6a328ce939aed85 > files > 6

archivemail-0.7.2-4.fc12.src.rpm

%define _default_patch_fuzz 2
Name:		archivemail
Version:	0.7.2
Release:	4%{?dist}
Summary:	A tool for archiving and compressing old email in mailboxes

Group:		Applications/Internet
License:	GPLv2+
URL:		http://archivemail.sourceforge.net/
Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
# Small wrapper script for launching archivemail
Source1:	archivemail
Source2:	archivemail-README.tests
Patch0:		test_archivemail.patch
Patch1:		archivemail-test-noshebang.patch
Patch2:		archivemail-main-noshebang.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch

Requires:	python

%description
Archivemail is a tool written in Python for archiving and compressing old
email in mailboxes. It can move messages older than the specified number of
days to a separate mbox format mailbox that is compressed with gzip, or 
optionally just delete old email.

%prep
%setup -q
chmod 0644 test_archivemail.py
# The patch creates the foundation for removing hardcoded dirs...
%patch0 -b .paths
# ...but I then use sed to further modify the files, so that the RPM build system's
# path macros are used properly:
sed -i "s:ARCHIVEMAIL_DATADIR = '\\./':ARCHIVEMAIL_DATADIR = '%{_datadir}/archivemail':" test_archivemail.py
# Again, follow RPM's macros (in case these get redefined, the package can simply
# be rebuilt instead of modified to compensate for it:
sed -i "s:/usr/share/archivemail:%{_datadir}/archivemail:" %{SOURCE1}

%patch1 -p0
%patch2 -p0

%build

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -D -m 755 -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/archivemail
install -D -m 644 -p archivemail $RPM_BUILD_ROOT%{_datadir}/archivemail/archivemail.py
install -D -m 644 -p archivemail.1 $RPM_BUILD_ROOT%{_mandir}/man1/archivemail.1
cp %{SOURCE2} .

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc archivemail.sgml CHANGELOG COPYING FAQ README test_archivemail.py TODO examples archivemail-README.tests
%{_bindir}/archivemail
%{_datadir}/archivemail
%{_mandir}/man1/archivemail.1.gz

%changelog
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Sep 12 2008 Jon Ciesla <limb@jcomserv.net> 0.7.2-2
- Introduced patch fuzz workaround, will fix.

* Fri Nov 9 2007 Jon Ciesla <limb@jcomserv.net> 0.7.2-1
- Update to 0.7.2.

* Thu Nov 8 2007 Jon Ciesla <limb@jcomserv.net> 0.7.1-1
- Update to 0.7.1.
- Updated test_archivemail.patch for new version.
- Removed fpname and imap patches, fixed by upstream.

* Thu Aug 16 2007 Jon Ciesla <limb@jcomserv.net> 0.7.0-7
- License tag correction.

* Tue Jun 12 2007 Jon Ciesla <limb@jcomserv.net> 0.7.0-6
- Patch to fix imap handling, BZ 243846.

* Thu May 24 2007 Jon Ciesla <limb@jcomserv.net> 0.7.0-5
- Applied upstream patch to fix issues with python 2.5.

* Thu May 24 2007 Jon Ciesla <limb@jcomserv.net> 0.7.0-4
- Removed shebang from test, main scripts.

* Wed May 23 2007 Jon Ciesla <limb@jcomserv.net> 0.7.0-3
- Added Readme about test script.

* Wed May 23 2007 Francois Aucamp <faucamp@csir.co.za> - 0.7.0-1.1
- Example spec file using distributed file paths for unit tests
  and the archivemail python module
- Added sed scripts to %%prep
- Moved chmod entries from %%build to %%prep, and cleaned them up
- Removed unnecessary %%doc entries
- Removed unnecessary versioned dependencies

* Tue May 22 2007 Jon Ciesla <limb@jcomserv.net> 0.7.0-1
- Initial packaging.