aboutsummaryrefslogtreecommitdiff
path: root/databases/postgresql-relay
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2004-12-13 05:49:53 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2004-12-13 05:49:53 +0000
commit7d07c8704fd8daad197cf71d429452ae568855e6 (patch)
tree5f3e60bdaa1b348ffcbae646cd13c7d46d9ceb01 /databases/postgresql-relay
parentf61fab745f073c8f475b7be0c1fe0a099dec1b95 (diff)
downloadports-7d07c8704fd8daad197cf71d429452ae568855e6.tar.gz
ports-7d07c8704fd8daad197cf71d429452ae568855e6.zip
Notes
Diffstat (limited to 'databases/postgresql-relay')
-rw-r--r--databases/postgresql-relay/Makefile21
-rw-r--r--databases/postgresql-relay/distinfo4
-rw-r--r--databases/postgresql-relay/files/postgresql-relay.sh32
3 files changed, 52 insertions, 5 deletions
diff --git a/databases/postgresql-relay/Makefile b/databases/postgresql-relay/Makefile
index 0362efd2b50d..f80b12b01952 100644
--- a/databases/postgresql-relay/Makefile
+++ b/databases/postgresql-relay/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= postgresql-relay
-PORTVERSION= 1.3
+PORTVERSION= 1.3.1
CATEGORIES= databases net
MASTER_SITES= http://www.mavetju.org/download/
@@ -14,11 +14,26 @@ MAINTAINER= edwin@mavetju.org
COMMENT= Multiplex multiple PostgreSQL databases to one relay
MAN8= postgresql-relay.8
-PLIST_FILES= bin/postgresql-relay etc/postgresql-relay.conf-sample
+PLIST_FILES= bin/postgresql-relay \
+ etc/postgresql-relay.conf-sample \
+ etc/rc.d/postgresql-relay.sh
+
+USE_REINPLACE= yes
+USE_RC_SUBR= yes
+
+post-extract:
+ ${CP} ${FILESDIR}/postgresql-relay.sh ${WRKDIR}
+
+post-patch:
+ ${REINPLACE_CMD} \
+ -e 's,%%PREFIX%%,${PREFIX},g' \
+ -e 's,%%RC_SUBR%%,${RC_SUBR},g' \
+ ${WRKDIR}/postgresql-relay.sh
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/postgresql-relay ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/postgresql-relay.conf ${PREFIX}/etc/postgresql-relay.conf-sample
+ ${INSTALL_DATA} ${WRKSRC}/postgresql-relay.conf-sample ${PREFIX}/etc/postgresql-relay.conf-sample
${INSTALL_MAN} ${WRKSRC}/postgresql-relay.8 ${MAN8PREFIX}/man/man8
+ ${INSTALL_SCRIPT} ${WRKDIR}/postgresql-relay.sh ${PREFIX}/etc/rc.d
.include <bsd.port.mk>
diff --git a/databases/postgresql-relay/distinfo b/databases/postgresql-relay/distinfo
index ca398198dd5d..0dc76351ea9f 100644
--- a/databases/postgresql-relay/distinfo
+++ b/databases/postgresql-relay/distinfo
@@ -1,2 +1,2 @@
-MD5 (postgresql-relay-1.3.tar.gz) = edc9935185004046a4275fcf28f04f04
-SIZE (postgresql-relay-1.3.tar.gz) = 9930
+MD5 (postgresql-relay-1.3.1.tar.gz) = 054fa0a0303d987e8da9ecbba7ff5175
+SIZE (postgresql-relay-1.3.1.tar.gz) = 7121
diff --git a/databases/postgresql-relay/files/postgresql-relay.sh b/databases/postgresql-relay/files/postgresql-relay.sh
new file mode 100644
index 000000000000..2a0ce105e9a4
--- /dev/null
+++ b/databases/postgresql-relay/files/postgresql-relay.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: postgresql-relay
+# REQUIRE: LOGIN
+# AFTER: postgresql
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable spamd:
+#
+#postgresqlrelay_enable="YES"
+#
+# See postgresql-relay(8) for flags
+#
+
+. %%RC_SUBR%%
+
+name=postgresqlrelay
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/bin/postgresql-relay
+required_files=%%PREFIX%%/etc/postgresql-relay.conf
+
+# set defaults
+
+postgresqlrelay_enable=${postgresqlrelay_enable:-"NO"}
+
+load_rc_config $name
+run_rc_command "$1"