From 6fa44de9102aca16b0fdb19d04f034f052e6a6aa Mon Sep 17 00:00:00 2001 From: ashish Date: Sun, 30 Jun 2013 21:30:52 +0000 Subject: OpenSMTPD is a FREE implementation of the server-side SMTP protocol as defined by RFC 5321, with some additional standard extensions. It allows ordinary machines to exchange e-mails with other systems speaking the SMTP protocol. This port packages the development snapshots released by OpenSMTPD team. WWW: http://www.OpenSMTPD.org/ Changes: http://article.gmane.org/gmane.mail.opensmtpd.general/738 --- mail/Makefile | 1 + mail/opensmtpd-devel/Makefile | 94 ++++++++++++++++++++++ mail/opensmtpd-devel/distinfo | 2 + .../files/patch-mk_smtpd_Makefile.in | 18 +++++ .../files/patch-smtpd_backends_table__mysql.c | 13 +++ .../files/patch-smtpd_backends_table__postgres.c | 20 +++++ .../files/patch-smtpd_backends_table__sqlite.c | 13 +++ mail/opensmtpd-devel/files/pkg-deinstall.in | 14 ++++ mail/opensmtpd-devel/files/pkg-install.in | 17 ++++ mail/opensmtpd-devel/files/smtpd.in | 35 ++++++++ mail/opensmtpd-devel/pkg-descr | 8 ++ mail/opensmtpd-devel/pkg-plist | 24 ++++++ 12 files changed, 259 insertions(+) create mode 100644 mail/opensmtpd-devel/Makefile create mode 100644 mail/opensmtpd-devel/distinfo create mode 100644 mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in create mode 100644 mail/opensmtpd-devel/files/patch-smtpd_backends_table__mysql.c create mode 100644 mail/opensmtpd-devel/files/patch-smtpd_backends_table__postgres.c create mode 100644 mail/opensmtpd-devel/files/patch-smtpd_backends_table__sqlite.c create mode 100644 mail/opensmtpd-devel/files/pkg-deinstall.in create mode 100644 mail/opensmtpd-devel/files/pkg-install.in create mode 100644 mail/opensmtpd-devel/files/smtpd.in create mode 100644 mail/opensmtpd-devel/pkg-descr create mode 100644 mail/opensmtpd-devel/pkg-plist (limited to 'mail') diff --git a/mail/Makefile b/mail/Makefile index 9669f77fd944..dab456cb9b58 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -317,6 +317,7 @@ SUBDIR += opendkim SUBDIR += opendmarc SUBDIR += opensmtpd + SUBDIR += opensmtpd-devel SUBDIR += openwebmail SUBDIR += osbf-lua SUBDIR += ovs diff --git a/mail/opensmtpd-devel/Makefile b/mail/opensmtpd-devel/Makefile new file mode 100644 index 000000000000..d8d445045755 --- /dev/null +++ b/mail/opensmtpd-devel/Makefile @@ -0,0 +1,94 @@ +# Created by: Ashish SHUKLA +# $FreeBSD$ + +PORTNAME= opensmtpd +PORTVERSION= 201306271531 +CATEGORIES= mail +MASTER_SITES= http://www.opensmtpd.org/archives/ \ + http://distfiles.pirateparty.in/ashish/ +PKGNAMESUFFIX= -devel +DISTNAME= ${PORTNAME}-${PORTVERSION}p1 + +MAINTAINER= ashish@FreeBSD.org +COMMENT= OpenSMTPD is a free MTA (development snapshot) + +LICENSE= ISCL +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= event-1:${PORTSDIR}/devel/libevent + +OPENSMTPD_SNAPSHOT_VER= p1 + +OPTIONS_DEFINE= PAM SQLITE MYSQL PGSQL LDAP + +OPTIONS_DEFAULT= PAM + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --with-libevent-dir=${LOCALBASE} --sysconfdir=${PREFIX}/etc/mail/ + +USE_RC_SUBR= smtpd +SUB_FILES= pkg-install pkg-deinstall + +CONFLICTS_INSTALL= postfix-[0-9]* sendmail-[0-9]* opensmtpd-[0-9]* + +MAN8= makemap.8 newaliases.8 smtpctl.8 smtpd.8 +MAN5= smtpd.conf.5 aliases.5 forward.5 + +USERS= _smtpd _smtpq +GROUPS= _smtpd + +.include + +USE_OPENSSL= yes + +.if ${PORT_OPTIONS:MMYSQL} +USE_MYSQL= yes +CFLAGS+= -I${LOCALBASE}/include/mysql +LDFLAGS+= -L${LOCALBASE}/lib/mysql +CONFIGURE_ARGS+= --with-experimental-mysql +PLIST_SUB+= MYSQL="" +.else +PLIST_SUB+= MYSQL="@comment " +.endif + +.if ${PORT_OPTIONS:MSQLITE} +USE_SQLITE= 3 +CONFIGURE_ARGS+= --with-experimental-sqlite +PLIST_SUB+= SQLITE="" +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +.else +PLIST_SUB+= SQLITE="@comment " +.endif + +.if ${PORT_OPTIONS:MPGSQL} +USE_PGSQL= yes +CONFIGURE_ARGS+= --with-experimental-postgres +PLIST_SUB+= PGSQL="" +.else +PLIST_SUB+= PGSQL="@comment " +.endif + +.if ${PORT_OPTIONS:MLDAP} +CONFIGURE_ARGS+= --with-experimental-ldap +PLIST_SUB+= LDAP="" +.else +PLIST_SUB+= LDAP="@comment " +.endif + +.if ${PORT_OPTIONS:MPAM} +CONFIGURE_ARGS+= --with-pam +.endif + +# FreeBSD 7.3 and earlier need to use OpenSSL from ports +.if ${OSVERSION} < 704000 +WITH_OPENSSL_PORT= yes +.endif + +post-install: + @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +post-deinstall: + @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-DEINSTALL + +.include diff --git a/mail/opensmtpd-devel/distinfo b/mail/opensmtpd-devel/distinfo new file mode 100644 index 000000000000..08bc56d35b4f --- /dev/null +++ b/mail/opensmtpd-devel/distinfo @@ -0,0 +1,2 @@ +SHA256 (opensmtpd-201306271531p1.tar.gz) = 4c831a87b0d6834410b01a0ef13adeca9539391b341b50648aca1a53f6df062c +SIZE (opensmtpd-201306271531p1.tar.gz) = 771055 diff --git a/mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in b/mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in new file mode 100644 index 000000000000..8c3c1b4a8a26 --- /dev/null +++ b/mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in @@ -0,0 +1,18 @@ + +$FreeBSD$ + +--- mk/smtpd/Makefile.in.orig ++++ mk/smtpd/Makefile.in +@@ -1837,11 +1837,7 @@ + $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5 + $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8 + +- @if [ ! -f $(DESTDIR)$(sysconfdir)/smtpd.conf ]; then \ +- $(INSTALL) -m 644 smtpd.conf.out $(DESTDIR)$(sysconfdir)/smtpd.conf; \ +- else \ +- echo "$(DESTDIR)$(sysconfdir)/smtpd.conf already exists, install will not overwrite"; \ +- fi ++ $(INSTALL) -m 644 smtpd.conf.out $(DESTDIR)$(sysconfdir)/smtpd.conf.sample + + $(INSTALL) -m 644 aliases.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/aliases.5 + $(INSTALL) -m 644 forward.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/forward.5 diff --git a/mail/opensmtpd-devel/files/patch-smtpd_backends_table__mysql.c b/mail/opensmtpd-devel/files/patch-smtpd_backends_table__mysql.c new file mode 100644 index 000000000000..58c253dbbe7f --- /dev/null +++ b/mail/opensmtpd-devel/files/patch-smtpd_backends_table__mysql.c @@ -0,0 +1,13 @@ + +$FreeBSD$ + +--- smtpd/backends/table_mysql.c.orig ++++ smtpd/backends/table_mysql.c +@@ -22,6 +22,7 @@ + + #include + #include ++#include + #include + #include + #include diff --git a/mail/opensmtpd-devel/files/patch-smtpd_backends_table__postgres.c b/mail/opensmtpd-devel/files/patch-smtpd_backends_table__postgres.c new file mode 100644 index 000000000000..83802263c28e --- /dev/null +++ b/mail/opensmtpd-devel/files/patch-smtpd_backends_table__postgres.c @@ -0,0 +1,20 @@ + +$FreeBSD$ + +--- smtpd/backends/table_postgres.c.orig ++++ smtpd/backends/table_postgres.c +@@ -22,12 +22,13 @@ + + #include + #include ++#include + #include + #include + #include + #include + +-#include ++#include + + #include "smtpd-defines.h" + #include "smtpd-api.h" diff --git a/mail/opensmtpd-devel/files/patch-smtpd_backends_table__sqlite.c b/mail/opensmtpd-devel/files/patch-smtpd_backends_table__sqlite.c new file mode 100644 index 000000000000..24a2ec4c3c62 --- /dev/null +++ b/mail/opensmtpd-devel/files/patch-smtpd_backends_table__sqlite.c @@ -0,0 +1,13 @@ + +$FreeBSD$ + +--- smtpd/backends/table_sqlite.c.orig ++++ smtpd/backends/table_sqlite.c +@@ -22,6 +22,7 @@ + + #include + #include ++#include + #include + #include + #include diff --git a/mail/opensmtpd-devel/files/pkg-deinstall.in b/mail/opensmtpd-devel/files/pkg-deinstall.in new file mode 100644 index 000000000000..3c939c99eee1 --- /dev/null +++ b/mail/opensmtpd-devel/files/pkg-deinstall.in @@ -0,0 +1,14 @@ +#!/bin/sh + +PKGNAME=$1 +TARGET=$2 + +PREFIX=$(echo %%PREFIX%% |sed -e 's,/,\\/,g') + +if [ "$TARGET" = POST-DEINSTALL ]; then + sed -e '/[[:space:]]'$PREFIX'\/sbin\/smtpctl/d' \ + -e '/[[:space:]]'$PREFIX'\/libexec\/opensmtpd\/makemap/d' \ + -e 's/^### smtpd: //g' -i '' /etc/mail/mailer.conf +fi + +exit 0 diff --git a/mail/opensmtpd-devel/files/pkg-install.in b/mail/opensmtpd-devel/files/pkg-install.in new file mode 100644 index 000000000000..899ad234742e --- /dev/null +++ b/mail/opensmtpd-devel/files/pkg-install.in @@ -0,0 +1,17 @@ +#!/bin/sh + +PKGNAME=$1 +TARGET=$2 + +if [ "$TARGET" = POST-INSTALL ]; then + sed -e '/^[^#]/s/^/### smtpd: /g' -i '' /etc/mail/mailer.conf + cat >>/etc/mail/mailer.conf <