summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Turner (bltcoder) <bturner@bltweb.net>2009-03-19 18:49:57 +0000
committerBrandon Turner (bltcoder) <bturner@bltweb.net>2009-03-19 18:49:57 +0000
commitb2d7feb1abc499bb03dca4eb63def44d8e79e762 (patch)
treee81437628079dbe4c93fcc1b94803be866c5b19c /mail-filter
parentnet-misc/anyremote: Version bump,remove old (diff)
downloadsunrise-reviewed-b2d7feb1abc499bb03dca4eb63def44d8e79e762.tar.gz
sunrise-reviewed-b2d7feb1abc499bb03dca4eb63def44d8e79e762.tar.bz2
sunrise-reviewed-b2d7feb1abc499bb03dca4eb63def44d8e79e762.zip
mail-filter/libdkim: New Ebuild for bug 262919 thanks to hwoarang, Tommy[D]
svn path=/sunrise/; revision=8115
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/libdkim/ChangeLog9
-rw-r--r--mail-filter/libdkim/Manifest6
-rw-r--r--mail-filter/libdkim/files/libdkim-extra-options.patch87
-rw-r--r--mail-filter/libdkim/files/libdkim-gentoo.patch120
-rw-r--r--mail-filter/libdkim/libdkim-1.0.19.ebuild34
-rw-r--r--mail-filter/libdkim/metadata.xml5
6 files changed, 261 insertions, 0 deletions
diff --git a/mail-filter/libdkim/ChangeLog b/mail-filter/libdkim/ChangeLog
new file mode 100644
index 000000000..f2482b586
--- /dev/null
+++ b/mail-filter/libdkim/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for mail-filter/libdkim
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 19 Mar 2009; Brandon Turner (bltcoder) <bturner@bltweb.net>
+ +libdkim-1.0.19.ebuild, +files/libdkim-extra-options.patch,
+ +files/libdkim-gentoo.patch, +metadata.xml:
+ New Ebuild for bug 262919 thanks to hwoarang, Tommy[D]
+
diff --git a/mail-filter/libdkim/Manifest b/mail-filter/libdkim/Manifest
new file mode 100644
index 000000000..1366fb461
--- /dev/null
+++ b/mail-filter/libdkim/Manifest
@@ -0,0 +1,6 @@
+AUX libdkim-extra-options.patch 2614 RMD160 e17fc80897d3918b306b63761b2b59296f71c8ba SHA1 42fe6b1ff66fad250abdd5c9ae0d57a91eff00b0 SHA256 4cc9eed6273fab56b29aede8235ead9a9441e9b2d0309a08e412d79ff9bfdc9f
+AUX libdkim-gentoo.patch 3172 RMD160 cad99f5e7ba6b607376d1836c1d961c3d7b869bf SHA1 3777a5d105a755e3bde9723e79dcaeb2a435c91f SHA256 6e456e58b8c6ea30330508e72b5a1e01260839d05dc7008f397297e75407ac30
+DIST libdkim-1.0.19.zip 55566 RMD160 33ef76ccfb7ef1cb682e2abdf1423beecf8bf180 SHA1 8704ea1b62d7dd61c4d8e96e03a7f05aa34fe675 SHA256 1935c88ea3d053ec2039114d900ac9eb5962adee10e0ec163777dfa5f3bd4eed
+EBUILD libdkim-1.0.19.ebuild 779 RMD160 be003f0292a7c59d51bd438da1bfe9b897c8ad5c SHA1 903a647a7fe0666a5fecb18fc320e54271c99b49 SHA256 260784c1ae9c0e4675c340bb85fda241afafec2db6f8d1395a32afb0cd34c6f2
+MISC ChangeLog 348 RMD160 dc811132d46370a0b8093cdae5c0c8100583a5d4 SHA1 f1de24bda34bb6bae7909dddc519697b016eb037 SHA256 b1c15326e6a386469f27302307583018d82f7148fb4faa1c40b885ca92eaff68
+MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
diff --git a/mail-filter/libdkim/files/libdkim-extra-options.patch b/mail-filter/libdkim/files/libdkim-extra-options.patch
new file mode 100644
index 000000000..5c8a240fd
--- /dev/null
+++ b/mail-filter/libdkim/files/libdkim-extra-options.patch
@@ -0,0 +1,87 @@
+diff -Naur libdkim.orig/src/libdkimtest.cpp libdkim/src/libdkimtest.cpp
+--- libdkim.orig/src/libdkimtest.cpp 2009-03-13 16:17:45.000000000 -0500
++++ libdkim/src/libdkimtest.cpp 2009-03-13 16:26:02.000000000 -0500
+@@ -55,8 +55,23 @@
+ return 0;
+ }
+
++void usage()
++{
+
+-
++ printf( "usage: libdkimtest [-b<allman|ietf|both>] [-c<r|s|t|u>] [-d<domain>] [-l] [-h] [-i<you@yourdomain.com>] [-q] [-s] [-t] [-v] [-x<expire time>] [-z<hash>] <msgfile> <privkeyfile> <outfile>\n");
++ printf( "-b<standard> allman , ietf or both\n");
++ printf( "-c<canonicalization> r for relaxed [DEFAULT], s - simple, t relaxed/simple, u - simple/relaxed\n");
++ printf( "-d<domain> the domain tag, if not provided it will be determined from the sender/from header\n");
++ printf( "-l include body length tag\n");
++ printf( "-h this help\n");
++ printf( "-i<identity> the identity, if not provided it will not be included\n");
++ printf( "-s sign the message\n");
++ printf( "-t include a timestamp tag\n");
++ printf( "-v verify the message\n");
++ printf( "-x<expire_time> the expire time in seconds since epoch ( DEFAULT = current time + 604800)\n\t if set to - then it will not be included");
++ printf( "-z<hash> 1 for sha1, 2 for sha256, 3 for both\n");
++ printf( "-y<selector> the selector tag DEFAULT=MDaemon\n");
++}
+ int main(int argc, char* argv[])
+ {
+ int n;
+@@ -77,7 +92,7 @@
+ time(&t);
+
+ opts.nCanon = DKIM_SIGN_RELAXED;
+- opts.nIncludeBodyLengthTag = 1;
++ opts.nIncludeBodyLengthTag = 0;
+ opts.nIncludeQueryMethod = 0;
+ opts.nIncludeTimeStamp = 0;
+ opts.expireTime = t + 604800; // expires in 1 week
+@@ -92,6 +107,11 @@
+ int nArgParseState = 0;
+ bool bSign = true;
+
++ if(argc<2){
++ usage();
++ exit(1);
++ }
++
+ for( n = 1; n < argc; n++ )
+ {
+ if( argv[n][0] == '-' && strlen(argv[n]) > 1 )
+@@ -121,14 +141,16 @@
+ }
+ break;
+
+-
++ case 'd':
++ strncpy(opts.szDomain,(const char*)(argv[n]+2),sizeof(opts.szDomain)-1);
++ break;
+ case 'l': // body length tag
+ opts.nIncludeBodyLengthTag = 1;
+ break;
+
+
+ case 'h':
+- printf( "usage: \n" );
++ usage();
+ return 0;
+
+ case 'i': // identity
+@@ -138,7 +160,7 @@
+ }
+ else
+ {
+- strcpy( opts.szIdentity, argv[n] + 2 );
++ strncpy( opts.szIdentity, argv[n] + 2,sizeof(opts.szIdentity)-1 );
+ }
+ break;
+
+@@ -169,6 +191,9 @@
+ }
+ break;
+
++ case 'y':
++ strncpy( opts.szSelector, argv[n]+2, sizeof(opts.szSelector)-1);
++ break;
+
+ case 'z': // sign w/ sha1, sha256 or both
+ opts.nHash = atoi( &argv[n][2] );
diff --git a/mail-filter/libdkim/files/libdkim-gentoo.patch b/mail-filter/libdkim/files/libdkim-gentoo.patch
new file mode 100644
index 000000000..a4437b6d0
--- /dev/null
+++ b/mail-filter/libdkim/files/libdkim-gentoo.patch
@@ -0,0 +1,120 @@
+diff -Naur libdkim.orig/src/Makefile libdkim/src/Makefile
+--- libdkim.orig/src/Makefile 2009-03-17 17:06:24.000000000 -0500
++++ libdkim/src/Makefile 2009-03-17 17:07:12.000000000 -0500
+@@ -1,15 +1,10 @@
+ # libdkim makefile for UNIX
+ #
+
+-#ifdef LINUX
+-CFLAGS = -c
+-LFLAGS =
++DESTDIR ?= /
++
++CFLAGS += -fPIC
+ LIBS = -lcrypto -lresolv
+-#else
+-CFLAGS = -c
+-LFLAGS =
+-LIBS = -lcrypto
+-#endif
+
+ INCL = -I /usr/include/openssl/
+
+@@ -19,23 +14,34 @@
+
+ HDRS = dkim.h dns.h dkimbase.h dkimsign.h dkimverify.h
+
+-all: libdkim.a libdkimtest
++all: libdkim.so.1 libdkimtest
+
+ libdkim.a: $(OBJS)
+ rm -f libdkim.a
+ ar cr libdkim.a $(OBJS)
+ ranlib libdkim.a
+
+-libdkimtest : libdkim.a libdkimtest.o
+- g++ -olibdkimtest $(LFLAGS) \
+- -L . libdkimtest.o $(LIBS) -ldkim
++libdkim.so.1: $(OBJS)
++ $(CXX) -shared -Wl,-soname,$@.1 $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
++ ln -s $@ libdkim.so
++
++.cpp.o:
++ $(CXX) $(CFLAGS) -c $<
++
++libdkimtest : libdkim.so.1 libdkimtest.o
++ $(CXX) -o$@ $(LDFLAGS) \
++ -L. libdkimtest.o $(LIBS) -ldkim
+
+ libdkimtest.o: libdkimtest.cpp $(HDRS)
+
+-.cpp.o:
+- g++ $(CFLAGS) -c $<
+
+ clean:
+- rm *.o libdkim.lib libdkimtest
++ rm -f *.o libdkim.{a,so,so.1} libdkimtest
++
++install: all
++ install -D -m 0755 libdkim.so.1 $(DESTDIR)/usr/lib/libdkim.so.1
++ ln -s libdkim.so.1 $(DESTDIR)/usr/lib/libdkim.so
++ install -D -m 0644 dkim.h $(DESTDIR)/usr/include/dkim.h
++ install -D -m 0755 libdkimtest $(DESTDIR)/usr/bin/libdkimtest
+
+
+diff -Naur libdkim.orig/src/dkim.h libdkim/src/dkim.h
+--- libdkim.orig/src/dkim.h 2009-03-17 17:06:24.000000000 -0500
++++ libdkim/src/dkim.h 2009-03-17 17:06:53.000000000 -0500
+@@ -22,7 +22,6 @@
+ #define DKIM_CALL WINAPI
+ #else
+ #define DKIM_CALL
+-#define MAKELONG(a,b) ((long)(((unsigned)(a) & 0xffff) | (((unsigned)(b) & 0xffff) << 16)))
+ #endif
+
+
+@@ -162,6 +161,32 @@
+
+ char *DKIM_CALL DKIMGetErrorString( int ErrorCode );
+
++#ifndef _WIN32
++/*
++ * macros.h: Useful macros
++ *
++ * Author:
++ * Dick Porter (dick@ximian.com)
++ *
++ * (C) 2002 Ximian, Inc.
++ */
++#ifndef _WAPI_MACROS_H_
++#define _WAPI_MACROS_H_
++
++#include <sys/types.h>
++
++#define MAKEWORD(low, high) ((__uint16_t)(((__uint8_t)(low)) | \
++ ((__uint16_t)((__uint8_t)(high))) << 8))
++#define MAKELONG(low, high) ((__uint32_t)(((__uint16_t)(low)) | \
++ ((__uint32_t)((__uint16_t)(high))) << 16))
++#define LOWORD(i32) ((__uint16_t)((i32) & 0xFFFF))
++#define HIWORD(i32) ((__uint16_t)(((__uint32_t)(i32) >> 16) & 0xFFFF))
++#define LOBYTE(i16) ((__uint8_t)((i16) & 0xFF))
++#define HIBYTE(i16) ((__uint8_t)(((__uint16_t)(i16) >> 8) & 0xFF))
++
++#endif /* _WAPI_MACROS_H_ */
++#endif
++
+ #ifdef __cplusplus
+ }
+ #endif
+diff -Naur libdkim.orig/src/dkimsign.cpp libdkim/src/dkimsign.cpp
+--- libdkim.orig/src/dkimsign.cpp 2009-03-17 17:06:24.000000000 -0500
++++ libdkim/src/dkimsign.cpp 2009-03-17 17:06:53.000000000 -0500
+@@ -25,8 +25,6 @@
+ #else
+ #define _strnicmp strncasecmp
+ #define _stricmp strcasecmp
+-#define LOWORD(l) ((unsigned)(l) & 0xffff)
+-#define HIWORD(l) ((unsigned)(l) >> 16)
+ #endif
+
+ #include <string.h>
diff --git a/mail-filter/libdkim/libdkim-1.0.19.ebuild b/mail-filter/libdkim/libdkim-1.0.19.ebuild
new file mode 100644
index 000000000..5764f5297
--- /dev/null
+++ b/mail-filter/libdkim/libdkim-1.0.19.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="a library to verify and create signatures of e-mail headers"
+HOMEPAGE="http://libdkim.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/openssl
+ app-arch/unzip"
+RDEPEND="!mail-filter/libdkim-exim
+ dev-libs/openssl"
+
+S=${WORKDIR}/${PN}/src
+
+src_prepare() {
+ # upstream claims to be portable, but isn't very
+ epatch "${FILESDIR}/${PN}-gentoo.patch" \
+ "${FILESDIR}/${PN}-extra-options.patch"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc ../README || die "Install README failed"
+}
diff --git a/mail-filter/libdkim/metadata.xml b/mail-filter/libdkim/metadata.xml
new file mode 100644
index 000000000..7e3286984
--- /dev/null
+++ b/mail-filter/libdkim/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>maintainer-wanted</herd>
+</pkgmetadata>