aboutsummaryrefslogtreecommitdiff
path: root/mail/archiveopteryx
diff options
context:
space:
mode:
authorAshish SHUKLA <ashish@FreeBSD.org>2010-10-03 13:24:47 +0000
committerAshish SHUKLA <ashish@FreeBSD.org>2010-10-03 13:24:47 +0000
commit70497625fb415a8ad414961e5044c2ba5f0bf112 (patch)
tree6f15bd269032339690d7df7e73e827c8e227d178 /mail/archiveopteryx
parent5efb08f45b39684c8d30d23ef654e4e5ff817318 (diff)
downloadports-70497625fb415a8ad414961e5044c2ba5f0bf112.tar.gz
ports-70497625fb415a8ad414961e5044c2ba5f0bf112.zip
Archiveopteryx is an Internet mail server, optimised to support
long-term archival storage. It seeks to make it practical not only to manage large archives, but to use the information therein on a daily basis instead of relegating it to offline storage. WWW: http://www.archiveopteryx.org/ Approved by: pgj (mentor)
Notes
Notes: svn path=/head/; revision=262347
Diffstat (limited to 'mail/archiveopteryx')
-rw-r--r--mail/archiveopteryx/Makefile57
-rw-r--r--mail/archiveopteryx/distinfo3
-rw-r--r--mail/archiveopteryx/files/archiveopteryx.in60
-rw-r--r--mail/archiveopteryx/files/patch-Jamfile46
-rw-r--r--mail/archiveopteryx/files/patch-Jamsettings58
-rw-r--r--mail/archiveopteryx/files/patch-installer_Jamfile14
-rw-r--r--mail/archiveopteryx/files/patch-schema_Jamfile14
-rw-r--r--mail/archiveopteryx/files/patch-scripts_Jamfile14
-rw-r--r--mail/archiveopteryx/files/pkg-message.in23
-rw-r--r--mail/archiveopteryx/pkg-deinstall20
-rw-r--r--mail/archiveopteryx/pkg-descr6
-rw-r--r--mail/archiveopteryx/pkg-install28
-rw-r--r--mail/archiveopteryx/pkg-plist22
13 files changed, 365 insertions, 0 deletions
diff --git a/mail/archiveopteryx/Makefile b/mail/archiveopteryx/Makefile
new file mode 100644
index 000000000000..e1276c68fde2
--- /dev/null
+++ b/mail/archiveopteryx/Makefile
@@ -0,0 +1,57 @@
+# New ports collection makefile for: archiveopteryx
+# Date created: 2010-09-15
+# Whom: Ashish SHUKLA <ashish@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= archiveopteryx
+PORTVERSION= 3.1.3
+CATEGORIES= mail
+MASTER_SITES= http://archiveopteryx.org/%SUBDIR%/
+MASTER_SITE_SUBDIR= download
+
+MAINTAINER= ashish@FreeBSD.org
+COMMENT= An advanced PostgreSQL-based IMAP/POP server
+
+BUILD_DEPENDS= jam:${PORTSDIR}/devel/jam
+
+USE_BZIP2= yes
+USE_PERL5_BUILD= 5.8+
+
+LICENSE= BSD
+LICENSE_FILE= ${WRKSRC}/bsd.txt
+
+MAKE_JOBS_SAFE= yes
+
+MAN5= aoxsuper.conf.5 archiveopteryx.conf.5
+MAN8= aox.8 aoximport.8 archiveopteryx.8 deliver.8 installer.8 logd.8 \
+ recorder.8 tlsproxy.8
+
+SUB_FILES= pkg-message
+
+USE_RC_SUBR= ${PORTNAME}
+
+USERS= aox
+GROUPS= aox
+
+JAM?= ${LOCALBASE}/bin/jam
+
+post-patch:
+ @${GREP} -Rl '%%[[:alpha:]]\+%%' ${WRKSRC} |${XARGS} ${REINPLACE_CMD} \
+ -e 's,%%PREFIX%%,${PREFIX},g'
+
+do-build:
+ @cd ${WRKSRC} && ${JAM} -j${MAKE_JOBS_NUMBER}
+
+do-install:
+ @cd ${WRKSRC} && ${JAM} install
+
+post-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${CAT} ${PKGMESSAGE}
+
+post-deinstall:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDEINSTALL} ${PKGNAME} POST-DEINSTALL
+
+.include <bsd.port.mk>
diff --git a/mail/archiveopteryx/distinfo b/mail/archiveopteryx/distinfo
new file mode 100644
index 000000000000..2e76643c69f5
--- /dev/null
+++ b/mail/archiveopteryx/distinfo
@@ -0,0 +1,3 @@
+MD5 (archiveopteryx-3.1.3.tar.bz2) = 876e334409d8e562da71b180f9c34129
+SHA256 (archiveopteryx-3.1.3.tar.bz2) = b93a918aaa36fa9371c88aa9535187bb4796eb15d5e6b10aca6e42701a3c3c89
+SIZE (archiveopteryx-3.1.3.tar.bz2) = 2593628
diff --git a/mail/archiveopteryx/files/archiveopteryx.in b/mail/archiveopteryx/files/archiveopteryx.in
new file mode 100644
index 000000000000..c65a3349812e
--- /dev/null
+++ b/mail/archiveopteryx/files/archiveopteryx.in
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: archiveopteryx
+# REQUIRE: login
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# archiveopteryx_enable (bool): Set to NO by default.
+# Set it to YES to enable archiveopteryx.
+#
+
+. /etc/rc.subr
+
+name="archiveopteryx"
+rcvar=`set_rcvar`
+
+archiveopteryx_enable=${archiveopteryx_enable:-"NO"}
+pidfile=/var/run/${name}.pid
+config_file=%%PREFIX%%/etc/archiveopteryx/archiveopteryx.conf
+required_files=$config_file
+
+command=%%PREFIX%%/bin/aox
+extra_commands="status"
+status_cmd="do_status"
+start_cmd="do_start"
+stop_cmd="do_stop"
+restart_cmd="do_restart"
+
+do_start()
+{
+ echo -n "Starting Archiveopteryx: "
+ ${command} start
+ echo "done."
+}
+
+do_stop()
+{
+ echo -n "Stopping Archiveopteryx: "
+ ${command} stop
+ echo "done."
+}
+
+do_restart()
+{
+ echo -n "Restarting Archiveopteryx: "
+ ${command} restart
+ echo "done."
+}
+
+do_status()
+{
+ ${command} show status
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/mail/archiveopteryx/files/patch-Jamfile b/mail/archiveopteryx/files/patch-Jamfile
new file mode 100644
index 000000000000..5dadfb96a5e0
--- /dev/null
+++ b/mail/archiveopteryx/files/patch-Jamfile
@@ -0,0 +1,46 @@
+
+$FreeBSD$
+
+--- Jamfile.orig
++++ Jamfile
+@@ -50,9 +50,9 @@
+ }
+
+
+-Prepare $(INSTALLROOT)$(JAILDIR) ;
+-Prepare $(INSTALLROOT)$(MESSAGEDIR) ;
+-Prepare $(INSTALLROOT)$(PIDFILEDIR) ;
++# Prepare $(INSTALLROOT)$(JAILDIR) ;
++# Prepare $(INSTALLROOT)$(MESSAGEDIR) ;
++# Prepare $(INSTALLROOT)$(PIDFILEDIR) ;
+ Prepare $(INSTALLROOT)$(CONFIGDIR) ;
+ Prepare $(INSTALLROOT)$(LIBDIR)/contrib ;
+ if ( $(LOGFILE:D) != "" && $(LOGFILE:D) != "syslog" ) {
+@@ -64,14 +64,14 @@
+
+
+ # if we make JAILDIR, we should chmod it so noone can read it:
+-MODE on $(INSTALLROOT)$(JAILDIR) = 700 ;
+-Chmod $(INSTALLROOT)$(JAILDIR) ;
++# MODE on $(INSTALLROOT)$(JAILDIR) = 700 ;
++# Chmod $(INSTALLROOT)$(JAILDIR) ;
+
+ # if we make MESSAGEDIR, we should chmod it similarly. AOXUSER needs to
+ # be able to write to it, but we can't chown here, because the user may
+ # not exist yet.
+-MODE on $(INSTALLROOT)$(MESSAGEDIR) = 700 ;
+-Chmod $(INSTALLROOT)$(MESSAGEDIR) ;
++# MODE on $(INSTALLROOT)$(MESSAGEDIR) = 700 ;
++# Chmod $(INSTALLROOT)$(MESSAGEDIR) ;
+
+
+ actions Message {
+@@ -95,7 +95,7 @@
+ EOM
+ }
+
+-Message install ;
++# Message install ;
+
+
+ if $(BUILDDOC) {
diff --git a/mail/archiveopteryx/files/patch-Jamsettings b/mail/archiveopteryx/files/patch-Jamsettings
new file mode 100644
index 000000000000..19f2cb48471c
--- /dev/null
+++ b/mail/archiveopteryx/files/patch-Jamsettings
@@ -0,0 +1,58 @@
+
+$FreeBSD$
+
+--- Jamsettings.orig
++++ Jamsettings
+@@ -12,7 +12,7 @@
+
+ # A convenient prefix used by most directory and file names,.
+ #
+-PREFIX ?= /usr/local/archiveopteryx ;
++PREFIX ?= %%PREFIX%% ;
+
+ # The directory for user and sysadmin tools
+ #
+@@ -28,32 +28,36 @@
+
+ # Supporting files
+ #
+-LIBDIR = $(PREFIX)/lib ;
++LIBDIR = $(PREFIX)/libexec/aox ;
++
++# Supporting files
++#
++LIBDATADIR = $(PREFIX)/libdata/aox ;
+
+ # The startup/shutdown script's directory
+ #
+-INITDIR = $(LIBDIR) ;
++INITDIR = $(PREFIX)/etc/rc.d ;
+
+ # Where to write pid files for the servers
+ #
+-PIDFILEDIR ?= $(PREFIX)/lib/pidfiles ;
++PIDFILEDIR ?= /var/run/aox ;
+
+ # The servers chroot to an empty, unreadable jail directory at
+ # startup.
+ #
+-JAILDIR = $(PREFIX)/jail ;
++JAILDIR = /var/db/aox/jail ;
+
+ # This is the default message-copy-directory.
+ #
+-MESSAGEDIR = $(PREFIX)/messages ;
++MESSAGEDIR = /var/db/aox/messages ;
+
+ # The directory where the configuration file is located.
+ #
+-CONFIGDIR = $(PREFIX) ;
++CONFIGDIR = $(PREFIX)/etc/archiveopteryx ;
+
+ # The directory where the README and other files are installed.
+ #
+-READMEDIR = $(PREFIX) ;
++READMEDIR = $(PREFIX)/share/doc/archiveopteryx ;
+
+ # The log file's default name. (This can be a file name or syslog/x,
+ # where x is a facility.)
diff --git a/mail/archiveopteryx/files/patch-installer_Jamfile b/mail/archiveopteryx/files/patch-installer_Jamfile
new file mode 100644
index 000000000000..4fa8d1a8bb37
--- /dev/null
+++ b/mail/archiveopteryx/files/patch-installer_Jamfile
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- installer/Jamfile.orig
++++ installer/Jamfile
+@@ -5,7 +5,7 @@
+ Build installer : installer.cpp ;
+
+ ObjectDefines installer.cpp :
+- LIBDIR='\"$(LIBDIR)\"'
++ LIBDIR='\"$(LIBDATADIR)\"'
+ CONFIGDIR='\"$(CONFIGDIR)\"'
+ LOGFILE='\"$(LOGFILE)\"'
+ LOGFILEMODE='\"$(LOGFILEMODE)\"'
diff --git a/mail/archiveopteryx/files/patch-schema_Jamfile b/mail/archiveopteryx/files/patch-schema_Jamfile
new file mode 100644
index 000000000000..b5fb640c2a56
--- /dev/null
+++ b/mail/archiveopteryx/files/patch-schema_Jamfile
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- schema/Jamfile.orig
++++ schema/Jamfile
+@@ -9,7 +9,7 @@
+ SEARCH on $(<) = $(SEARCH_SOURCE) ;
+ EngraveConfig $(e) : $(<) ;
+
+- InstallFile $(INSTALLROOT)$(LIBDIR) : $(e) ;
++ InstallFile $(INSTALLROOT)$(LIBDATADIR) : $(e) ;
+ }
+
+ SchemaFile schema.pg ;
diff --git a/mail/archiveopteryx/files/patch-scripts_Jamfile b/mail/archiveopteryx/files/patch-scripts_Jamfile
new file mode 100644
index 000000000000..bdf3adf05fd8
--- /dev/null
+++ b/mail/archiveopteryx/files/patch-scripts_Jamfile
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- scripts/Jamfile.orig
++++ scripts/Jamfile
+@@ -15,7 +15,7 @@
+ }
+
+
+-ShellScript archiveopteryx ;
++# ShellScript archiveopteryx ;
+
+
+ rule ContribScript {
diff --git a/mail/archiveopteryx/files/pkg-message.in b/mail/archiveopteryx/files/pkg-message.in
new file mode 100644
index 000000000000..e2b9cb6a8dcc
--- /dev/null
+++ b/mail/archiveopteryx/files/pkg-message.in
@@ -0,0 +1,23 @@
+********************************************************************************
+
+Please install PostgreSQL client/server (databases/postgresqlXX-client
+and databases/postgresqlXX-server) separately. The latest 8.x version
+is recommended but any version newer than 8.1.0 should work.
+
+To set up the database and generate a configuration file, run
+%%PREFIX%%/libexec/aox/installer as root. The new configuration file will be in
+%%ETCDIR%%/archiveopteryx.conf.
+
+%%PREFIX%%/libexec/aox/installer -n shows what it would do, without making any
+changes. (If you are just upgrading from an older version,
+%%PREFIX%%/bin/aox upgrade schema may be enough.
+%%PREFIX%%/bin/aox upgrade schema -n shows what it would do, without making
+any changes.)
+
+The logfile is syslog/mail by default.
+
+If you have any problems, the FAQ is at
+http://www.archiveopteryx.org/faq/ and you can always ask
+info@aox.org for help.
+
+********************************************************************************
diff --git a/mail/archiveopteryx/pkg-deinstall b/mail/archiveopteryx/pkg-deinstall
new file mode 100644
index 000000000000..aca504aa7d9f
--- /dev/null
+++ b/mail/archiveopteryx/pkg-deinstall
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+PKGNAME=$1
+TARGET=$2
+
+RMDIR=/bin/rmdir
+
+if [ $# -ne 2 ]; then
+ echo "Usage: $0 [PKGNAME] [DEINSTALL | POST-DEINSTALL]"
+ exit 1
+fi
+
+if [ "$TARGET" = POST-DEINSTALL ]; then
+ for i in /var/db/aox/jail /var/db/aox/messages /var/run/aox; do
+ ${RMDIR} ${i} 2>/dev/null
+ done
+ ${RMDIR} /var/db/aox 2>/dev/null
+fi
+
+exit 0
diff --git a/mail/archiveopteryx/pkg-descr b/mail/archiveopteryx/pkg-descr
new file mode 100644
index 000000000000..0ec33166e59b
--- /dev/null
+++ b/mail/archiveopteryx/pkg-descr
@@ -0,0 +1,6 @@
+Archiveopteryx is an Internet mail server, optimised to support
+long-term archival storage. It seeks to make it practical not only to
+manage large archives, but to use the information therein on a daily
+basis instead of relegating it to offline storage.
+
+WWW: http://www.archiveopteryx.org/
diff --git a/mail/archiveopteryx/pkg-install b/mail/archiveopteryx/pkg-install
new file mode 100644
index 000000000000..06fc7523da29
--- /dev/null
+++ b/mail/archiveopteryx/pkg-install
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+PKGNAME=$1
+TARGET=$2
+
+MKDIR=/bin/mkdir
+CHOWN=/usr/sbin/chown
+CHMOD=/bin/chmod
+
+AOXGROUP=aox
+AOXUSER=aox
+
+if [ $# -ne 2 ]; then
+ echo "Usage: $0 [PKGNAME] [PRE-INSTALL | POST-INSTALL]"
+ exit 1
+fi
+
+if [ "$TARGET" = POST-INSTALL ]; then
+ for i in /var/db/aox/jail /var/db/aox/messages; do
+ ${MKDIR} -m 700 -p ${i}
+ ${CHOWN} ${AOXUSER}:${AOXGROUP} ${i}
+ done
+ ${CHMOD} 700 /var/db/aox
+ ${MKDIR} /var/run/aox
+ ${CHOWN} ${AOXUSER}:${AOXGROUP} /var/db/aox /var/run/aox
+fi
+
+exit 0
diff --git a/mail/archiveopteryx/pkg-plist b/mail/archiveopteryx/pkg-plist
new file mode 100644
index 000000000000..ce9fbd4748d6
--- /dev/null
+++ b/mail/archiveopteryx/pkg-plist
@@ -0,0 +1,22 @@
+bin/aox
+bin/aoxexport
+bin/aoximport
+bin/deliver
+libdata/aox/downgrades
+libdata/aox/field-names
+libdata/aox/flag-names
+libdata/aox/fts.pg
+libdata/aox/schema.pg
+libexec/aox/contrib/rrdglue
+libexec/aox/installer
+sbin/archiveopteryx
+sbin/logd
+sbin/recorder
+%%DOCSDIR%%/COPYING
+%%DOCSDIR%%/README
+%%DOCSDIR%%/bsd.txt
+@dirrm libexec/aox/contrib
+@dirrm libexec/aox
+@dirrm libdata/aox
+@dirrm %%ETCDIR%%
+@dirrm %%DOCSDIR%%