aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/boxbackup-devel/Makefile119
-rw-r--r--sysutils/boxbackup-devel/distinfo2
-rw-r--r--sysutils/boxbackup-devel/files/bbackupd.sh26
-rw-r--r--sysutils/boxbackup-devel/files/bbstored.sh26
-rw-r--r--sysutils/boxbackup-devel/files/patch-infrastrcture-BoxPlatform.pm11
-rw-r--r--sysutils/boxbackup-devel/files/patch-lib-common-BoxPortsAndFiles.h22
-rw-r--r--sysutils/boxbackup-devel/files/pkg-message.client4
-rw-r--r--sysutils/boxbackup-devel/files/pkg-message.server4
-rw-r--r--sysutils/boxbackup-devel/pkg-descr13
-rw-r--r--sysutils/boxbackup-devel/pkg-install36
-rw-r--r--sysutils/boxbackup-devel/pkg-message5
-rw-r--r--sysutils/boxbackup-devel/pkg-plist14
-rw-r--r--sysutils/boxbackup/Makefile119
-rw-r--r--sysutils/boxbackup/distinfo2
-rw-r--r--sysutils/boxbackup/files/bbackupd.sh26
-rw-r--r--sysutils/boxbackup/files/bbstored.sh26
-rw-r--r--sysutils/boxbackup/files/patch-infrastrcture-BoxPlatform.pm11
-rw-r--r--sysutils/boxbackup/files/patch-lib-common-BoxPortsAndFiles.h22
-rw-r--r--sysutils/boxbackup/files/pkg-message.client4
-rw-r--r--sysutils/boxbackup/files/pkg-message.server4
-rw-r--r--sysutils/boxbackup/pkg-descr13
-rw-r--r--sysutils/boxbackup/pkg-install36
-rw-r--r--sysutils/boxbackup/pkg-message5
-rw-r--r--sysutils/boxbackup/pkg-plist14
25 files changed, 565 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index f898184db6e8..bf0f94c78f76 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -38,6 +38,7 @@
SUBDIR += bkpupsd
SUBDIR += bksh
SUBDIR += blimitd
+ SUBDIR += boxbackup
SUBDIR += bpm
SUBDIR += bsdsar
SUBDIR += bubblemon-dockapp
diff --git a/sysutils/boxbackup-devel/Makefile b/sysutils/boxbackup-devel/Makefile
new file mode 100644
index 000000000000..c7b34dc52113
--- /dev/null
+++ b/sysutils/boxbackup-devel/Makefile
@@ -0,0 +1,119 @@
+# vim: ts=4
+# New ports collection makefile for: boxbackup
+# Date created: 19 December 2004
+# Whom: James O'Gorman <james@netinertia.co.uk>
+#
+# $FreeBSD$
+#
+
+PORTNAME= boxbackup
+PORTVERSION= 0.09
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+.if defined(CLIENT_ONLY) && !defined(SERVER_ONLY)
+PKGNAMESUFFIX= -client
+.elif defined(SERVER_ONLY) && !defined(CLIENT_ONLY)
+PKGNAMESUFFIX= -server
+.endif
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= james@netinertia.co.uk
+COMMENT= An open source, completely automatic on-line backup system for UNIX
+
+RUN_DEPENDS= openssl:${PORTSDIR}/security/openssl
+
+HAS_CONFIGURE= yes
+USE_REINPLACE= yes
+USE_RC_SUBR= yes
+
+.if defined(CLIENT_ONLY) && !defined(SERVER_ONLY)
+CONFLICTS= boxbackup-[0-9]* boxbackup-server-[0-9]*
+PLIST_SUB+= CLIENT=""
+PLIST_SUB+= SERVER="@comment "
+ALL_TARGET= parcels/${DISTNAME}-backup-client-FreeBSD.tgz
+INSTALL_TARGET= install-backup-client
+.elif defined(SERVER_ONLY) && !defined(CLIENT_ONLY)
+CONFLICTS= boxbackup-[0-9]* boxbackup-client-[0-9]*
+PLIST_SUB+= SERVER=""
+PLIST_SUB+= CLIENT="@comment "
+ALL_TARGET= parcels/${DISTNAME}-backup-server-FreeBSD.tgz
+INSTALL_TARGET= install-backup-server
+.else
+PLIST_SUB+= CLIENT=""
+PLIST_SUB+= SERVER=""
+INSTALL_TARGET= install-backup-server install-backup-client
+.endif
+
+# These will be used at some point in the future when I get around to
+# automating the final configuration.
+#WITH_BACKUPSTORE?= /var/bbstored
+#WITH_WORKINGDIR?= /var/bbackupd
+#WITH_BACKUPMODE?= lazy
+
+.if ${.CURDIR} == ${MASTERDIR}
+pre-everything::
+ @${ECHO} "${PORTNAME} has the following options:"
+ @${ECHO} ""
+.if !defined(CLIENT_ONLY)
+ @${ECHO} " CLIENT_ONLY Only install client suite"
+.endif
+.if !defined(SERVER_ONLY)
+ @${ECHO} " SERVER_ONLY Only install server suite"
+.endif
+.if !defined(WITH_TESTS)
+ @${ECHO} " WITH_TESTS Allows use of a \"check\" target"
+ @${ECHO} " to run tests"
+.endif
+ @${ECHO} ""
+.if defined(SERVER_ONLY) && defined(CLIENT_ONLY)
+ @${ECHO} "SERVER_ONLY and CLIENT_ONLY are mutually exclusive."
+ @${ECHO} "Please choose one or the other."
+ @exit 1
+.endif
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/infrastructure/BoxPlatform.pm
+ @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/lib/common/BoxPortsAndFiles.h
+ @${SED} -e 's,%%PREFIX%%,${PREFIX},g' <${FILESDIR}/bbstored.sh >\
+ ${WRKSRC}/bbstored.sh
+ @${SED} -e 's,%%PREFIX%%,${PREFIX},g' <${FILESDIR}/bbackupd.sh >\
+ ${WRKSRC}/bbackupd.sh
+ @${RM} -f ${PKGDIR}/pkg-message
+.if defined(CLIENT_ONLY) || !defined(SERVER_ONLY)
+ @${CAT} ${FILESDIR}/pkg-message.client >>${PKGDIR}/pkg-message
+.endif
+.if defined(SERVER_ONLY) || !defined(CLIENT_ONLY)
+ @${CAT} ${FILESDIR}/pkg-message.server >>${PKGDIR}/pkg-message
+.endif
+
+.if defined(SERVER_ONLY) || !defined(CLIENT_ONLY)
+pre-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} \
+ ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+.endif
+
+post-install:
+ @${ECHO_CMD} "===> Installing startup scripts"
+.if defined(CLIENT_ONLY) || !defined(SERVER_ONLY)
+ @${INSTALL_SCRIPT} -m 751 ${WRKSRC}/bbackupd.sh ${PREFIX}/etc/rc.d/bbackupd.sh
+ @${MKDIR} -m 0700 ${PREFIX}/etc/box/bbackupd
+.endif
+.if defined(SERVER_ONLY) || !defined(CLIENT_ONLY)
+ @${INSTALL_SCRIPT} -m 751 ${WRKSRC}/bbstored.sh ${PREFIX}/etc/rc.d/bbstored.sh
+ @${MKDIR} -m 0700 ${PREFIX}/etc/box/bbstored
+.endif
+ @${CAT} ${PKGMESSAGE}
+# At some point we might want to automate final configuration...
+#.if !defined(BATCH) && exists(${PREFIX}/bin/bbackupd-config)
+# @${PREFIX}/bin/bbackupd-config ${PREFIX}/etc/box ${WITH_BACKUPMODE} ${ACCOUNT} ${BACKUP_SERVER} ${WITH_WORKDIR} ${BACKUPDIRS}
+#.endif
+
+.if defined(WITH_TESTS)
+check:
+ @${ECHO_CMD} "===> Running tests"
+ @${MAKE} -C ${WRKSRC} test
+.endif
+
+.include <bsd.port.mk>
diff --git a/sysutils/boxbackup-devel/distinfo b/sysutils/boxbackup-devel/distinfo
new file mode 100644
index 000000000000..9722d3f47e82
--- /dev/null
+++ b/sysutils/boxbackup-devel/distinfo
@@ -0,0 +1,2 @@
+MD5 (boxbackup-0.09.tgz) = b4fced539ed72855383f25609de9e6da
+SIZE (boxbackup-0.09.tgz) = 505088
diff --git a/sysutils/boxbackup-devel/files/bbackupd.sh b/sysutils/boxbackup-devel/files/bbackupd.sh
new file mode 100644
index 000000000000..38ad3fdf2127
--- /dev/null
+++ b/sysutils/boxbackup-devel/files/bbackupd.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+#
+# PROVIDE: bbackupd
+# REQUIRE: NETWORKING
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable bbackupd:
+#
+#bbackupd_enable="YES"
+#
+
+bbackupd_enable=${bbackupd_enable-"NO"}
+bbackupd_flags=${bbackupd_flags-"/usr/local/etc/box/bbackupd.conf"}
+bbackupd_pidfile=${bbackupd_pidfile-"/var/run/bbackupd.pid"}
+
+. /etc/rc.subr
+
+name="bbackupd"
+rcvar=`set_rcvar`
+command="/usr/local/bin/bbackupd"
+extra_commands="reload"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/sysutils/boxbackup-devel/files/bbstored.sh b/sysutils/boxbackup-devel/files/bbstored.sh
new file mode 100644
index 000000000000..8cd64ffa860a
--- /dev/null
+++ b/sysutils/boxbackup-devel/files/bbstored.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+#
+# PROVIDE: bbstored
+# REQUIRE: NETWORKING
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable bbstored:
+#
+#bbstored_enable="YES"
+#
+
+bbstored_enable=${bbstored_enable-"NO"}
+bbstored_flags=${bbstored_flags-"/usr/local/etc/box/bbstored.conf"}
+bbstored_pidfile=${bbstored_pidfile-"/var/run/bbstored.pid"}
+
+. /etc/rc.subr
+
+name="bbstored"
+rcvar=`set_rcvar`
+command="/usr/local/bin/bbstored"
+extra_commands="reload"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/sysutils/boxbackup-devel/files/patch-infrastrcture-BoxPlatform.pm b/sysutils/boxbackup-devel/files/patch-infrastrcture-BoxPlatform.pm
new file mode 100644
index 000000000000..8feda5a2cf96
--- /dev/null
+++ b/sysutils/boxbackup-devel/files/patch-infrastrcture-BoxPlatform.pm
@@ -0,0 +1,11 @@
+--- infrastructure/BoxPlatform.pm.orig Sat Jan 8 13:27:12 2005
++++ infrastructure/BoxPlatform.pm Sat Jan 8 13:27:33 2005
+@@ -78,7 +78,7 @@
+ close VERSION;
+
+ # where to put the files
+- $install_into_dir = '/usr/local/bin';
++ $install_into_dir = '%%PREFIX%%/bin';
+
+ # if it's Darwin,
+ if($build_os eq 'Darwin')
diff --git a/sysutils/boxbackup-devel/files/patch-lib-common-BoxPortsAndFiles.h b/sysutils/boxbackup-devel/files/patch-lib-common-BoxPortsAndFiles.h
new file mode 100644
index 000000000000..91820e35a3d1
--- /dev/null
+++ b/sysutils/boxbackup-devel/files/patch-lib-common-BoxPortsAndFiles.h
@@ -0,0 +1,22 @@
+--- lib/common/BoxPortsAndFiles.h.orig Sat Jan 8 13:30:04 2005
++++ lib/common/BoxPortsAndFiles.h Sat Jan 8 13:31:40 2005
+@@ -54,16 +54,16 @@
+
+ // Backup store daemon
+ #define BOX_PORT_BBSTORED (BOX_PORT_BASE+1)
+-#define BOX_FILE_BBSTORED_DEFAULT_CONFIG "/etc/box/bbstored.conf"
++#define BOX_FILE_BBSTORED_DEFAULT_CONFIG "%%PREFIX%%/etc/box/bbstored.conf"
+ // directory within the RAIDFILE root for the backup store daemon
+ #define BOX_RAIDFILE_ROOT_BBSTORED "backup"
+
+ // Backup client daemon
+-#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "/etc/box/bbackupd.conf"
++#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "%%PREFIX%%/etc/box/bbackupd.conf"
+
+
+ // RaidFile conf location efault
+-#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG "/etc/box/raidfile.conf"
++#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG "%%PREFIX%%/etc/box/raidfile.conf"
+
+
+ #endif // BOXPORTSANDFILES__H
diff --git a/sysutils/boxbackup-devel/files/pkg-message.client b/sysutils/boxbackup-devel/files/pkg-message.client
new file mode 100644
index 000000000000..2890641287b5
--- /dev/null
+++ b/sysutils/boxbackup-devel/files/pkg-message.client
@@ -0,0 +1,4 @@
+
+To run bbackupd at startup, add bbackupd_enable="YES" to /etc/rc.conf
+Please see http://www.fluffy.co.uk/boxbackup/client.html for client
+configuration options
diff --git a/sysutils/boxbackup-devel/files/pkg-message.server b/sysutils/boxbackup-devel/files/pkg-message.server
new file mode 100644
index 000000000000..7d39f96cd48f
--- /dev/null
+++ b/sysutils/boxbackup-devel/files/pkg-message.server
@@ -0,0 +1,4 @@
+
+To run bbstored at startup, add bbstored_enable="YES" to /etc/rc.conf
+Please see http://www.fluffy.co.uk/boxbackup/server.html for server
+configuration options
diff --git a/sysutils/boxbackup-devel/pkg-descr b/sysutils/boxbackup-devel/pkg-descr
new file mode 100644
index 000000000000..6a1bfa41cf22
--- /dev/null
+++ b/sysutils/boxbackup-devel/pkg-descr
@@ -0,0 +1,13 @@
+This is a port of Box Backup, an online backup daemon
+
+The backup daemon, bbackupd, runs on all machines to be backed up. The
+store server daemon, bbstored runs on a central server. Data is sent
+to the store server, which stores all data on local filesystems, that
+is, only on local hard drives. Tape or other archive media is not
+used.
+
+The system is designed to be easy to set up and run, and cheap to use.
+Once set up, there should be no need for user or administrative
+intervention, apart from usual system maintenance.
+
+WWW: http://www.fluffy.co.uk/boxbackup/
diff --git a/sysutils/boxbackup-devel/pkg-install b/sysutils/boxbackup-devel/pkg-install
new file mode 100644
index 000000000000..35a8ccbc472a
--- /dev/null
+++ b/sysutils/boxbackup-devel/pkg-install
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+case $2 in
+PRE-INSTALL)
+ USER=_bbstored
+ GROUP=${USER}
+ UID=505
+ GID=${UID}
+
+ if pw group show "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+ else
+ if pw groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ fi
+
+ if pw user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ else
+ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -d /nonexistant -c "BoxBackup Store Daemon"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+ fi
+ ;;
+esac
diff --git a/sysutils/boxbackup-devel/pkg-message b/sysutils/boxbackup-devel/pkg-message
new file mode 100644
index 000000000000..7f872c8b951b
--- /dev/null
+++ b/sysutils/boxbackup-devel/pkg-message
@@ -0,0 +1,5 @@
+
+To run bbackupd at startup, add bbackupd_enable="YES" to /etc/rc.conf
+Please see http://www.fluffy.co.uk/boxbackup/client.html for client
+configuration options
+
diff --git a/sysutils/boxbackup-devel/pkg-plist b/sysutils/boxbackup-devel/pkg-plist
new file mode 100644
index 000000000000..6f178e2c6653
--- /dev/null
+++ b/sysutils/boxbackup-devel/pkg-plist
@@ -0,0 +1,14 @@
+%%CLIENT%%bin/bbackupctl
+%%CLIENT%%bin/bbackupd
+%%CLIENT%%bin/bbackupd-config
+%%CLIENT%%bin/bbackupquery
+%%SERVER%%bin/bbstoreaccounts
+%%SERVER%%bin/bbstored
+%%SERVER%%bin/bbstored-certs
+%%SERVER%%bin/bbstored-config
+%%SERVER%%bin/raidfile-config
+%%CLIENT%%etc/rc.d/bbackupd.sh
+%%SERVER%%etc/rc.d/bbstored.sh
+%%CLIENT%%@dirrm etc/box/bbackupd
+%%SERVER%%@dirrm etc/box/bbstored
+@dirrm etc/box
diff --git a/sysutils/boxbackup/Makefile b/sysutils/boxbackup/Makefile
new file mode 100644
index 000000000000..c7b34dc52113
--- /dev/null
+++ b/sysutils/boxbackup/Makefile
@@ -0,0 +1,119 @@
+# vim: ts=4
+# New ports collection makefile for: boxbackup
+# Date created: 19 December 2004
+# Whom: James O'Gorman <james@netinertia.co.uk>
+#
+# $FreeBSD$
+#
+
+PORTNAME= boxbackup
+PORTVERSION= 0.09
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+.if defined(CLIENT_ONLY) && !defined(SERVER_ONLY)
+PKGNAMESUFFIX= -client
+.elif defined(SERVER_ONLY) && !defined(CLIENT_ONLY)
+PKGNAMESUFFIX= -server
+.endif
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= james@netinertia.co.uk
+COMMENT= An open source, completely automatic on-line backup system for UNIX
+
+RUN_DEPENDS= openssl:${PORTSDIR}/security/openssl
+
+HAS_CONFIGURE= yes
+USE_REINPLACE= yes
+USE_RC_SUBR= yes
+
+.if defined(CLIENT_ONLY) && !defined(SERVER_ONLY)
+CONFLICTS= boxbackup-[0-9]* boxbackup-server-[0-9]*
+PLIST_SUB+= CLIENT=""
+PLIST_SUB+= SERVER="@comment "
+ALL_TARGET= parcels/${DISTNAME}-backup-client-FreeBSD.tgz
+INSTALL_TARGET= install-backup-client
+.elif defined(SERVER_ONLY) && !defined(CLIENT_ONLY)
+CONFLICTS= boxbackup-[0-9]* boxbackup-client-[0-9]*
+PLIST_SUB+= SERVER=""
+PLIST_SUB+= CLIENT="@comment "
+ALL_TARGET= parcels/${DISTNAME}-backup-server-FreeBSD.tgz
+INSTALL_TARGET= install-backup-server
+.else
+PLIST_SUB+= CLIENT=""
+PLIST_SUB+= SERVER=""
+INSTALL_TARGET= install-backup-server install-backup-client
+.endif
+
+# These will be used at some point in the future when I get around to
+# automating the final configuration.
+#WITH_BACKUPSTORE?= /var/bbstored
+#WITH_WORKINGDIR?= /var/bbackupd
+#WITH_BACKUPMODE?= lazy
+
+.if ${.CURDIR} == ${MASTERDIR}
+pre-everything::
+ @${ECHO} "${PORTNAME} has the following options:"
+ @${ECHO} ""
+.if !defined(CLIENT_ONLY)
+ @${ECHO} " CLIENT_ONLY Only install client suite"
+.endif
+.if !defined(SERVER_ONLY)
+ @${ECHO} " SERVER_ONLY Only install server suite"
+.endif
+.if !defined(WITH_TESTS)
+ @${ECHO} " WITH_TESTS Allows use of a \"check\" target"
+ @${ECHO} " to run tests"
+.endif
+ @${ECHO} ""
+.if defined(SERVER_ONLY) && defined(CLIENT_ONLY)
+ @${ECHO} "SERVER_ONLY and CLIENT_ONLY are mutually exclusive."
+ @${ECHO} "Please choose one or the other."
+ @exit 1
+.endif
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/infrastructure/BoxPlatform.pm
+ @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/lib/common/BoxPortsAndFiles.h
+ @${SED} -e 's,%%PREFIX%%,${PREFIX},g' <${FILESDIR}/bbstored.sh >\
+ ${WRKSRC}/bbstored.sh
+ @${SED} -e 's,%%PREFIX%%,${PREFIX},g' <${FILESDIR}/bbackupd.sh >\
+ ${WRKSRC}/bbackupd.sh
+ @${RM} -f ${PKGDIR}/pkg-message
+.if defined(CLIENT_ONLY) || !defined(SERVER_ONLY)
+ @${CAT} ${FILESDIR}/pkg-message.client >>${PKGDIR}/pkg-message
+.endif
+.if defined(SERVER_ONLY) || !defined(CLIENT_ONLY)
+ @${CAT} ${FILESDIR}/pkg-message.server >>${PKGDIR}/pkg-message
+.endif
+
+.if defined(SERVER_ONLY) || !defined(CLIENT_ONLY)
+pre-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} \
+ ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+.endif
+
+post-install:
+ @${ECHO_CMD} "===> Installing startup scripts"
+.if defined(CLIENT_ONLY) || !defined(SERVER_ONLY)
+ @${INSTALL_SCRIPT} -m 751 ${WRKSRC}/bbackupd.sh ${PREFIX}/etc/rc.d/bbackupd.sh
+ @${MKDIR} -m 0700 ${PREFIX}/etc/box/bbackupd
+.endif
+.if defined(SERVER_ONLY) || !defined(CLIENT_ONLY)
+ @${INSTALL_SCRIPT} -m 751 ${WRKSRC}/bbstored.sh ${PREFIX}/etc/rc.d/bbstored.sh
+ @${MKDIR} -m 0700 ${PREFIX}/etc/box/bbstored
+.endif
+ @${CAT} ${PKGMESSAGE}
+# At some point we might want to automate final configuration...
+#.if !defined(BATCH) && exists(${PREFIX}/bin/bbackupd-config)
+# @${PREFIX}/bin/bbackupd-config ${PREFIX}/etc/box ${WITH_BACKUPMODE} ${ACCOUNT} ${BACKUP_SERVER} ${WITH_WORKDIR} ${BACKUPDIRS}
+#.endif
+
+.if defined(WITH_TESTS)
+check:
+ @${ECHO_CMD} "===> Running tests"
+ @${MAKE} -C ${WRKSRC} test
+.endif
+
+.include <bsd.port.mk>
diff --git a/sysutils/boxbackup/distinfo b/sysutils/boxbackup/distinfo
new file mode 100644
index 000000000000..9722d3f47e82
--- /dev/null
+++ b/sysutils/boxbackup/distinfo
@@ -0,0 +1,2 @@
+MD5 (boxbackup-0.09.tgz) = b4fced539ed72855383f25609de9e6da
+SIZE (boxbackup-0.09.tgz) = 505088
diff --git a/sysutils/boxbackup/files/bbackupd.sh b/sysutils/boxbackup/files/bbackupd.sh
new file mode 100644
index 000000000000..38ad3fdf2127
--- /dev/null
+++ b/sysutils/boxbackup/files/bbackupd.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+#
+# PROVIDE: bbackupd
+# REQUIRE: NETWORKING
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable bbackupd:
+#
+#bbackupd_enable="YES"
+#
+
+bbackupd_enable=${bbackupd_enable-"NO"}
+bbackupd_flags=${bbackupd_flags-"/usr/local/etc/box/bbackupd.conf"}
+bbackupd_pidfile=${bbackupd_pidfile-"/var/run/bbackupd.pid"}
+
+. /etc/rc.subr
+
+name="bbackupd"
+rcvar=`set_rcvar`
+command="/usr/local/bin/bbackupd"
+extra_commands="reload"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/sysutils/boxbackup/files/bbstored.sh b/sysutils/boxbackup/files/bbstored.sh
new file mode 100644
index 000000000000..8cd64ffa860a
--- /dev/null
+++ b/sysutils/boxbackup/files/bbstored.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+#
+# PROVIDE: bbstored
+# REQUIRE: NETWORKING
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable bbstored:
+#
+#bbstored_enable="YES"
+#
+
+bbstored_enable=${bbstored_enable-"NO"}
+bbstored_flags=${bbstored_flags-"/usr/local/etc/box/bbstored.conf"}
+bbstored_pidfile=${bbstored_pidfile-"/var/run/bbstored.pid"}
+
+. /etc/rc.subr
+
+name="bbstored"
+rcvar=`set_rcvar`
+command="/usr/local/bin/bbstored"
+extra_commands="reload"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/sysutils/boxbackup/files/patch-infrastrcture-BoxPlatform.pm b/sysutils/boxbackup/files/patch-infrastrcture-BoxPlatform.pm
new file mode 100644
index 000000000000..8feda5a2cf96
--- /dev/null
+++ b/sysutils/boxbackup/files/patch-infrastrcture-BoxPlatform.pm
@@ -0,0 +1,11 @@
+--- infrastructure/BoxPlatform.pm.orig Sat Jan 8 13:27:12 2005
++++ infrastructure/BoxPlatform.pm Sat Jan 8 13:27:33 2005
+@@ -78,7 +78,7 @@
+ close VERSION;
+
+ # where to put the files
+- $install_into_dir = '/usr/local/bin';
++ $install_into_dir = '%%PREFIX%%/bin';
+
+ # if it's Darwin,
+ if($build_os eq 'Darwin')
diff --git a/sysutils/boxbackup/files/patch-lib-common-BoxPortsAndFiles.h b/sysutils/boxbackup/files/patch-lib-common-BoxPortsAndFiles.h
new file mode 100644
index 000000000000..91820e35a3d1
--- /dev/null
+++ b/sysutils/boxbackup/files/patch-lib-common-BoxPortsAndFiles.h
@@ -0,0 +1,22 @@
+--- lib/common/BoxPortsAndFiles.h.orig Sat Jan 8 13:30:04 2005
++++ lib/common/BoxPortsAndFiles.h Sat Jan 8 13:31:40 2005
+@@ -54,16 +54,16 @@
+
+ // Backup store daemon
+ #define BOX_PORT_BBSTORED (BOX_PORT_BASE+1)
+-#define BOX_FILE_BBSTORED_DEFAULT_CONFIG "/etc/box/bbstored.conf"
++#define BOX_FILE_BBSTORED_DEFAULT_CONFIG "%%PREFIX%%/etc/box/bbstored.conf"
+ // directory within the RAIDFILE root for the backup store daemon
+ #define BOX_RAIDFILE_ROOT_BBSTORED "backup"
+
+ // Backup client daemon
+-#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "/etc/box/bbackupd.conf"
++#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "%%PREFIX%%/etc/box/bbackupd.conf"
+
+
+ // RaidFile conf location efault
+-#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG "/etc/box/raidfile.conf"
++#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG "%%PREFIX%%/etc/box/raidfile.conf"
+
+
+ #endif // BOXPORTSANDFILES__H
diff --git a/sysutils/boxbackup/files/pkg-message.client b/sysutils/boxbackup/files/pkg-message.client
new file mode 100644
index 000000000000..2890641287b5
--- /dev/null
+++ b/sysutils/boxbackup/files/pkg-message.client
@@ -0,0 +1,4 @@
+
+To run bbackupd at startup, add bbackupd_enable="YES" to /etc/rc.conf
+Please see http://www.fluffy.co.uk/boxbackup/client.html for client
+configuration options
diff --git a/sysutils/boxbackup/files/pkg-message.server b/sysutils/boxbackup/files/pkg-message.server
new file mode 100644
index 000000000000..7d39f96cd48f
--- /dev/null
+++ b/sysutils/boxbackup/files/pkg-message.server
@@ -0,0 +1,4 @@
+
+To run bbstored at startup, add bbstored_enable="YES" to /etc/rc.conf
+Please see http://www.fluffy.co.uk/boxbackup/server.html for server
+configuration options
diff --git a/sysutils/boxbackup/pkg-descr b/sysutils/boxbackup/pkg-descr
new file mode 100644
index 000000000000..6a1bfa41cf22
--- /dev/null
+++ b/sysutils/boxbackup/pkg-descr
@@ -0,0 +1,13 @@
+This is a port of Box Backup, an online backup daemon
+
+The backup daemon, bbackupd, runs on all machines to be backed up. The
+store server daemon, bbstored runs on a central server. Data is sent
+to the store server, which stores all data on local filesystems, that
+is, only on local hard drives. Tape or other archive media is not
+used.
+
+The system is designed to be easy to set up and run, and cheap to use.
+Once set up, there should be no need for user or administrative
+intervention, apart from usual system maintenance.
+
+WWW: http://www.fluffy.co.uk/boxbackup/
diff --git a/sysutils/boxbackup/pkg-install b/sysutils/boxbackup/pkg-install
new file mode 100644
index 000000000000..35a8ccbc472a
--- /dev/null
+++ b/sysutils/boxbackup/pkg-install
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+case $2 in
+PRE-INSTALL)
+ USER=_bbstored
+ GROUP=${USER}
+ UID=505
+ GID=${UID}
+
+ if pw group show "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+ else
+ if pw groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ fi
+
+ if pw user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ else
+ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -d /nonexistant -c "BoxBackup Store Daemon"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+ fi
+ ;;
+esac
diff --git a/sysutils/boxbackup/pkg-message b/sysutils/boxbackup/pkg-message
new file mode 100644
index 000000000000..7f872c8b951b
--- /dev/null
+++ b/sysutils/boxbackup/pkg-message
@@ -0,0 +1,5 @@
+
+To run bbackupd at startup, add bbackupd_enable="YES" to /etc/rc.conf
+Please see http://www.fluffy.co.uk/boxbackup/client.html for client
+configuration options
+
diff --git a/sysutils/boxbackup/pkg-plist b/sysutils/boxbackup/pkg-plist
new file mode 100644
index 000000000000..6f178e2c6653
--- /dev/null
+++ b/sysutils/boxbackup/pkg-plist
@@ -0,0 +1,14 @@
+%%CLIENT%%bin/bbackupctl
+%%CLIENT%%bin/bbackupd
+%%CLIENT%%bin/bbackupd-config
+%%CLIENT%%bin/bbackupquery
+%%SERVER%%bin/bbstoreaccounts
+%%SERVER%%bin/bbstored
+%%SERVER%%bin/bbstored-certs
+%%SERVER%%bin/bbstored-config
+%%SERVER%%bin/raidfile-config
+%%CLIENT%%etc/rc.d/bbackupd.sh
+%%SERVER%%etc/rc.d/bbstored.sh
+%%CLIENT%%@dirrm etc/box/bbackupd
+%%SERVER%%@dirrm etc/box/bbstored
+@dirrm etc/box