File hashcash.spec of Package hashcash
Summary: Anti-spam / denial-of-service counter-measure tool
Name: hashcash
Version: 1.22
Release: 4
License: GPL
Group: Productivity/Networking/Email/Utilities
URL: http://www.hashcash.org/
#Source: http://www.hashcash.org/binaries/rpms/hashcash-1.22.tgz
#Above is the original source URL, below is re-compressed version
Source: %{name}-%{version}.tar.bz2
Source1: http://web.archive.org/web/20080605002828/http://www.toehold.com/~kyle/hashcash/hashcash-sendmail
Source2: README.SUSE
Patch: hashcash-sendmail-22bits.diff
Patch1: hashcash-sendmail-exitstatus.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%description
Hashcash is a denial-of-service counter measure tool. Its main current use
is to help hashcash users avoid losing email due to content based and
blacklist based anti-spam systems.
The hashcash tool allows you to create hashcash stamp to attach to emails
you send, and to verify hashcash stamp attached to emails you receive.
Email senders attach hashcash stamps with the X-Hashcash: header. Vendors
and authors of anti-spam tools are encouraged to exempt mail sent with
hashcash from their blacklists and content based filtering rules.
A hashcash stamp constitutes a proof-of-work which takes a parameterizable
amount of work to compute for the sender. The recipient can verify received
stamps efficiently. This package also includes a sha1 implementation which
behaves somewhat like md5sum, but with SHA1.
%prep
%setup -q
cp %{S:1} %{S:2} .
%patch -p0
%patch1 -p0
%build
make COPT="$RPM_OPT_FLAGS" "PACKAGER=RPM" gnu
%install
install -d $RPM_BUILD_ROOT/%{_bindir}/
install -d $RPM_BUILD_ROOT/%{_mandir}
install -d $RPM_BUILD_ROOT/%{_mandir}/man1
install -d $RPM_BUILD_ROOT/%{_docdir}/
install -d $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}
install -m 755 -s hashcash $RPM_BUILD_ROOT/%{_bindir}/
install -m 755 -s sha1 $RPM_BUILD_ROOT/%{_bindir}/
install -m 644 hashcash.1 $RPM_BUILD_ROOT/%{_mandir}/man1
install -m 644 sha1-hashcash.1 $RPM_BUILD_ROOT/%{_mandir}/man1/sha1.1
install -m 755 hashcash-sendmail $RPM_BUILD_ROOT/%{_bindir}/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README README.SUSE LICENSE CHANGELOG
%{_bindir}/hashcash
%{_bindir}/hashcash-sendmail
%{_bindir}/sha1
%{_mandir}/man1/hashcash.1.gz
%{_mandir}/man1/sha1.1.gz
%changelog