Lines 6-106
Link Here
|
6 |
# |
6 |
# |
7 |
|
7 |
|
8 |
PORTNAME= libspf |
8 |
PORTNAME= libspf |
9 |
PORTVERSION= 0.25.b |
9 |
PORTVERSION= ${DISTVERSION:S/-/./} |
10 |
CATEGORIES= mail |
10 |
CATEGORIES= mail |
11 |
MASTER_SITES= http://www.libspf.org/files/ |
11 |
MASTER_SITES= http://www.libspf.org/files/src/ |
12 |
DISTNAME= ${PORTNAME}.${PORTVERSION}eta |
|
|
13 |
|
12 |
|
14 |
DEPRECATED= "stale, try mail/libspf2" |
13 |
MAINTAINER= marcus@corp.grupos.com.br |
15 |
EXPIRATION_DATE=2005-07-31 |
|
|
16 |
|
17 |
MAINTAINER= ports@FreeBSD.org |
18 |
COMMENT= Sender Policy Framework (SPF) library and client |
14 |
COMMENT= Sender Policy Framework (SPF) library and client |
19 |
|
15 |
|
20 |
NOT_FOR_ARCHS= amd64 alpha |
16 |
DISTVERSION= 1.0.0-p3 |
21 |
|
17 |
|
22 |
USE_GETOPT_LONG=yes |
|
|
23 |
USE_BZIP2= yes |
18 |
USE_BZIP2= yes |
24 |
WRKSRC= ${WRKDIR}/${PORTNAME}.25 |
19 |
USE_LIBTOOL_VER= 15 |
25 |
USE_GMAKE= yes |
20 |
HAS_CONFIGURE= yes |
26 |
USE_REINPLACE= yes |
21 |
CONFIGURE_ARGS= --prefix=${PREFIX} |
27 |
INSTALLS_SHLIB= yes |
22 |
|
28 |
LIBSPF_REV= 1 |
23 |
OPTIONS= RFC_RECURSION "Change SPF recursion to 20 (as per RFC)" no \ |
29 |
PLIST_SUB= PORTNAME=${PORTNAME} LIBSPF_REV=${LIBSPF_REV} |
24 |
LOGFILE_STATS "Enables logfile stats" no \ |
30 |
LDFLAGS+= -L${WRKSRC} |
25 |
DEBUG "Enables debug option" no |
31 |
|
26 |
|
32 |
# Supported tunables: |
27 |
.include <bsd.port.pre.mk> |
33 |
# |
|
|
34 |
# WITH_SPF_LOG_FILE=/foo/bar enable transaction logfile (if unset: no log) |
35 |
# WITH_SPF_DEBUG=yes enable debugging |
36 |
# WITH_SPF_DEBUG_FILE=/foo/baz enable debug logfile (if unset: stdout/stderr) |
37 |
|
38 |
.if defined(WITH_SPF_LOG_FILE) |
39 |
SPF_LOG_FILE= ${WITH_SPF_LOG_FILE} |
40 |
.else |
41 |
SPF_LOG_FILE= /dev/null |
42 |
.endif |
43 |
|
28 |
|
44 |
.if defined(WITH_SPF_DEBUG) |
29 |
.if !defined(WITHOUT_RFC_RECURSION) |
45 |
SPF_CFLAGS= -ggdb -DDEBUG -D_SPF_DEBUG |
30 |
CONFIGURE_ARGS+= --enable-rfc-recursion |
46 |
.if defined(WITH_SPF_DEBUG_FILE) |
|
|
47 |
SPF_CFLAGS+= -D_SPF_DEBUG_LOGFILE |
48 |
.endif |
31 |
.endif |
|
|
32 |
|
33 |
.if !defined(WITHOUT_LOGFILE_STATS) |
34 |
CONFIGURE_ARGS+= --enable-logfile-stats |
49 |
.endif |
35 |
.endif |
50 |
|
36 |
|
51 |
.if defined(WITH_SPF_DEBUG_FILE) |
37 |
.if !defined(WITHOUT_DEBUG) |
52 |
SPF_DEBUG_FILE= ${WITH_SPF_DEBUG_FILE} |
38 |
CONFIGURE_ARGS+= --enable-debug |
53 |
.else |
|
|
54 |
SPF_DEBUG_FILE= /dev/null |
55 |
.endif |
39 |
.endif |
56 |
|
40 |
|
57 |
SPF_CFLAGS+= -DDEBUG_LOG_FILE=\\\"${SPF_DEBUG_FILE}\\\" \ |
41 |
.if !defined(NOPORTDOCS) |
58 |
-DOUTPUT_LOG_FILE=\\\"${SPF_LOG_FILE}\\\" |
42 |
PORTDOCS= * |
|
|
43 |
.endif |
59 |
|
44 |
|
60 |
# This is all a bit messy, but given the inconvenient original Makefile, |
45 |
post-install: |
61 |
# this seems to be the best way to make this port work in this version. |
46 |
.if !defined(NOPORTDOCS) |
62 |
# The author of libspf is working on autotools support, so this ugliness |
47 |
@${MKDIR} ${DOCSDIR} |
63 |
# should have an end soon. |
48 |
@${FIND} ${WRKSRC}/docs -type d -name CVS | ${XARGS} ${RM} -rf |
64 |
post-patch: |
49 |
.for i in docs docs/API docs/API/doxygen docs/API/doxygen/html docs/RFC docs/qmail \ |
65 |
@${REINPLACE_CMD} \ |
50 |
docs/qmail/1.03 docs/qmail/1.04 docs/qmail/1.05 docs/spfqtool docs/Postfix \ |
66 |
-e 's,^CFLAGS:=.*,CFLAGS+=-Wall -D_BSD_SOURCE ${SPF_CFLAGS},' \ |
51 |
docs/Postfix/2.1.x docs/Sendmail docs/Sendmail/8.12.x docs/Sendmail/8.13.x \ |
67 |
-e 's/^CPPFLAGS:=/#CPPFLAGS:=/' \ |
52 |
docs/Courier-MTA docs/history |
68 |
-e 's/^LDFLAGS:=/#LDFLAGS:=/' \ |
53 |
@${MKDIR} ${DOCSDIR}/${i} |
69 |
-e 's/make /${GMAKE} /g' \ |
54 |
@for f in `${FIND} ${WRKSRC}/${i} ! -type d -maxdepth 1`; do \ |
70 |
-e 's/-lresolv//g' \ |
55 |
${INSTALL_DATA} $${f} ${DOCSDIR}/${i}; \ |
71 |
-e 's/libspf.a : -lc/libspf.a :/g' \ |
56 |
done |
72 |
-e 's/libspf\.so\.1\.0\.1/libspf.so.${LIBSPF_REV}/g' \ |
57 |
.endfor |
73 |
-e 's/-soname,libspf\.so\.1/-soname,libspf.so.${LIBSPF_REV}/g' \ |
58 |
.endif |
74 |
${WRKSRC}/Makefile |
59 |
@${MKDIR} ${EXAMPLESDIR} |
75 |
@${REINPLACE_CMD} \ |
60 |
@${FIND} ${WRKSRC}/examples -type d -name CVS | ${XARGS} ${RM} -rf |
76 |
-e 's,^CFLAGS:=,CFLAGS:=${CFLAGS} ${CPPFLAGS},' \ |
61 |
.for i in examples/qmail examples/qmail/control examples/Sendmail |
77 |
-e 's,^CPPFLAGS:=,CPPFLAGS:=${CPPFLAGS},' \ |
62 |
@${MKDIR} ${EXAMPLESDIR}/${i} |
78 |
-e 's,^LDFLAGS:=.*,LDFLAGS=${LDFLAGS},' \ |
63 |
@for f in `${FIND} ${WRKSRC}/${i} ! -type d -maxdepth 1`; do \ |
79 |
-e 's/make /${GMAKE} /g' \ |
64 |
${INSTALL_DATA} $${f} ${EXAMPLESDIR}/${i}; \ |
80 |
-e 's/-o spfquery/-o spfquery-${PORTNAME}/g' \ |
65 |
done |
81 |
${WRKSRC}/tools/Makefile |
66 |
.endfor |
82 |
@${REINPLACE_CMD} \ |
67 |
@${MKDIR} ${DATADIR} |
83 |
-e 's/#include "error.h"//' \ |
68 |
@${FIND} ${WRKSRC}/patches -type d -name CVS | ${XARGS} ${RM} -rf |
84 |
${WRKSRC}/main.c ${WRKSRC}/dns.c |
69 |
.for i in patches patches/qmail patches/qmail/1.03 patches/qmail/1.05 patches/Postfix \ |
85 |
@${REINPLACE_CMD} \ |
70 |
patches/Postfix/2.1.x patches/Sendmail patches/Sendmail/8.12.x patches/Sendmail/8.13.x \ |
86 |
-e 's,\(#define DEBUG_LOG_FILE.*\),/* \1 */,' \ |
71 |
patches/Courier-MTA |
87 |
-e 's,\(#define OUTPUT_LOG_FILE.*\),/* \1 */,' \ |
72 |
@${MKDIR} ${DATADIR}/${i} |
88 |
${WRKSRC}/util.h |
73 |
@for f in `${FIND} ${WRKSRC}/${i} ! -type d -maxdepth 1`; do \ |
89 |
@${REINPLACE_CMD} \ |
74 |
${INSTALL_DATA} $${f} ${DATADIR}/${i}; \ |
90 |
-e 's/spfquery /spfquery-${PORTNAME} /' \ |
75 |
done |
91 |
-e 's/getopt_long_only/getopt_long/g' \ |
76 |
.endfor |
92 |
-E -e '/stderr/s/ -([a-z]{2,})/ --\1/g' \ |
|
|
93 |
${WRKSRC}/tools/spfquery.c |
94 |
|
95 |
post-build: |
96 |
@(cd ${WRKSRC}/tools; ${SETENV} ${MAKE_ENV} ${GMAKE} shared ) |
97 |
|
98 |
do-install: |
99 |
${INSTALL_DATA} ${WRKSRC}/spf.h ${PREFIX}/include |
100 |
${INSTALL_DATA} ${WRKSRC}/libspf.a ${PREFIX}/lib |
101 |
${INSTALL_DATA} ${WRKSRC}/libspf.so.${LIBSPF_REV} ${PREFIX}/lib |
102 |
(cd ${PREFIX}/lib ; ${LN} -sf libspf.so.${LIBSPF_REV} libspf.so) |
103 |
${INSTALL_PROGRAM} ${WRKSRC}/tools/spfquery-${PORTNAME} ${PREFIX}/bin |
104 |
@${CAT} ${PKGMESSAGE} |
105 |
|
77 |
|
106 |
.include <bsd.port.mk> |
78 |
.include <bsd.port.post.mk> |