Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Mar 2004 20:35:15 +0100 (CET)
From:      Daniel Roethlisberger <daniel@roe.ch>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/64265: New port: mail/libspf - A SPF library and client
Message-ID:  <200403141935.i2EJZFtb050654@cuendillar.roe>
Resent-Message-ID: <200403142010.i2EKAHs4007325@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         64265
>Category:       ports
>Synopsis:       New port: mail/libspf - A SPF library and client
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 14 12:10:17 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Daniel Roethlisberger
>Release:        FreeBSD 5.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD cuendillar.roe 5.2-RELEASE FreeBSD 5.2-RELEASE #0: Sun Jan 11 04:21:45 GMT 2004 root@wv1u.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Sender Policy Framework (SPF) library and client in C.
SPF is a standard under development for email envelope sender
verification. Domain owners can specify who is qualified to send
mail for the domain by publishing SPF TXT records in DNS.
Read all about SPF at http://spf.pobox.com/

This is the first of three new SPF-related ports.

Note that portlint -abctN gives 3 false alerts (see Makefile comments).
>How-To-Repeat:
	
>Fix:
--- libspf.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	libspf
#	libspf/Makefile
#	libspf/distinfo
#	libspf/pkg-descr
#	libspf/pkg-plist
#	libspf/pkg-message
#	libspf/files
#	libspf/files/patch-tools::spfquery.c
#
echo c - libspf
mkdir -p libspf > /dev/null 2>&1
echo x - libspf/Makefile
sed 's/^X//' >libspf/Makefile << 'END-of-libspf/Makefile'
X# New ports collection makefile for:	libspf
X# Date created:		28 February 2004
X# Whom:			Daniel Roethlisberger <daniel@roe.ch>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	libspf
XPORTVERSION=	0.24.b
XCATEGORIES=	mail
XMASTER_SITES=	http://www.libspf.org/files/
XDISTNAME=	${PORTNAME}.${PORTVERSION}eta
X
XMAINTAINER=	daniel@roe.ch
XCOMMENT=	Sender Policy Framework (SPF) library and client
X
X# Require getopt_long_only - USE_GETOPT_LONG is *not* sufficient
XLIB_DEPENDS=	gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
X
XUSE_BZIP2=	yes
XWRKSRC=		${WRKDIR}/${PORTNAME}.24
XUSE_GMAKE=	yes
XUSE_REINPLACE=	yes
XINSTALLS_SHLIB=	yes
XLIBSPF_REV=	1
XPLIST_SUB=	PORTNAME=${PORTNAME} LIBSPF_REV=${LIBSPF_REV}
XMAKE_ENV=	CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
X		LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib -L${WRKSRC}"
X
X# Supported tunables:
X#
X# WITH_SPF_LOG_FILE=/foo/bar	enable transaction logfile (if unset: no log)
X# WITH_SPF_DEBUG=yes		enable debugging
X# WITH_SPF_DEBUG_FILE=/foo/baz	enable debug logfile (if unset: stdout/stderr)
X
X.if defined(WITH_SPF_LOG_FILE)
XSPF_LOG_FILE=	${WITH_SPF_LOG_FILE}
X.else
XSPF_LOG_FILE=	/dev/null
X.endif
X
X.if defined(WITH_SPF_DEBUG)
XSPF_CFLAGS=	-ggdb -DDEBUG -D_SPF_DEBUG
X.if defined(WITH_SPF_DEBUG_FILE)
XSPF_CFLAGS+=	-D_SPF_DEBUG_LOGFILE
X.endif
X.endif
X
X.if defined(WITH_SPF_DEBUG_FILE)
XSPF_DEBUG_FILE=	${WITH_SPF_DEBUG_FILE}
X.else
XSPF_DEBUG_FILE=	/dev/null
X.endif
X
XSPF_CFLAGS+=	-DDEBUG_LOG_FILE=\\\"${SPF_DEBUG_FILE}\\\" \
X		-DOUTPUT_LOG_FILE=\\\"${SPF_LOG_FILE}\\\"
X
X# This is all a bit messy, but given the inconvenient original Makefile,
X# this seems to be the best way to make this port work in this version.
X# The author of libspf is working on autotools support, so this ugliness
X# should have an end soon.
Xpost-patch:
X	@${REINPLACE_CMD} \
X	    -e 's,^CFLAGS:=.*,CFLAGS+=-Wall -D_BSD_SOURCE ${SPF_CFLAGS},' \
X	    -e 's/^CPPFLAGS:=/#CPPFLAGS:=/' \
X	    -e 's/^LDFLAGS:=/#LDFLAGS:=/' \
X	    -e 's/make/gmake/g' \
X	    -e 's/-lresolv//g' \
X	    -e 's/libspf\.so\.1\.0\.1/libspf.so.${LIBSPF_REV}/g' \
X	    -e 's/-soname,libspf\.so\.1/-soname,libspf.so.${LIBSPF_REV}/g' \
X	    ${WRKSRC}/Makefile
X	@${REINPLACE_CMD} \
X	    -e 's/^CFLAGS:=/#CFLAGS:=/' \
X	    -e 's/^CPPFLAGS:=/#CPPFLAGS:=/' \
X	    -e 's/^LDFLAGS:=/#LDFLAGS:=/' \
X	    -e 's/make/gmake/g' \
X	    -e 's/\(-o spfquery ..\)/\1 -lgnugetopt/g' \
X	    -e 's/-o spfquery/-o spfquery-${PORTNAME}/g' \
X	    ${WRKSRC}/tools/Makefile
X	@${REINPLACE_CMD} \
X	    -e 's/#include "error.h"//' \
X	    ${WRKSRC}/main.c ${WRKSRC}/dns.c
X	@${REINPLACE_CMD} \
X	    -e 's,\(#define DEBUG_LOG_FILE.*\),/* \1 */,' \
X	    -e 's,\(#define OUTPUT_LOG_FILE.*\),/* \1 */,' \
X	    ${WRKSRC}/util.h
X	@${REINPLACE_CMD} \
X	    -e 's/spfquery /spfquery-${PORTNAME} /' \
X	    ${WRKSRC}/tools/spfquery.c
X
Xpost-build:
X	@(cd ${WRKSRC}/tools; ${SETENV} ${MAKE_ENV} ${GMAKE} shared )
X
Xdo-install:
X	${INSTALL_DATA} ${WRKSRC}/spf.h ${PREFIX}/include
X	${INSTALL_DATA} ${WRKSRC}/libspf.a ${PREFIX}/lib
X	${INSTALL_DATA} ${WRKSRC}/libspf.so.${LIBSPF_REV} ${PREFIX}/lib
X	(cd ${PREFIX}/lib ; ${LN} -sf libspf.so.${LIBSPF_REV} libspf.so)
X	${INSTALL_PROGRAM} ${WRKSRC}/tools/spfquery-${PORTNAME} ${PREFIX}/bin
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-libspf/Makefile
echo x - libspf/distinfo
sed 's/^X//' >libspf/distinfo << 'END-of-libspf/distinfo'
XMD5 (libspf.0.24.beta.tar.bz2) = bf8b0ff0efb6eea8176dcedd91eabf15
XSIZE (libspf.0.24.beta.tar.bz2) = 59244
END-of-libspf/distinfo
echo x - libspf/pkg-descr
sed 's/^X//' >libspf/pkg-descr << 'END-of-libspf/pkg-descr'
XSender Policy Framework (SPF) library and client in C.
XSPF is a standard under development for email envelope sender
Xverification. Domain owners can specify who is qualified to send
Xmail for the domain by publishing SPF TXT records in DNS.
XRead all about SPF at http://spf.pobox.com/
X
XThis code is intended for use by developers, early adopters and
Xtesters. You probably don't want to run this code unless you know
Xwhat you are doing.
X
XAuthor: James Couzens <jcouzens@obscurity.org>
XWWW: http://www.libspf.org/
END-of-libspf/pkg-descr
echo x - libspf/pkg-plist
sed 's/^X//' >libspf/pkg-plist << 'END-of-libspf/pkg-plist'
Xinclude/spf.h
Xlib/libspf.a
Xlib/libspf.so
Xlib/libspf.so.%%LIBSPF_REV%%
Xbin/spfquery-%%PORTNAME%%
END-of-libspf/pkg-plist
echo x - libspf/pkg-message
sed 's/^X//' >libspf/pkg-message << 'END-of-libspf/pkg-message'
X-----------------------------------------------------------------------
XNote: This port installs the SPF userspace tools with a filename suffix
X      of -libspf in order to avoid conflicts with other SPF ports
X      providing tools of the same name.
X      Please create convenience symlinks manually, if desired.
X-----------------------------------------------------------------------
END-of-libspf/pkg-message
echo c - libspf/files
mkdir -p libspf/files > /dev/null 2>&1
echo x - libspf/files/patch-tools::spfquery.c
sed 's/^X//' >libspf/files/patch-tools::spfquery.c << 'END-of-libspf/files/patch-tools::spfquery.c'
X--- tools/spfquery.c.bak	Wed Feb 25 12:44:41 2004
X+++ tools/spfquery.c	Sun Mar 14 15:58:33 2004
X@@ -133,6 +133,9 @@
X 
X     switch (c)
X     {
X+    case 'f':
X+      opt_file = optarg;
X+      break;
X     case 'i':
X       opt_ipv4 = optarg;
X       break;
END-of-libspf/files/patch-tools::spfquery.c
exit
--- libspf.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403141935.i2EJZFtb050654>