aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Audeoud <jadawin@FreeBSD.org>2008-03-18 13:13:06 +0000
committerPhilippe Audeoud <jadawin@FreeBSD.org>2008-03-18 13:13:06 +0000
commita27e6768fb54dacb4e8a6a792b7d9fdbde650cc4 (patch)
tree2299c499bdfbcbf1be60cf70785eadc14c167af5
parent16efa287889c52d9beaea8d5445fe993f9222963 (diff)
downloadports-a27e6768fb54dacb4e8a6a792b7d9fdbde650cc4.tar.gz
ports-a27e6768fb54dacb4e8a6a792b7d9fdbde650cc4.zip
Notes
-rw-r--r--mail/Makefile1
-rw-r--r--mail/sgwi/Makefile64
-rw-r--r--mail/sgwi/distinfo3
-rw-r--r--mail/sgwi/files/patch-.htaccess11
-rw-r--r--mail/sgwi/files/patch-.htpasswd4
-rw-r--r--mail/sgwi/files/patch-copyright.php8
-rw-r--r--mail/sgwi/files/pkg-message.in24
-rw-r--r--mail/sgwi/pkg-descr5
-rw-r--r--mail/sgwi/pkg-plist28
9 files changed, 148 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index 4eb5b7528d02..066d738cf14c 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -552,6 +552,7 @@
SUBDIR += sendok
SUBDIR += sentinel
SUBDIR += serialmail
+ SUBDIR += sgwi
SUBDIR += sid-milter
SUBDIR += sigit
SUBDIR += sigrot
diff --git a/mail/sgwi/Makefile b/mail/sgwi/Makefile
new file mode 100644
index 000000000000..4fd205e4b49a
--- /dev/null
+++ b/mail/sgwi/Makefile
@@ -0,0 +1,64 @@
+# New ports collection makefile for: sgwi
+# Date created: 11 March 2008
+# Whom: Lukasz Wasikowski <lukasz@wasikowski.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= sgwi
+PORTVERSION= 0.7
+CATEGORIES= mail www
+MASTER_SITES= http://www.vanheusden.com/sgwi/
+DISTNAME= sqlgreywebinterface-${PORTVERSION}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= lukasz@wasikowski.net
+COMMENT= PHP web interface to SQLGrey
+
+NO_BUILD= yes
+SUB_FILES+= pkg-message
+
+OPTIONS= MYSQL "MySQL back-end (use mysql PHP extension)" on
+OPTIONS+= PGSQL "PostgreSQL back-end (use pgsql PHP extension)" off
+
+.if !defined(WITHOUT_MYSQL)
+USE_PHP+= mysql
+.endif
+
+.if defined(WITH_PGSQL)
+USE_PHP+= pgsql
+.endif
+
+.if defined(WITHOUT_MYSQL) && !defined(WITH_PGSQL)
+IGNORE= needs at least one database back-end
+.endif
+
+post-patch:
+ ${FIND} ${WRKSRC} -name '*.orig' -delete
+
+do-install:
+ @[ ! -f ${WRKSRC}/.htpasswd ] || ${MV} ${WRKSRC}/.htpasswd ${WRKSRC}/.htpasswd.dist
+ @[ ! -f ${WRKSRC}/.htaccess ] || ${MV} ${WRKSRC}/.htaccess ${WRKSRC}/.htaccess.dist
+ @[ ! -f ${WRKSRC}/config.inc.php ] || ${MV} ${WRKSRC}/config.inc.php ${WRKSRC}/config.inc.php.dist
+ @${MKDIR} ${PREFIX}/www/sgwi
+ @${INSTALL_DATA} ${WRKSRC}/*.php ${PREFIX}/www/sgwi
+ @${INSTALL_DATA} ${WRKSRC}/*.txt ${PREFIX}/www/sgwi
+ @${INSTALL_DATA} ${WRKSRC}/*.dist ${PREFIX}/www/sgwi
+ @${INSTALL_DATA} ${WRKSRC}/.ht* ${PREFIX}/www/sgwi
+ @[ -f ${PREFIX}/www/sgwi/config.inc.php ] || \
+ ${CP} ${PREFIX}/www/sgwi/config.inc.php.dist \
+ ${PREFIX}/www/sgwi/config.inc.php
+ @[ -f ${PREFIX}/www/sgwi/.htpasswd ] || \
+ ${CP} ${PREFIX}/www/sgwi/.htpasswd.dist \
+ ${PREFIX}/www/sgwi/.htpasswd
+ @[ -f ${PREFIX}/www/sgwi/.htaccess ] || \
+ ${CP} ${PREFIX}/www/sgwi/.htaccess.dist \
+ ${PREFIX}/www/sgwi/.htaccess
+
+post-install:
+ @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/www/sgwi
+ @${CHOWN} root ${PREFIX}/www/sgwi/.ht* ${PREFIX}/www/sgwi/config.inc.php*
+ @${CHMOD} 640 ${PREFIX}/www/sgwi/*.php ${PREFIX}/www/sgwi/*.txt ${PREFIX}/www/sgwi/.ht* ${PREFIX}/www/sgwi/*.dist
+ ${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/mail/sgwi/distinfo b/mail/sgwi/distinfo
new file mode 100644
index 000000000000..b548506cd4c7
--- /dev/null
+++ b/mail/sgwi/distinfo
@@ -0,0 +1,3 @@
+MD5 (sqlgreywebinterface-0.7.tgz) = e7d5cc531651f8a2703ea8490c3f6ae4
+SHA256 (sqlgreywebinterface-0.7.tgz) = b9b664ce5f9b194aa7431350b6dc31485f1753e55ac6ef8614c2b7f25dc82ccf
+SIZE (sqlgreywebinterface-0.7.tgz) = 5023
diff --git a/mail/sgwi/files/patch-.htaccess b/mail/sgwi/files/patch-.htaccess
new file mode 100644
index 000000000000..49624e3cb58e
--- /dev/null
+++ b/mail/sgwi/files/patch-.htaccess
@@ -0,0 +1,11 @@
+--- /dev/null 2008-03-11 22:05:01.000000000 +0100
++++ .htaccess 2008-03-11 22:03:36.000000000 +0100
+@@ -0,0 +1,8 @@
++AuthUserFile /usr/local/www/sgwi/.htpasswd
++AuthGroupFile /dev/null
++AuthName "sgwi Admin"
++AuthType Basic
++
++<limit GET POST>
++require valid-user
++</limit>
diff --git a/mail/sgwi/files/patch-.htpasswd b/mail/sgwi/files/patch-.htpasswd
new file mode 100644
index 000000000000..e07a41da5c40
--- /dev/null
+++ b/mail/sgwi/files/patch-.htpasswd
@@ -0,0 +1,4 @@
+--- /dev/null 2008-03-11 22:05:01.000000000 +0100
++++ .htpasswd 2008-03-11 22:02:21.000000000 +0100
+@@ -0,0 +1 @@
++admin:1Cm2R1zl5.LII
diff --git a/mail/sgwi/files/patch-copyright.php b/mail/sgwi/files/patch-copyright.php
new file mode 100644
index 000000000000..9d047c86d067
--- /dev/null
+++ b/mail/sgwi/files/patch-copyright.php
@@ -0,0 +1,8 @@
+--- copyright.inc.php.orig 2008-03-11 22:23:21.000000000 +0100
++++ copyright.inc.php 2008-03-11 22:23:33.000000000 +0100
+@@ -1,4 +1,4 @@
+ <TR HEIGHT=64><TD>
+ <HR>
+-<FONT SIZE=-1><A HREF="http://www.vanheusden.com/sgwi/" TARGET="_new">SQLGrey webinterface v0.6</A> by <A HREF="http://www.vanheusden.com/feedbackform.php?subject=SQLGrey%20webinterface" TARGET="_new">folkert@vanheusden.com</A>
++<FONT SIZE=-1><A HREF="http://www.vanheusden.com/sgwi/" TARGET="_new">SQLGrey webinterface v0.7</A> by <A HREF="http://www.vanheusden.com/feedbackform.php?subject=SQLGrey%20webinterface" TARGET="_new">folkert@vanheusden.com</A>
+ </TD></TR>
diff --git a/mail/sgwi/files/pkg-message.in b/mail/sgwi/files/pkg-message.in
new file mode 100644
index 000000000000..fccdd2725731
--- /dev/null
+++ b/mail/sgwi/files/pkg-message.in
@@ -0,0 +1,24 @@
+
+1. Configure sgwi
+-----------------
+Edit the %%PREFIX%%/www/sgwi/config.inc.php file to reflect your
+setup.
+
+The default password for sgwi is admin/admin. It's specified in
+the .htpasswd file in %%PREFIX%%/www/sgwi/ directory. Change it
+with:
+
+htpasswd %%PREFIX%%/www/sgwi/.htpasswd admin
+
+Also make sure that the location of the .htpasswd file specified
+in .htaccess file matches your path.
+
+2. Configure Apache
+-------------------
+Add a line in your httpd.conf to allow the use of .htaccess file.
+
+<Directory "%%PREFIX%%/www/sgwi">
+ Options Indexes
+ AllowOverride AuthConfig
+</Directory>
+
diff --git a/mail/sgwi/pkg-descr b/mail/sgwi/pkg-descr
new file mode 100644
index 000000000000..18d651931a1e
--- /dev/null
+++ b/mail/sgwi/pkg-descr
@@ -0,0 +1,5 @@
+sgwi is a web interface to SQLGrey written in PHP.
+It allows you to edit the white- and blacklists as
+well as the current state of the greylist.
+
+WWW: http://www.vanheusden.com/sgwi/
diff --git a/mail/sgwi/pkg-plist b/mail/sgwi/pkg-plist
new file mode 100644
index 000000000000..11f17b547853
--- /dev/null
+++ b/mail/sgwi/pkg-plist
@@ -0,0 +1,28 @@
+@unexec if cmp -s %D/www/sgwi/.htaccess %D/www/sgwi/.htaccess.dist; then rm -f %D/www/sgwi/.htaccess; fi
+www/sgwi/.htaccess.dist
+@exec [ -f %B/.htaccess ] || cp %B/%f %B/.htaccess
+@unexec if cmp -s %D/www/sgwi/.htpasswd %D/www/sgwi/.htpasswd.dist; then rm -f %D/www/sgwi/.htpasswd; fi
+www/sgwi/.htpasswd.dist
+@exec [ -f %B/.htpasswd ] || cp %B/%f %B/.htpasswd
+www/sgwi/awl.php
+www/sgwi/awl_add.php
+www/sgwi/awl_delete.php
+www/sgwi/awl_delete_undef.php
+@unexec if cmp -s %D/www/sgwi/config.inc.php %D/www/sgwi/config.inc.php.dist; then rm -f %D/www/sgwi/config.inc.php; fi
+www/sgwi/config.inc.php.dist
+@exec [ -f %B/config.inc.php ] || cp %B/%f %B/config.inc.php
+www/sgwi/connect.php
+www/sgwi/connect_delete.php
+www/sgwi/connect_purge.php
+www/sgwi/connect_whitelist.php
+www/sgwi/copyright.inc.php
+www/sgwi/db.inc.php
+www/sgwi/index.php
+www/sgwi/license.txt
+www/sgwi/opt_in_out.php
+www/sgwi/opt_in_out_add.php
+www/sgwi/opt_in_out_delete.php
+www/sgwi/opt_in_out_helpers.inc.php
+www/sgwi/readme.txt
+www/sgwi/tools.inc.php
+@dirrm www/sgwi