File email2trac.spec of Package email2trac

%global debug_package %{nil}

Summary: Utilities for converting emails to trac tickets
Name: email2trac
Version: 2.6.2
Release: 1
License: Apache License 2.0
Group: Applications/Internet
URL: https://subtrac.sara.nl/oss/email2trac

Packager: Jon Topper <jon@topper.me.uk>

Source: ftp://ftp.sara.nl/pub/outgoing/email2trac.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

Requires: trac
BuildRequires: python >= 2.4

%description
This is a release of the SARA package email2trac that contains utilities that we use to convert emails to trac tickets. The initial setup was made by Daniel Lundin from Edgewall Software. SARA has extend the initial setup, with the following extensions:

    * HTML messages
    * Attachments
    * Use commandline options
    * Use config file to change the behaviour of the email2trac.py program
    * Some unicode support for special characters in the headers of an email message 

%prep
rm -rf $RPM_BUILD_ROOT
%setup
./configure --with-trac_user=wwwrun --with-mta_user=postfix
perl -pi -e 's/\-m\s+\d+\s+\-o\s+\$\(INSTALL_USER\)//g' Makefile

%build
mkdir -p $RPM_BUILD_ROOT
make

%install
make DESTDIR="$RPM_BUILD_ROOT" install
ls -R $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
/usr/local/bin/delete_spam
/usr/local/bin/email2trac
/usr/local/bin/run_email2trac
%dir /usr/local/etc
%config /usr/local/etc/email2trac.conf

%changelog
* Thu Aug 03 2006 Jon Topper <jon@topper.me.uk> - 0.7.6-1
- Initial RPM build