Import mail/hashcash

The hashcash tool allows you to create hashcash stamps to attach to
emails you send, and to verify hashcash stamps attached to emails you
receive. Email senders attach hashcash stamps with the X-Hashcash:
header. 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.

From: Armin Wolfermann <aw@osn.de>

ok alek@
This commit is contained in:
niallo 2005-06-16 17:35:22 +00:00
parent b26c325c98
commit fd61a87002
5 changed files with 92 additions and 0 deletions

31
mail/hashcash/Makefile Normal file
View File

@ -0,0 +1,31 @@
# $OpenBSD: Makefile,v 1.1.1.1 2005/06/16 17:35:22 niallo Exp $
COMMENT= "hashcash anti-spam / denial of service counter-measure tool"
DISTNAME= hashcash-1.17
CATEGORIES= mail
HOMEPAGE= http://www.hashcash.org/
MAINTAINER= Armin Wolfermann <armin@wolfermann.org>
# public domain
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c
MASTER_SITES= ${HOMEPAGE}/source/
EXTRACT_SUFX= .tgz
.if ${MACHINE_ARCH} == "i386"
ALL_TARGET= x86
.else
ALL_TARGET= generic
.endif
NO_REGRESS= Yes
.include <bsd.port.mk>

4
mail/hashcash/distinfo Normal file
View File

@ -0,0 +1,4 @@
MD5 (hashcash-1.17.tgz) = 9e5a8a35941c0cdccac93f41bd943593
RMD160 (hashcash-1.17.tgz) = da50fa2bd609543614d6845e8cc78fd7f268e690
SHA1 (hashcash-1.17.tgz) = bf77149d5911bda2b59745a76c2df3b7ff0f1701
SIZE (hashcash-1.17.tgz) = 185522

View File

@ -0,0 +1,43 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2005/06/16 17:35:22 niallo Exp $
--- Makefile.orig Wed Mar 30 12:27:47 2005
+++ Makefile Sat Jun 11 11:03:15 2005
@@ -2,9 +2,9 @@ HC_VERS = 1.17
CHANGEME1 = 1 # put PACKAGER = EBUILD|RPM etc here
CHANGEME2 = 2
CHANGEME3 = 3
-INSTALL_PATH = /usr/bin
-MAN_INSTALL_PATH = /usr/share/man/man1
-DOC_INSTALL_PATH = /usr/share/doc/hashcash-$(HC_VERS)
+INSTALL_PATH = ${PREFIX}/bin
+MAN_INSTALL_PATH = ${PREFIX}/man/man1
+DOC_INSTALL_PATH = ${PREFIX}/share/doc/hashcash
MAKEDEPEND = makedepend
MSLIB = mslib
# here you can choose the regexp style your system has
@@ -130,7 +130,8 @@ all: $(EXES)
libhashcash$(LIB): $(LIBOBJS)
$(DELETE) $@
- $(AR) rcs $@ $(LIBOBJS)
+ $(AR) cr $@ $(LIBOBJS)
+ $(RANLIB) $@
hashcash.dll: $(LIBOBJS)
$(CC) -shared -o hashcash.dll $(LIBOBJS) \
@@ -161,12 +162,10 @@ sha1-hashcash.txt: sha1-hashcash.pod
$(POD2TEXT) $? > $@
install: hashcash sha1 hashcash.1 sha1-hashcash.1
- $(INSTALL) -d $(INSTALL_PATH)
- $(INSTALL) hashcash sha1 $(INSTALL_PATH)
- $(INSTALL) -d $(MAN_INSTALL_PATH)
- $(INSTALL) -m 644 hashcash.1 sha1-hashcash.1 $(MAN_INSTALL_PATH)
- $(INSTALL) -d $(DOC_INSTALL_PATH)
- $(INSTALL) -m 644 README LICENSE CHANGELOG $(DOC_INSTALL_PATH)
+ $(BSD_INSTALL_PROGRAM) hashcash sha1 $(INSTALL_PATH)
+ $(BSD_INSTALL_MAN) hashcash.1 sha1-hashcash.1 $(MAN_INSTALL_PATH)
+ $(BSD_INSTALL_DATA_DIR) $(DOC_INSTALL_PATH)
+ $(BSD_INSTALL_DATA) README LICENSE CHANGELOG $(DOC_INSTALL_PATH)
depend:
$(MAKEDEPEND) -- -Y *.c *.h

6
mail/hashcash/pkg/DESCR Normal file
View File

@ -0,0 +1,6 @@
The hashcash tool allows you to create hashcash stamps to attach to
emails you send, and to verify hashcash stamps attached to emails you
receive. Email senders attach hashcash stamps with the X-Hashcash:
header. 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.

8
mail/hashcash/pkg/PLIST Normal file
View File

@ -0,0 +1,8 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2005/06/16 17:35:22 niallo Exp $
bin/hashcash
bin/sha1
@man man/man1/hashcash.1
@man man/man1/sha1-hashcash.1
share/doc/hashcash/README
share/doc/hashcash/LICENSE
share/doc/hashcash/CHANGELOG