diff options
author | pawel <pawel@FreeBSD.org> | 2012-11-02 21:44:19 +0800 |
---|---|---|
committer | pawel <pawel@FreeBSD.org> | 2012-11-02 21:44:19 +0800 |
commit | 96113fdc4774862e2646c25aa9ffa66a019a864b (patch) | |
tree | 6980b40ee618b2a91f4903a5a693fdac430e977a /mail | |
parent | c176594be3b4ac680766b93c13d9bc7a8f763c9f (diff) | |
download | freebsd-ports-gnome-96113fdc4774862e2646c25aa9ffa66a019a864b.tar.gz freebsd-ports-gnome-96113fdc4774862e2646c25aa9ffa66a019a864b.tar.zst freebsd-ports-gnome-96113fdc4774862e2646c25aa9ffa66a019a864b.zip |
- Update MASTER_SITES
- Add LICENSE
- Fix build with new utmpx
- Convert to OptionsNG
PR: ports/172243
Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Feature safe: yes
Diffstat (limited to 'mail')
-rw-r--r-- | mail/smfsav/Makefile | 65 | ||||
-rw-r--r-- | mail/smfsav/files/patch-Makefile | 48 | ||||
-rw-r--r-- | mail/smfsav/files/patch-getaddrinfo.c | 20 | ||||
-rw-r--r-- | mail/smfsav/files/patch-irpmarshall.c | 16 | ||||
-rw-r--r-- | mail/smfsav/files/patch-readme | 6 |
5 files changed, 29 insertions, 126 deletions
diff --git a/mail/smfsav/Makefile b/mail/smfsav/Makefile index 383283ed93fb..a1fcbb46422a 100644 --- a/mail/smfsav/Makefile +++ b/mail/smfsav/Makefile @@ -1,64 +1,51 @@ -# New ports collection makefile for: smfsav -# Date created: 17 February 2008 -# Whom: Anton Lysenok <bart@tapolsky.net.ua> -# +# Created by: Anton Lysenok <bart@tapolsky.net.ua> # $FreeBSD$ -# PORTNAME= smfsav PORTVERSION= 1.4.0 +PORTREVISION= 1 CATEGORIES= mail -MASTER_SITES= SF/smfs/smf-sav/smf-sav-${PORTVERSION}:0 \ - ${MASTER_SITE_ISC}:1 -MASTER_SITE_SUBDIR= smfs/:0 \ - bind8/src/8.4.7/:1 -DISTNAME= smf-sav-1.4.0 -DISTFILES= smf-sav-1.4.0.tar.gz:0 \ - bind-src.tar.gz:1 +MASTER_SITES= SF/smfs +DISTNAME= smf-sav-${PORTVERSION} DIST_SUBDIR= ${PORTNAME} MAINTAINER= ports@FreeBSD.org COMMENT= Sendmail Sender Address Validator -PLIST_FILES= sbin/smfsav \ - etc/smfsav.conf-dist +LICENSE= GPLv2 -.if !defined(NOPORTDOCS) -PLIST_FILES+= %%PORTDOCS%%%%DOCSDIR%%/COPYING \ - %%PORTDOCS%%%%DOCSDIR%%/CHANGES \ - %%PORTDOCS%%%%DOCSDIR%%/README -PLIST_DIRS= share/doc/${PORTNAME} -.endif +OPTIONS_DEFINE= DOCS USE_RC_SUBR= smfsav +CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} +LDFLAGS+= -lmilter ${PTHREAD_LIBS} + SUB_FILES= pkg-message +PORTDOCS= CHANGES README +PLIST_FILES= sbin/smfsav \ + etc/smfsav.conf-dist + .include <bsd.port.pre.mk> -.if ${OSVERSION} > 900007 -BROKEN= fails to build with new utmpx -.endif +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/readme -pre-build: - @${ECHO} - @${ECHO} [*] Compiling BIND 8 to make SmfSav able to resolve DNS names - ${MAKE} all -C ${WRKDIR}/src - @${ECHO} - @${ECHO} [*] Compiling SmfSav +do-build: + (cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -o smf-sav smf-sav.c \ + ${LDFLAGS}) do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/smf-sav ${PREFIX}/sbin/smfsav - ${INSTALL_DATA} ${WRKSRC}/smf-sav.conf ${PREFIX}/etc/smfsav.conf-dist - -post-install: -.if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/COPYING ${DOCSDIR}/COPYING - ${INSTALL_DATA} ${WRKSRC}/ChangeLog ${DOCSDIR}/CHANGES - ${INSTALL_DATA} ${WRKSRC}/readme ${DOCSDIR}/README + (cd ${WRKSRC} \ + && ${INSTALL_PROGRAM} smf-sav ${PREFIX}/sbin/smfsav \ + && ${INSTALL_DATA} smf-sav.conf ${PREFIX}/etc/smfsav.conf-dist) +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${DOCSDIR} + (cd ${WRKSRC} \ + && ${INSTALL_DATA} ChangeLog ${DOCSDIR}/CHANGES \ + && ${INSTALL_DATA} readme ${DOCSDIR}/README) .endif - ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} diff --git a/mail/smfsav/files/patch-Makefile b/mail/smfsav/files/patch-Makefile deleted file mode 100644 index 24e9994745eb..000000000000 --- a/mail/smfsav/files/patch-Makefile +++ /dev/null @@ -1,48 +0,0 @@ ---- Makefile.orig 2006-10-25 23:15:10.000000000 +0300 -+++ Makefile 2008-02-17 14:19:30.000000000 +0200 -@@ -1,17 +1,17 @@ - CC = gcc - PREFIX = /usr/local - SBINDIR = $(PREFIX)/sbin --DATADIR = /var/run/smfs --CONFDIR = /etc/mail/smfs --USER = smfs --GROUP = smfs --CFLAGS = -O2 -D_REENTRANT -fomit-frame-pointer -I/usr/local/include -+DATADIR = /var/run/smfsav -+CONFDIR = $(PREFIX)/etc -+USER = smfsav -+GROUP = smfsav -+CFLAGS = -O2 -D_REENTRANT -fomit-frame-pointer -I../src/include - - # Linux --LDFLAGS = -lmilter -lpthread -lresolv -+#LDFLAGS = -lmilter -lpthread -lresolv - - # FreeBSD (BIND v8 is required) --#LDFLAGS = -lmilter -pthread -L/usr/local/lib -lbind_r -+LDFLAGS = -lmilter -pthread -L../src/lib -lbind_r - - # Solaris - #LDFLAGS = -lmilter -lpthread -lsocket -lnsl -lresolv -@@ -30,20 +30,3 @@ - - clean: - rm -f smf-sav.o smf-sav -- --install: -- @./install.sh -- @cp -f -p smf-sav $(SBINDIR) -- @if test ! -d $(DATADIR); then \ -- mkdir -m 700 $(DATADIR); \ -- chown $(USER):$(GROUP) $(DATADIR); \ -- fi -- @if test ! -d $(CONFDIR); then \ -- mkdir -m 755 $(CONFDIR); \ -- fi -- @if test ! -f $(CONFDIR)/smf-sav.conf; then \ -- cp -p smf-sav.conf $(CONFDIR)/smf-sav.conf; \ -- else \ -- cp -p smf-sav.conf $(CONFDIR)/smf-sav.conf.new; \ -- fi -- @echo Please, inspect and edit the $(CONFDIR)/smf-sav.conf file. diff --git a/mail/smfsav/files/patch-getaddrinfo.c b/mail/smfsav/files/patch-getaddrinfo.c deleted file mode 100644 index ac50d7e5ba29..000000000000 --- a/mail/smfsav/files/patch-getaddrinfo.c +++ /dev/null @@ -1,20 +0,0 @@ ---- ../src/lib/irs/getaddrinfo.c.orig 2008-06-25 18:33:53.000000000 +0000 -+++ ../src/lib/irs/getaddrinfo.c 2008-06-25 18:34:20.000000000 +0000 -@@ -332,7 +332,7 @@ - pai->ai_family = PF_UNSPEC; - pai->ai_socktype = ANY; - pai->ai_protocol = ANY; --#ifdef __sparcv9 -+#if defined __sparcv9 && !defined(__FreeBSD__) - /* - * clear _ai_pad to preserve binary - * compatibility with previously compiled 64-bit -@@ -365,7 +365,7 @@ - } - memcpy(pai, hints, sizeof(*pai)); - --#ifdef __sparcv9 -+#if defined __sparcv9 && !defined(__FreeBSD__) - /* - * We need to clear _ai_pad to preserve binary - * compatibility. See prior comment. diff --git a/mail/smfsav/files/patch-irpmarshall.c b/mail/smfsav/files/patch-irpmarshall.c deleted file mode 100644 index a8563914cfdf..000000000000 --- a/mail/smfsav/files/patch-irpmarshall.c +++ /dev/null @@ -1,16 +0,0 @@ ---- ../src/lib/irs/irpmarshall.c.orig 2009-02-22 15:17:43.000000000 +0000 -+++ ../src/lib/irs/irpmarshall.c 2009-02-22 15:25:53.000000000 +0000 -@@ -89,6 +89,12 @@ - - #include "port_after.h" - -+#if defined(__FreeBSD__) -+#include <osreldate.h> -+#if __FreeBSD_version >= 800058 || __FreeBSD_version >= 701101 && __FreeBSD_version < 800000 -+#define HAVE_STRNDUP 1 -+#endif -+#endif - - #ifndef HAVE_STRNDUP - static char *strndup(const char *str, size_t len); - diff --git a/mail/smfsav/files/patch-readme b/mail/smfsav/files/patch-readme index d2daf8a5bc52..37a0ed97d447 100644 --- a/mail/smfsav/files/patch-readme +++ b/mail/smfsav/files/patch-readme @@ -5,13 +5,13 @@ make install - Inspect and edit the /etc/mail/smfs/smf-sav.conf file. -+ Inspect and edit the /usr/local/etc/smfsav.conf file. ++ Inspect and edit the %%PREFIX%%/etc/smfsav.conf file. -/usr/local/sbin/smf-sav -+/usr/local/sbin/smfsav ++%%PREFIX%%/sbin/smfsav or -/usr/local/sbin/smf-sav -c /etc/mail/smfs/smf-sav.conf -+/usr/local/sbin/smfsav -c /usr/local/etc/smfsav.conf ++%%PREFIX%%/sbin/smfsav -c %%PREFIX%%/etc/smfsav.conf Add this milter to start-up scripts before starting a Sendmail daemon. Look at the contributed samples of start-up scripts. |