aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authoracm <acm@FreeBSD.org>2015-08-09 12:55:20 +0800
committeracm <acm@FreeBSD.org>2015-08-09 12:55:20 +0800
commitd7e59942da3ac6aef2fcad20c7c01bccfca5492c (patch)
tree9f3a906db3f1e5e3b6e33fcbc7e0460c9289a632 /sysutils
parent6c4c5e9bc967e6b1bb46310d216df6b3a1bc2a93 (diff)
downloadfreebsd-ports-gnome-d7e59942da3ac6aef2fcad20c7c01bccfca5492c.tar.gz
freebsd-ports-gnome-d7e59942da3ac6aef2fcad20c7c01bccfca5492c.tar.zst
freebsd-ports-gnome-d7e59942da3ac6aef2fcad20c7c01bccfca5492c.zip
- New ports : sysutils/bareos-*
Bareos (BackupArchivingRecoveryOpenSourced) is a reliable network open source software to backup, archive and restore files from all major operating systems. The fork was founded 2010 out of the bacula.org project. The fork has been actively developed and many new features have been added. WWW: http://www.bareos.org/
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile4
-rw-r--r--sysutils/bareos-bat/Makefile33
-rw-r--r--sysutils/bareos-bat/pkg-descr8
-rw-r--r--sysutils/bareos-bat/pkg-plist5
-rw-r--r--sysutils/bareos-client-static/Makefile26
-rw-r--r--sysutils/bareos-client/Makefile19
-rw-r--r--sysutils/bareos-server/Makefile203
-rw-r--r--sysutils/bareos-server/Makefile.common28
-rw-r--r--sysutils/bareos-server/distinfo2
-rw-r--r--sysutils/bareos-server/files/bareos-barcodes51
-rw-r--r--sysutils/bareos-server/files/bareos-dir.in31
-rw-r--r--sysutils/bareos-server/files/bareos-fd.in31
-rw-r--r--sysutils/bareos-server/files/bareos-sd.in31
-rw-r--r--sysutils/bareos-server/files/chio-bareos200
-rw-r--r--sysutils/bareos-server/files/patch-configure20
-rw-r--r--sysutils/bareos-server/files/patch-src-dird-Makefile.in37
-rw-r--r--sysutils/bareos-server/files/patch-src-filed-Makefile.in11
-rw-r--r--sysutils/bareos-server/files/patch-src-plugins-stored-Makefile.in11
-rw-r--r--sysutils/bareos-server/files/patch-src-qt-console-bat.pro.in11
-rw-r--r--sysutils/bareos-server/files/patch-src-stored-Makefile.in10
-rw-r--r--sysutils/bareos-server/files/pkg-deinstall.client.in30
-rw-r--r--sysutils/bareos-server/files/pkg-install.client.in13
-rw-r--r--sysutils/bareos-server/files/pkg-message.client.in8
-rw-r--r--sysutils/bareos-server/files/pkg-message.server.in60
-rw-r--r--sysutils/bareos-server/pkg-descr6
-rw-r--r--sysutils/bareos-server/pkg-plist97
-rw-r--r--sysutils/bareos-server/pkg-plist.client34
27 files changed, 1020 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index a180f7042d3e..495268c189a8 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -67,6 +67,10 @@
SUBDIR += bacula5-client-static
SUBDIR += bacula5-docs
SUBDIR += bacula5-server
+ SUBDIR += bareos-bat
+ SUBDIR += bareos-client
+ SUBDIR += bareos-client-static
+ SUBDIR += bareos-server
SUBDIR += baloo
SUBDIR += baloo-widgets
SUBDIR += bamf
diff --git a/sysutils/bareos-bat/Makefile b/sysutils/bareos-bat/Makefile
new file mode 100644
index 000000000000..60bf6a9507da
--- /dev/null
+++ b/sysutils/bareos-bat/Makefile
@@ -0,0 +1,33 @@
+# Created by: Alonso Cardenas Marquez <acm@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= bareos
+PKGNAMESUFFIX= -bat
+PORTREVISION= 0
+
+COMMENT= Backup archiving recovery open sourced (GUI)
+
+LIB_DEPENDS+= libqwt.so:${PORTSDIR}/x11-toolkits/qwt5 \
+ libbareos.so:${PORTSDIR}/sysutils/bareos-client
+
+CONFLICTS= bacula*-bat-*
+
+USES= pkgconfig
+USE_QT4= qmake_build uic_build moc_build rcc_build
+WITH_BAT= yes
+
+PLIST= ${.CURDIR}/pkg-plist
+MAKE_ENV+= MAKEOBJDIRPREFIX=/
+
+MASTERDIR= ${.CURDIR}/../../sysutils/bareos-server
+
+CONFIGURE_ARGS+= --enable-bat \
+ --with-qwt=${LOCALBASE}/lib \
+ --disable-build-dird \
+ --disable-build-stored \
+ --enable-client-only
+
+OPTIONS_DEFINE= OPENSSL
+OPTIONS_DEFAULT=OPENSSL
+
+.include "${MASTERDIR}/Makefile"
diff --git a/sysutils/bareos-bat/pkg-descr b/sysutils/bareos-bat/pkg-descr
new file mode 100644
index 000000000000..5b0a2b6b9460
--- /dev/null
+++ b/sysutils/bareos-bat/pkg-descr
@@ -0,0 +1,8 @@
+bat is the GUI inteface for Bareos.
+
+Bareos (BackupArchivingRecoveryOpenSourced) is a reliable network open source
+software to backup, archive and restore files from all major operating systems.
+The fork was founded 2010 out of the bacula.org project. The fork has been
+actively developed and many new features have been added.
+
+WWW: http://www.bareos.org/
diff --git a/sysutils/bareos-bat/pkg-plist b/sysutils/bareos-bat/pkg-plist
new file mode 100644
index 000000000000..0b1e4857dd11
--- /dev/null
+++ b/sysutils/bareos-bat/pkg-plist
@@ -0,0 +1,5 @@
+@sample %%ETCDIR%%/bat.conf.sample
+man/man1/bat.1.gz
+sbin/bat
+@dirrmtry %%ETCDIR%%
+
diff --git a/sysutils/bareos-client-static/Makefile b/sysutils/bareos-client-static/Makefile
new file mode 100644
index 000000000000..722a65740fa9
--- /dev/null
+++ b/sysutils/bareos-client-static/Makefile
@@ -0,0 +1,26 @@
+# Created by: Alonso Cardenas <acm@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= bareos
+PORTREVISION= 0
+PKGNAMESUFFIX= -client-static
+
+COMMENT= Backup archiving recovery open sourced (static client)
+
+PLIST= ${.CURDIR}/pkg-plist
+MASTERDIR= ${.CURDIR}/../../sysutils/bareos-server
+
+PLIST_FILES= sbin/bareos-fd-static \
+ sbin/bconsole-static
+
+OPTIONS_DEFINE= NLS
+OPTIONS_DEFAULT=#
+
+CONFIGURE_ARGS+= --enable-client-only \
+ --enable-static-fd \
+ --enable-static-cons \
+ --disable-libtool \
+ --disable-build-dird \
+ --disable-build-stored
+
+.include "${MASTERDIR}/Makefile"
diff --git a/sysutils/bareos-client/Makefile b/sysutils/bareos-client/Makefile
new file mode 100644
index 000000000000..044af1bb77f5
--- /dev/null
+++ b/sysutils/bareos-client/Makefile
@@ -0,0 +1,19 @@
+# Created by: Alonso Cardenas <acm@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= bareos
+PORTREVISION= 0
+PKGNAMESUFFIX= -client
+
+COMMENT= Backup archiving recovery open sourced (client)
+
+WITH_CLIENT_ONLY=yes
+USE_RC_SUBR= bareos-fd
+
+PLIST= ${PKGDIR}/pkg-plist.client
+MASTERDIR= ${.CURDIR}/../../sysutils/bareos-server
+
+OPTIONS_DEFINE= NLS PYTHON
+OPTIONS_DEFAULT=#
+
+.include "${MASTERDIR}/Makefile"
diff --git a/sysutils/bareos-server/Makefile b/sysutils/bareos-server/Makefile
new file mode 100644
index 000000000000..d946616c4dde
--- /dev/null
+++ b/sysutils/bareos-server/Makefile
@@ -0,0 +1,203 @@
+# Created by: Alonso Cardenas <acm@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= bareos
+DISTVERSION= 15.2
+PORTREVISION?= 0
+CATEGORIES?= sysutils
+PKGNAMEPREFIX?= #
+PKGNAMESUFFIX?= -server
+
+USE_GITHUB= yes
+GH_ACCOUNT= bareos
+GH_PROJECT= bareos
+GH_TAGNAME= bb1529f88585da31a0053f06727c74f2a7cb0dc1
+
+MAINTAINER= acm@FreeBSD.org
+COMMENT?= Backup archiving recovery open sourced (server)
+
+USES+= libtool:keepla
+
+CONFLICTS?= bacula*-server-*
+
+LIB_DEPENDS+= liblzo2.so:${PORTSDIR}/archivers/lzo2
+
+USERS= bareos
+GROUPS= ${USERS}
+
+PLIST_SUB+= LIB_VERSION=${PORTVERSION}.0
+
+GNU_CONFIGURE= yes
+USE_LDCONFIG= yes
+
+CPPFLAGS+= -I/usr/include/readline -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+
+OPTIONS_DEFINE?= MTX PYTHON NLS OPENSSL
+OPTIONS_DEFAULT?= NLS OPENSSL PGSQL
+MTX_DESC= Install mtx for control of autochanger devices
+
+.if ${PKGNAMESUFFIX} == "-server"
+OPTIONS_SINGLE_DATABASE= SQLITE3 MYSQL PGSQL
+OPTIONS_SINGLE= DATABASE
+DATABASE_DESC= Database support
+.endif
+
+OPENSSL_USE= OPENSSL=yes
+OPENSSL_CONFIGURE_ON= --with-openssl=${OPENSSLBASE}
+OPENSSL_CONFIGURE_OFF= --with-openssl="no"
+
+.if ${PKGNAMESUFFIX} == "-client" || ${PKGNAMESUFFIX} == "-server" #Till end of the file
+
+PYTHON_USES= python
+PYTHON_CONFIGURE_ON= --with-python=yes
+PYTHON_CONFIGURE_OFF= --with-python=no
+
+.if !defined(WITH_CLIENT_ONLY)
+LIB_DEPENDS+= libbareos.so:${PORTSDIR}/sysutils/bareos-client
+USE_RC_SUBR?= bareos-dir bareos-sd
+.endif
+
+.if defined(WITH_CLIENT_ONLY)
+SUB_FILES+= pkg-install.client pkg-deinstall.client pkg-message.client
+.else
+SUB_FILES+= pkg-message.server
+.endif
+
+CONFIGURE_ARGS+=--with-tcp-wrappers=/usr/lib \
+ --enable-libtool \
+ --enable-smartalloc \
+ --sysconfdir=${PREFIX}/etc \
+ --with-working-dir=${BAREOS_DIR} \
+ --with-scriptdir=${PREFIX}/share/${PORTNAME} \
+ --with-logdir=/var/log/bareos \
+ --with-readline=yes \
+ --disable-conio \
+ --enable-batch-insert \
+ --with-plugindir=${PREFIX}/lib/bareos/plugins \
+ --with-scriptdir=${PREFIX}/lib/bareos/scripts \
+ --with-dump-email=root@localhost \
+ --with-job-email=root@localhost \
+ --with-db-name=bareos \
+ --with-sbin-perm=755 \
+ --with-db-user=bareos \
+ --with-baseport=9101 \
+ --with-pid-dir=/var/run/bareos
+
+.if defined(WITH_CLIENT_ONLY)
+CONFIGURE_ARGS+=--with-fd-user=root \
+ --with-fd-group=wheel
+.else
+CONFIGURE_ARGS+=--with-dir-user=${BAREOS_USER} \
+ --with-dir-group=${BAREOS_GROUP} \
+ --with-sd-user=${BAREOS_USER} \
+ --with-sd-group=operator
+.endif
+
+# The user/group IDs below are registered, see
+# http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#DADS-UID
+#
+BAREOS_USER?= bareos
+BAREOS_GROUP?= ${BAREOS_USER}
+BAREOS_UID?= 997
+BAREOS_GID?= ${BAREOS_UID}
+BAREOS_DIR?= /var/db/bareos
+
+PLIST_SUB+= BAREOS_DIR=${BAREOS_DIR}
+
+SUB_LIST= BAREOS_USER=${BAREOS_USER} \
+ BAREOS_GROUP=${BAREOS_GROUP} \
+ BAREOS_UID=${BAREOS_UID} \
+ BAREOS_GID=${BAREOS_GID} \
+ BAREOS_DIR=${BAREOS_DIR}
+
+NLS_USES= gettext
+NLS_CONFIGURE_ENABLE= nls
+
+# Client only or full server version
+.if defined(WITH_CLIENT_ONLY)
+CONFFILES= fd
+CONFIGURE_ARGS+= --enable-client-only
+
+PKGDEINSTALL= ${FILESDIR}/pkg-deinstall.client
+PKGINSTALL= ${FILESDIR}/pkg-install.client
+.else
+# Server only Options
+CONFFILES= sd dir
+# Server default database
+
+MYSQL_CONFIGURE_ON= --with-mysql=yes
+MYSQL_USE= MYSQL=yes
+SQLITE3_CONFIGURE_ON= --with-sqlite3=yes
+SQLITE3_LIB_DEPENDS= libsqlite3.so:${PORTSDIR}/databases/sqlite3
+PGSQL_CONFIGURE_ON= --with-postgresql=yes
+PGSQL_USES= pgsql
+
+MTX_RUN_DEPENDS= ${LOCALBASE}/sbin/mtx:${PORTSDIR}/misc/mtx
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MMYSQL}
+DBTYPE= mysql
+SUB_LIST+= REQ_MYSQL=mysql REQ_PGSQL=""
+.elif ${PORT_OPTIONS:MSQLITE3}
+DBTYPE= sqlite3
+.else
+DBTYPE= postgresql
+SUB_LIST+= REQ_MYSQL="" REQ_PGSQL=postgresql
+.endif
+PLIST_SUB+= DBTYPE=${DBTYPE}
+
+.endif
+
+.if defined(WITH_CLIENT_ONLY)
+MP1+= bconsole.1
+MP8+= bareos-fd.8
+.else
+MP8+= bareos.8 bareos-dir.8 bareos-sd.8 bcopy.8 bextract.8 bls.8 bscan.8 \
+ btape.8 btraceback.8 bareos-dbcheck.8
+MP1+= bsmtp.1 bregex.1 bwild.1 bareos-tray-monitor.1
+.endif
+
+MAKE_ENV+= MAN8="${MP8}" MAN1="${MP1}"
+
+post-patch:
+# This port does not install docs. See bacula-docs for that
+ ${REINPLACE_CMD} -e '/docdir/d' ${WRKSRC}/Makefile.in
+# Default bconsole.conf is in ${ETCDIR}
+ @${REINPLACE_CMD} -e 's|./bconsole.conf|${ETCDIR}/bconsole.conf|g' ${WRKSRC}/src/console/console.c
+ @${REINPLACE_CMD} -e 's|^MAN8 =|MAN8 ?=|g' -e 's|^MAN1 =|MAN1 ?=|g' ${WRKSRC}/manpages/Makefile.in
+ @${REINPLACE_CMD} -e 's|_NONSHARED||g' ${WRKSRC}/src/filed/Makefile.in
+.if defined(WITH_CLIENT_ONLY)
+# In client port only install startup script out of script dir (see below post-install)
+# Dont mkdir ${PREFIX}/share/bacula cause it's empty
+ @${REINPLACE_CMD} -e 's|^\(fd_subdirs = .*\)scripts\(.*\)|\1\2|g' ${WRKSRC}/Makefile.in
+ ${REINPLACE_CMD} -e 's|\(.*$${MKDIR} $${DESTDIR}$${scriptdir}\)|#\1|g' ${WRKSRC}/Makefile.in
+.else
+# In server port don't install filed
+ @${REINPLACE_CMD} -e '/^fd_subdirs = /s|src/filed||' -e 's|src/console||' \
+ -e 's|src/lib||' -e 's|src/findlib||' -e 's|@FD_PLUGIN_DIR@||' ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e 's|../lib/|$$(LOCALBASE)/lib/|g' -e 's|../findlib/|$$(LOCALBASE)/lib/|g' ${WRKSRC}/src/dird/Makefile.in \
+ ${WRKSRC}/src/stored/Makefile.in ${WRKSRC}/src/tools/Makefile.in
+ @${REINPLACE_CMD} -e 's|fd_plugins.h|filed/fd_plugins.h|g' -e 's|dir_plugins.h|dird/dir_plugins.h|g' -e 's|stored.h|stored/stored.h|g' \
+ ${WRKSRC}/src/tools/bpluginfo.c
+.endif
+
+.if !target(post-install)
+post-install:
+.if defined(WITH_CLIENT_ONLY)
+ ${MV} ${STAGEDIR}${ETCDIR}/bconsole.conf ${STAGEDIR}${ETCDIR}/bconsole.conf.sample
+.else
+ ${INSTALL_SCRIPT} ${FILESDIR}/chio-bareos ${STAGEDIR}${PREFIX}/sbin
+ ${INSTALL_DATA} ${FILESDIR}/bareos-barcodes ${STAGEDIR}${ETCDIR}/bareos-barcodes.sample
+ ${CHMOD} o+x ${STAGEDIR}${PREFIX}/bin/bsmtp
+.endif
+ for na in ${CONFFILES}; do \
+ ${MV} ${STAGEDIR}${ETCDIR}/bareos-$$na.conf ${STAGEDIR}${ETCDIR}/bareos-$$na.conf.sample; \
+ done
+ @${MKDIR} ${STAGEDIR}/var/run/bareos
+.endif
+.else
+.include "${MASTERDIR}/Makefile.common"
+.endif # -client and -server are defined
+.include <bsd.port.mk>
diff --git a/sysutils/bareos-server/Makefile.common b/sysutils/bareos-server/Makefile.common
new file mode 100644
index 000000000000..93deefb42f26
--- /dev/null
+++ b/sysutils/bareos-server/Makefile.common
@@ -0,0 +1,28 @@
+# Created by: Alonso Cardenas <acm@FreeBSD.org>
+# $FreeBSD$
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|_NONSHARED||g' ${WRKSRC}/src/filed/Makefile.in
+
+post-build:
+.if ${PKGNAMEPREFIX} == "nagios-check_"
+ ${MAKE_CMD} -C ${WRKSRC}/examples/nagios/check_bareos
+.endif
+
+do-install:
+.if ${PKGNAMESUFFIX} == "-bat"
+# Install config files and preserve existing ones
+ ${MKDIR} ${STAGEDIR}${ETCDIR}
+ ${INSTALL_SCRIPT} ${WRKSRC}/src/qt-console/bat.conf ${STAGEDIR}${PREFIX}/etc/bareos/bat.conf.sample
+ ${INSTALL_MAN} ${WRKSRC}/manpages/bat.1 ${STAGEDIR}${PREFIX}/man/man1/
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/qt-console/bat ${STAGEDIR}${PREFIX}/sbin
+.endif
+.if ${PKGNAMEPREFIX} == "nagios-check_"
+ @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nagios
+ ${INSTALL_PROGRAM} ${WRKSRC}/examples/nagios/check_bareos/check_bareos \
+ ${STAGEDIR}${PREFIX}/libexec/nagios
+.endif
+.if ${PKGNAMESUFFIX} == "-client-static"
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/filed/static-bareos-fd ${STAGEDIR}${PREFIX}/sbin/bareos-fd-static
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/console/static-bconsole ${STAGEDIR}${PREFIX}/sbin/bconsole-static
+.endif
diff --git a/sysutils/bareos-server/distinfo b/sysutils/bareos-server/distinfo
new file mode 100644
index 000000000000..b34186bf121c
--- /dev/null
+++ b/sysutils/bareos-server/distinfo
@@ -0,0 +1,2 @@
+SHA256 (bareos-bareos-15.2-bb1529f88585da31a0053f06727c74f2a7cb0dc1_GH0.tar.gz) = 91341f96f1f1e883a46e74ea91431595943de84dc1482bf4bf463caa0f1d8409
+SIZE (bareos-bareos-15.2-bb1529f88585da31a0053f06727c74f2a7cb0dc1_GH0.tar.gz) = 3878822
diff --git a/sysutils/bareos-server/files/bareos-barcodes b/sysutils/bareos-server/files/bareos-barcodes
new file mode 100644
index 000000000000..f42cb7f7aeea
--- /dev/null
+++ b/sysutils/bareos-server/files/bareos-barcodes
@@ -0,0 +1,51 @@
+#
+# Bacula barcode simulation file
+# used by ${PREFIX}/sbin/chio-bareos (FreeBSD)
+#
+# The volumenames are returned by the "changer list" command
+# labeling in the console is done by "label barcodes"
+# (then all volumes belog to the default pool).
+# All Lines with an "#" at the bedinning are ignored
+#
+# !!!! If you export an tape and reinsert another one,
+# !!!! don't forget to change the volume name in this file!
+#
+1:Volume1-100
+2:Volume1-101
+3:Volume1-102
+4:Volume1-103
+5:Volume1-104
+6:Volume1-105
+7:Volume1-106
+8:Volume1-107
+9:Volume1-108
+10:Volume1-109
+11:Volume1-110
+12:Volume1-111
+#
+# Further volumes exported from the changer
+#
+# 36GB AIT2 tapes
+#Volume1-100
+#Volume1-101
+#Volume1-102
+#Volume1-103
+#Volume1-104
+#Volume1-105
+#Volume1-106
+#Volume1-107
+#Volume1-108
+#Volume1-109
+#Volume1-110
+#Volume1-111
+#Volume1-112
+#Volume1-113
+#Volume1-114
+#Volume1-115
+#
+# 50GB AIT2 tapes
+#Volume2-200
+#Volume2-201
+#Volume2-202
+#Volume2-203
+#Volume2-204
diff --git a/sysutils/bareos-server/files/bareos-dir.in b/sysutils/bareos-server/files/bareos-dir.in
new file mode 100644
index 000000000000..290854cfd26c
--- /dev/null
+++ b/sysutils/bareos-server/files/bareos-dir.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD: head/sysutils/bareos-server/files/bareos-dir.in 323275 2013-07-19 09:44:58Z rm $
+#
+# PROVIDE: bareos_dir
+# REQUIRE: DAEMON %%REQ_MYSQL%% %%REQ_PGSQL%%
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# bareos_dir_enable (bool): Set to NO by default.
+# Set it to YES to enable bareos_dir.
+# bareos_dir_flags (params): Set params used to start bareos_dir.
+#
+
+. /etc/rc.subr
+
+name="bareos_dir"
+rcvar=${name}_enable
+command=%%PREFIX%%/sbin/bareos-dir
+
+load_rc_config $name
+
+: ${bareos_dir_enable="NO"}
+: ${bareos_dir_flags=" -u bareos -g bareos -v -c %%PREFIX%%/etc/bareos/bareos-dir.conf"}
+: ${bareos_dir_pidfile="/var/run/bareos/bareos-dir.9101.pid"}
+
+pidfile="${bareos_dir_pidfile}"
+
+run_rc_command "$1"
diff --git a/sysutils/bareos-server/files/bareos-fd.in b/sysutils/bareos-server/files/bareos-fd.in
new file mode 100644
index 000000000000..5df257a2f30c
--- /dev/null
+++ b/sysutils/bareos-server/files/bareos-fd.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD: head/sysutils/bacula5-server/files/bacula-fd.in 323275 2013-07-19 09:44:58Z rm $
+#
+# PROVIDE: bareos_fd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# bareos_fd_enable (bool): Set to NO by default.
+# Set it to YES to enable bareos_fd.
+# bareos_fd_flags (params): Set params used to start bareos_fd.
+#
+
+. /etc/rc.subr
+
+name="bareos_fd"
+rcvar=${name}_enable
+command=%%PREFIX%%/sbin/bareos-fd
+
+load_rc_config $name
+
+: ${bareos_fd_enable="NO"}
+: ${bareos_fd_flags=" -u root -g wheel -v -c %%PREFIX%%/etc/bareos/bareos-fd.conf"}
+: ${bareos_fd_pidfile="/var/run/bareos/bareos-fd.9102.pid"}
+
+pidfile="${bareos_fd_pidfile}"
+
+run_rc_command "$1"
diff --git a/sysutils/bareos-server/files/bareos-sd.in b/sysutils/bareos-server/files/bareos-sd.in
new file mode 100644
index 000000000000..ab0483dad74f
--- /dev/null
+++ b/sysutils/bareos-server/files/bareos-sd.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD: head/sysutils/bacula5-server/files/bacula-sd.in 323486 2013-07-22 17:51:39Z rm $
+#
+# PROVIDE: bareos_sd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# bareos_sd_enable (bool): Set to NO by default.
+# Set it to YES to enable bareos_sd.
+# bareos_sd_flags (params): Set params used to start bareos_sd.
+#
+
+. /etc/rc.subr
+
+name="bareos_sd"
+rcvar=${name}_enable
+command=%%PREFIX%%/sbin/bareos-sd
+
+load_rc_config $name
+
+: ${bareos_sd_enable="NO"}
+: ${bareos_sd_flags=" -u bareos -g bareos -v -c %%PREFIX%%/etc/bareos/bareos-sd.conf"}
+: ${bareos_sd_pidfile="/var/run/bareos/bareos-sd.9103.pid"}
+
+pidfile="${bacula_sd_pidfile}"
+
+run_rc_command "$1"
diff --git a/sysutils/bareos-server/files/chio-bareos b/sysutils/bareos-server/files/chio-bareos
new file mode 100644
index 000000000000..6650426857dc
--- /dev/null
+++ b/sysutils/bareos-server/files/chio-bareos
@@ -0,0 +1,200 @@
+#!/bin/sh
+#
+# Bacula interface to FreeBSD chio autoloader command with
+# multiple drive support
+# (By Lars Köller, lars+bacula@koellers.net, 2004)
+#
+# If you set in your Device resource
+#
+# Changer Command = "path-to-this-script/chio-bacula" %c %o %S %a
+# you will have the following input to this script:
+#
+# chio-bacula "changer-device" "command" "slot" "archive-device" "drive-index"
+# $1 $2 $3 $4 $5
+# for example:
+#
+# chio-bacula /dev/sg0 load 1 /dev/nst0 0 (on a FreeBSD system)
+#
+# If you need to to an offline, refer to the drive as $4
+# e.g. mt -f $f offline
+#
+# Many changers need an offline after the unload. Also many
+# changers need a sleep 60 after the mtx load.
+#
+# N.B. If you change the script, take care to return either
+# the mtx exit code or a 0. If the script exits with a non-zero
+# exit code, Bacula will assume the request failed.
+#
+me=$(basename $0)
+
+# Debug output, take care this file is writeable for user bacula!
+#LOG=/var/db/bacula/chio-bacula.log
+#exec 2>>$LOG
+#echo "------------------------- $(date) Start $(basename $0) -------------------------" >> $LOG
+#set -x
+
+# Debug
+logger -p user.err "$me $@"
+
+# This simulates a barcode reader in the changer.
+# The labes of the virtual barcode reader are located in the BARCODE_FILE
+SIMULATE_BARCODE=true
+BARCODE_FILE=/usr/local/etc/bacula/bacula-barcodes
+MTX=/bin/chio
+# Set default values (see case statement below for
+# free mapping of drive index and tape device
+# We have a double drive Qualstar where drive 1 is the default bacula drive
+#TAPE=/dev/bacula-tape
+TAPE=/dev/nrsa0
+DRIVE=0
+# Time to wait for (un)loading
+SLEEP=20
+
+usage()
+{
+ echo ""
+ echo "The $me script for bacula"
+ echo "--------------------------------------"
+ echo ""
+ echo "usage: $me <changer-device> <command> [slot] [devicename of tapedrive] [drive index]"
+ echo ""
+ echo "Valid commands:"
+ echo ""
+ echo "unload Unloads a tape into the slot"
+ echo " from where it was loaded."
+ echo "load <slot> Loads a tape from the slot <slot>"
+ echo " (slot-base is calculated to 1 as first slot)"
+ echo "list Lists full storage slots"
+ echo "loaded Gives slot from where the tape was loaded."
+ echo " 0 means the tape drive is empty."
+ echo "slots Gives Number of aviable slots."
+ echo ""
+ echo "Example:"
+ echo " $me /dev/changer load 1 loads a tape from slot 1"
+ echo ""
+ exit 2
+}
+
+# The changer device
+if [ -z "$1" ] ; then
+ usage;
+else
+ CHANGER=$1
+fi
+# The command
+if [ -z "$2" ] ; then
+ usage;
+else
+ COMMAND=$2
+fi
+# The slot number
+if [ ! -z "$3" ]; then
+ SLOT=$3
+ # btape fill says "... slot 1 drive 0" :-(
+ if [ "$SLOT" = "slot" ]; then
+ shift
+ SLOT=$3
+ fi
+fi
+# Set tape device
+if [ ! -z "$4" ]; then
+ TAPE=$4
+fi
+
+# Here you can map bacula drive number to any tape device
+# DRIVE is the chio drive number used below by chio!
+case $5 in
+ 0)
+ # First Drive in Changer is Bacula drive
+ DRIVE=0
+ #TAPE=/dev/bacula-tape
+ TAPE=/dev/nrsa0
+ ;;
+ 1)
+ DRIVE=1
+ #TAPE=/dev/bacula-tape2
+ TAPE=/dev/nrsa1
+ ;;
+esac
+
+#
+# Main
+#
+case ${COMMAND} in
+ unload)
+ # enable the following line if you need to eject the cartridge
+ mt -f ${TAPE} off
+ sleep 2
+ # if we have a slot, try it
+ if [ ! -z "$SLOT" ]; then
+ ${MTX} -f ${CHANGER} move drive ${DRIVE} slot $((${SLOT}-1))
+ exit $?
+ fi
+ # Try other way (works if source element information is valid for drive)
+ ${MTX} -f ${CHANGER} return drive ${DRIVE}
+ # If the changer is power cycled with a tape loaded in a drive
+ # we can compute the slot in case of a complete filled magazine, with
+ # one slot free.
+ if [ "$?" != "0" ]; then
+ free_slot=`${MTX} -f ${CHANGER} stat | grep "^slot " | grep -v "FULL" | awk '{print $2}'`
+ free_slot=${free_slot%:}
+ ${MTX} -f ${CHANGER} move drive ${DRIVE} slot $free_slot
+ fi
+ ;;
+
+ load)
+ ${MTX} -f ${CHANGER} move slot $((${SLOT}-1)) drive ${DRIVE}
+ rtn=$?
+ # Increase the sleep time if you have a slow device
+ sleep $SLEEP
+ exit $rtn
+ ;;
+
+ list)
+ if [ "${SIMULATE_BARCODE}" = "true" ]; then
+ if [ -f "$BARCODE_FILE" ]; then
+ cat $BARCODE_FILE | grep -v -e "^#" -e "^$"
+ exit 0
+ else
+ echo "Barcode file $BARCODE_FILE missing ... exiting!"
+ exit 1
+ fi
+ else
+ ${MTX} -f ${CHANGER} status | grep "^slot .*: .*FULL>" | awk '{print $2}' | awk -F: '{print $1+1" "}' | tr -d "[\r\n]"
+ fi
+ ;;
+
+ loaded)
+ # echo "Request loaded"
+ ${MTX} -f ${CHANGER} status -S > /tmp/mtx.$$
+ rtn=$?
+ # Try to get chio slot source from drive entry
+ SLOT=$(cat /tmp/mtx.$$ | grep "^drive ${DRIVE}: <FULL> .*slot" | awk '{print $6+1}' | tr -d ">")
+ if [ -z "$SLOT" ]; then
+ # This handles the case a source slot is not available (power on
+ # of the changer with a drive loaded) and all other slots are
+ # occupied with a tape!
+ SLOT=$(cat /tmp/mtx.$$ | grep "^slot .*: <ACCESS>" | awk '{print $2+1}')
+ if [ -z "$SLOT" ]; then
+ echo 0
+ else
+ echo $SLOT
+ fi
+ else
+ echo $SLOT
+ fi
+ # All tapes are in the slots
+ #cat /tmp/mtx.$$ | grep "^drive ${DRIVE}: .* source: <>" | awk "{print 0}"
+ rm -f /tmp/mtx.$$
+ exit $rtn
+ ;;
+
+ slots)
+ # echo "Request slots"
+ ${MTX} -f ${CHANGER} status | grep "^slot " | tail -1 | awk '{print $2+1}' | tr -d ":"
+ ;;
+
+ *)
+ usage
+ ;;
+esac
diff --git a/sysutils/bareos-server/files/patch-configure b/sysutils/bareos-server/files/patch-configure
new file mode 100644
index 000000000000..2790798a4180
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-configure
@@ -0,0 +1,20 @@
+--- configure 2015-08-08 15:47:12.347184000 -0500
++++ configure 2015-08-08 15:48:11.164437000 -0500
+@@ -18626,7 +18626,7 @@
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
++ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test "${enable_static_fd+set}" != set; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+@@ -21466,7 +21466,7 @@
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
++ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test "${enable_static_fd+set}" != set; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
diff --git a/sysutils/bareos-server/files/patch-src-dird-Makefile.in b/sysutils/bareos-server/files/patch-src-dird-Makefile.in
new file mode 100644
index 000000000000..0878c81c15b7
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-src-dird-Makefile.in
@@ -0,0 +1,37 @@
+--- src/dird/Makefile.in 2015-06-25 05:37:04.000000000 -0500
++++ src/dird/Makefile.in 2015-07-25 16:32:30.152534000 -0500
+@@ -77,7 +77,7 @@
+ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
+ $(NDMP_LIBS) -lbareosfind -lbareossql -lbareoscats -lbareoscfg -lbareos -lm $(DLIB) \
+ $(DB_LIBS) $(LIBS) $(WRAPLIBS) $(GETTEXT_LIBS) $(CAP_LIBS) \
+- $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED)
++ $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED)
+
+ bareos-dbcheck: Makefile $(DBCHKOBJS) \
+ ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \
+@@ -88,7 +88,7 @@
+ @echo "Linking $@ ..."
+ $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../findlib -L../cats -o $@ $(DBCHKOBJS) \
+ -lbareoscats -lbareossql -lbareoscfg -lbareosfind -lbareos -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) \
+- $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED)
++ $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED)
+
+ testfind: Makefile $(TSTFNDOBJS) \
+ ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \
+@@ -99,7 +99,7 @@
+ @echo "Linking $@ ..."
+ $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../findlib -L../cats -o $@ $(TSTFNDOBJS) \
+ -lbareoscats -lbareossql -lbareoscfg -lbareosfind -lbareos -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) \
+- $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED)
++ $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED)
+
+ static-bareos-dir: Makefile $(SVROBJS) \
+ ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \
+@@ -140,7 +140,6 @@
+ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bareos-dir $(DESTDIR)$(sbindir)/bareos-dir
+ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bareos-dbcheck $(DESTDIR)$(sbindir)/bareos-dbcheck
+ @srcconf=bareos-dir.conf; \
+- $(MKDIR) ${DESTDIR}${confdir}/bareos-dir.d/; \
+ if test -f ${DESTDIR}${confdir}/$$srcconf; then \
+ destconf=$$srcconf.new; \
+ echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
diff --git a/sysutils/bareos-server/files/patch-src-filed-Makefile.in b/sysutils/bareos-server/files/patch-src-filed-Makefile.in
new file mode 100644
index 000000000000..c3a9a4ac70c4
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-src-filed-Makefile.in
@@ -0,0 +1,11 @@
+--- src/filed/Makefile.in 2015-08-08 14:17:28.058350000 -0500
++++ src/filed/Makefile.in 2015-08-08 14:17:49.001877000 -0500
+@@ -84,7 +84,7 @@
+ ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE)
+ @echo "Linking $@ ..."
+ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
+- $(FDLIBS) -lbareosfind -lbareoscfg -lbareos -lm $(LIBS) \
++ -lbareosfind -lbareoscfg -lbareos -lm $(FDLIBS) $(LIBS) \
+ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS)
+ strip $@
+
diff --git a/sysutils/bareos-server/files/patch-src-plugins-stored-Makefile.in b/sysutils/bareos-server/files/patch-src-plugins-stored-Makefile.in
new file mode 100644
index 000000000000..7d4f8fb3b871
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-src-plugins-stored-Makefile.in
@@ -0,0 +1,11 @@
+--- src/plugins/stored/Makefile.in 2015-07-23 18:04:28.275396000 -0500
++++ src/plugins/stored/Makefile.in 2015-07-23 18:05:09.508399000 -0500
+@@ -39,7 +39,7 @@
+
+ autoxflate-sd.la: Makefile \
+ autoxflate-sd$(DEFAULT_OBJECT_TYPE) \
+- ../../lib/libbareos$(DEFAULT_ARCHIVE_TYPE)
++ $(LOCALBASE)/lib/libbareos$(DEFAULT_ARCHIVE_TYPE)
+ $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared autoxflate-sd.lo -o $@ -rpath $(plugindir) -module -export-dynamic -avoid-version -L../../lib -lbareos
+
+ example-plugin-sd.la: Makefile example-plugin-sd$(DEFAULT_OBJECT_TYPE)
diff --git a/sysutils/bareos-server/files/patch-src-qt-console-bat.pro.in b/sysutils/bareos-server/files/patch-src-qt-console-bat.pro.in
new file mode 100644
index 000000000000..71f1a0722c51
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-src-qt-console-bat.pro.in
@@ -0,0 +1,11 @@
+--- src/qt-console/bat.pro.in 2015-07-25 17:11:07.807100000 -0500
++++ src/qt-console/bat.pro.in 2015-07-25 17:11:57.110388000 -0500
+@@ -32,7 +32,7 @@
+ DEPENDPATH += .
+ INCLUDEPATH += .. ../include .
+ QMAKE_LIBDIR += ../lib
+-LIBS += -lbareoscfg -lbareos
++LIBS += -lbareoscfg -lbareos -lintl
+ LIBTOOL_LINK = @QMAKE_LIBTOOL@ --silent --tag=CXX --mode=link
+ LIBTOOL_INSTALL = @QMAKE_LIBTOOL@ --silent --mode=install
+ QMAKE_LINK = $${LIBTOOL_LINK} $(CXX)
diff --git a/sysutils/bareos-server/files/patch-src-stored-Makefile.in b/sysutils/bareos-server/files/patch-src-stored-Makefile.in
new file mode 100644
index 000000000000..b57961a14e8a
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-src-stored-Makefile.in
@@ -0,0 +1,10 @@
+--- src/stored/Makefile.in 2015-07-25 16:28:12.065608000 -0500
++++ src/stored/Makefile.in 2015-07-25 16:28:34.672920000 -0500
+@@ -243,7 +243,6 @@
+ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bscan $(DESTDIR)$(sbindir)/bscan
+ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) btape $(DESTDIR)$(sbindir)/btape
+ @srcconf=bareos-sd.conf; \
+- $(MKDIR) ${DESTDIR}${confdir}/bareos-sd.d/; \
+ if test -f ${DESTDIR}${confdir}/$$srcconf; then \
+ destconf=$$srcconf.new; \
+ echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
diff --git a/sysutils/bareos-server/files/pkg-deinstall.client.in b/sysutils/bareos-server/files/pkg-deinstall.client.in
new file mode 100644
index 000000000000..3be8c2e4874c
--- /dev/null
+++ b/sysutils/bareos-server/files/pkg-deinstall.client.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin:/usr/sbin
+
+# Note how to delete UID/GID
+USER=%%BAREOS_USER%%
+GROUP=%%BAREOS_GROUP%%
+UID=%%BAREOS_UID%%
+GID=%%BAREOS_UID%%
+BACULA_DIR=%%BAREOS_DIR%%
+
+TMPFILE=/tmp/services-$RANDOM-$$
+
+case "$2" in
+"DEINSTALL")
+ # Delete entries in /etc/services
+ sed -e '/# Bareos port start/,/# Bareos port end/{' \
+ -e 'd' \
+ -e '}' /etc/services > $TMPFILE
+ mv -f $TMPFILE /etc/services
+
+ if [ -d ${BAREOS_DIR} ]; then
+ echo "Check if ${BAREOS_DIR} is empty and delete it to permanently remove the bareos port."
+ fi
+
+ if pw groupshow "${USER}" 2>/dev/null 1>&2; then
+ echo "To delete Bareos group permanently, use 'pw groupdel ${GROUP}'"
+ fi
+ ;;
+esac
diff --git a/sysutils/bareos-server/files/pkg-install.client.in b/sysutils/bareos-server/files/pkg-install.client.in
new file mode 100644
index 000000000000..70ca57028237
--- /dev/null
+++ b/sysutils/bareos-server/files/pkg-install.client.in
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin:/usr/sbin
+
+# Always add lines in /etc/services
+grep -q "bareos-dir" /etc/services
+if [ "$?" != "0" ]; then
+ echo "# Bareos port start
+bareos-dir 9101/tcp #Bareos director daemon
+bareos-fd 9102/tcp #Bareos file daemon
+bareos-sd 9103/tcp #Bareos storage daemon
+# Bareos port end" >> /etc/services
+fi
diff --git a/sysutils/bareos-server/files/pkg-message.client.in b/sysutils/bareos-server/files/pkg-message.client.in
new file mode 100644
index 000000000000..df3e997d5fab
--- /dev/null
+++ b/sysutils/bareos-server/files/pkg-message.client.in
@@ -0,0 +1,8 @@
+################################################################################
+
+bareos client was installed
+
+1) Sample files are installed in %%PREFIX%%/etc/bareos:
+bconsole.conf.sample, bareos-barcodes.sample, bareos-fd.conf.sample
+
+################################################################################
diff --git a/sysutils/bareos-server/files/pkg-message.server.in b/sysutils/bareos-server/files/pkg-message.server.in
new file mode 100644
index 000000000000..8565aff89b83
--- /dev/null
+++ b/sysutils/bareos-server/files/pkg-message.server.in
@@ -0,0 +1,60 @@
+###############################################################################
+
+bareos server was installed
+
+1) Important information about new version of bareos can be found in the
+ ReleaseNotes.
+
+ https://github.com/bareos/bareos/blob/master/README.md
+
+NOTE:
+
+An auto-changer manipulation script based on FreeBSDs
+chio command is included and installed at
+
+ %%PREFIX%%/sbin/chio-bareos
+
+Please have a look at it if you want to use an
+autochanger. You have to configure the usage in
+
+ %%PREFIX%%/etc/bareos/bareos-dir.conf
+
+Take care of correct permissions for changer and
+tape device (e.g. /dev/ch0 and /dev/n[r]sa0) i.e.
+they must be accessible by user bareos.
+
+Due to lack of some features in the FreeBSD tape driver
+implementation you MUST add some OS dependent options to
+the bareos-sd.conf file:
+
+ Hardware End of Medium = no;
+ Backward Space Record = no;
+ Backward Space File = no;
+
+With 2 filemarks at EOT (see man mt):
+ Fast Forward Space File = no;
+ BSF at EOM = yes;
+ TWO EOF = yes;
+
+With 1 filemarks at EOT (see man mt):
+ Fast Forward Space File = yes;
+ BSF at EOM = no;
+ TWO EOF = no;
+
+NOTE: YOU CAN SWITCH EOT model ONLY when starting
+ from scratch with EMPTY tapes.
+
+It is also important that all the scripts accessed
+by RunBeforeJob and RunAfterJob will be executed by
+the user bareos. Check your permissions.
+
+For USB support read the bareos manual. It could be necessary
+to configure/compile a new kernel.
+
+Look at %%PREFIX%%/lib/bareos/update_bareos_tables for
+database update procedure.
+
+If you are using sqlite you need to run the make_sqlite_tables script as
+the bareos user. Do this using 'sudo su -m bareos'.
+
+################################################################################
diff --git a/sysutils/bareos-server/pkg-descr b/sysutils/bareos-server/pkg-descr
new file mode 100644
index 000000000000..1332fabc0d37
--- /dev/null
+++ b/sysutils/bareos-server/pkg-descr
@@ -0,0 +1,6 @@
+Bareos (BackupArchivingRecoveryOpenSourced) is a reliable network open source
+software to backup, archive and restore files from all major operating systems.
+The fork was founded 2010 out of the bacula.org project. The fork has been
+actively developed and many new features have been added.
+
+WWW: http://www.bareos.org/
diff --git a/sysutils/bareos-server/pkg-plist b/sysutils/bareos-server/pkg-plist
new file mode 100644
index 000000000000..0cbd86e2e6ab
--- /dev/null
+++ b/sysutils/bareos-server/pkg-plist
@@ -0,0 +1,97 @@
+@sample(,bareos,640) %%ETCDIR%%/bareos-barcodes.sample
+@group bareos
+@sample(,bareos,) %%ETCDIR%%/bareos-dir.conf.sample
+@group wheel
+@sample(,bareos,) %%ETCDIR%%/bareos-sd.conf.sample
+bin/bregex
+bin/bsmtp
+bin/bwild
+etc/bareos/mtx-changer.conf
+lib/bareos/plugins/BareosDirPluginBaseclass.py
+lib/bareos/plugins/BareosDirWrapper.py
+lib/bareos/plugins/autoxflate-sd.so
+lib/bareos/plugins/bareos-dir-class-plugin.py
+lib/bareos/plugins/bareos-dir.py.template
+lib/bareos/plugins/bareos-sd.py.template
+lib/bareos/plugins/bareos_dir_consts.py
+lib/bareos/plugins/bareos_sd_consts.py
+lib/bareos/scripts/bareos
+lib/bareos/scripts/bareos-config
+lib/bareos/scripts/bareos-config-lib.sh
+lib/bareos/scripts/bareos-ctl-dir
+lib/bareos/scripts/bareos-ctl-fd
+lib/bareos/scripts/bareos-ctl-funcs
+lib/bareos/scripts/bareos-ctl-sd
+lib/bareos/scripts/bareos-explorer
+lib/bareos/scripts/bareos_config
+lib/bareos/scripts/bconsole
+lib/bareos/scripts/btraceback.dbx
+lib/bareos/scripts/btraceback.gdb
+lib/bareos/scripts/btraceback.mdb
+lib/bareos/scripts/create_bareos_database
+lib/bareos/scripts/ddl/creates/%%DBTYPE%%.sql
+lib/bareos/scripts/ddl/drops/%%DBTYPE%%.sql
+lib/bareos/scripts/ddl/grants/%%DBTYPE%%-readonly.sql
+lib/bareos/scripts/ddl/grants/%%DBTYPE%%.sql
+lib/bareos/scripts/ddl/updates/%%DBTYPE%%.10_11.sql
+lib/bareos/scripts/ddl/updates/%%DBTYPE%%.11_12.sql
+lib/bareos/scripts/ddl/updates/%%DBTYPE%%.12_14.sql
+lib/bareos/scripts/ddl/updates/%%DBTYPE%%.14_2001.sql
+lib/bareos/scripts/ddl/updates/%%DBTYPE%%.2001_2002.sql
+lib/bareos/scripts/ddl/updates/%%DBTYPE%%.2002_2003.sql
+lib/bareos/scripts/ddl/versions.map
+lib/bareos/scripts/delete_catalog_backup
+lib/bareos/scripts/disk-changer
+lib/bareos/scripts/drop_bareos_database
+lib/bareos/scripts/drop_bareos_tables
+lib/bareos/scripts/grant_bareos_privileges
+lib/bareos/scripts/make_bareos_tables
+lib/bareos/scripts/make_catalog_backup
+lib/bareos/scripts/make_catalog_backup.pl
+lib/bareos/scripts/mtx-changer
+lib/bareos/scripts/query.sql
+lib/bareos/scripts/update_bareos_tables
+lib/libbareoscats-%%DBTYPE%%-15.2.0.so
+lib/libbareoscats-%%DBTYPE%%.so
+lib/libbareoscats-%%LIB_VERSION%%.so
+lib/libbareoscats.la
+lib/libbareoscats.so
+lib/libbareossd-%%LIB_VERSION%%.so
+lib/libbareossd.la
+lib/libbareossd.so
+lib/libbareossql-%%LIB_VERSION%%.so
+lib/libbareossql.la
+lib/libbareossql.so
+man/man1/bareos-tray-monitor.1.gz
+man/man1/bregex.1.gz
+man/man1/bsmtp.1.gz
+man/man1/bwild.1.gz
+man/man8/bareos-dbcheck.8.gz
+man/man8/bareos-dir.8.gz
+man/man8/bareos-sd.8.gz
+man/man8/bareos.8.gz
+man/man8/bcopy.8.gz
+man/man8/bextract.8.gz
+man/man8/bls.8.gz
+man/man8/bscan.8.gz
+man/man8/btape.8.gz
+man/man8/btraceback.8.gz
+sbin/bareos
+sbin/bareos-dbcheck
+sbin/bareos-dir
+sbin/bareos-sd
+sbin/bcopy
+sbin/bextract
+sbin/bls
+sbin/bpluginfo
+sbin/bregex
+sbin/bscan
+sbin/bscrypto
+sbin/bsmtp
+sbin/btape
+sbin/btraceback
+sbin/bwild
+sbin/chio-bareos
+@dir(bareos,bareos,) %%BAREOS_DIR%%
+@dir(bareos,bareos,) /var/log/bareos
+@dir(bareos,bareos,) /var/run/bareos
diff --git a/sysutils/bareos-server/pkg-plist.client b/sysutils/bareos-server/pkg-plist.client
new file mode 100644
index 000000000000..70e8dc6aace9
--- /dev/null
+++ b/sysutils/bareos-server/pkg-plist.client
@@ -0,0 +1,34 @@
+@sample %%ETCDIR%%/bareos-fd.conf.sample
+@group bareos
+@sample %%ETCDIR%%/bconsole.conf.sample
+@group wheel
+lib/libbareos.la
+lib/libbareos.so
+lib/libbareos-15.2.0.so
+lib/libbareoscfg.la
+lib/libbareoscfg.so
+lib/libbareoscfg-15.2.0.so
+lib/libbareosfind.la
+lib/libbareosfind.so
+lib/libbareosfind-15.2.0.so
+lib/bareos/plugins/BareosFdPluginBaseclass.py
+lib/bareos/plugins/BareosFdPluginLocalFileset.py
+lib/bareos/plugins/BareosFdWrapper.py
+lib/bareos/plugins/bareos-fd-local-fileset.py
+lib/bareos/plugins/bareos-fd-mock-test.py
+lib/bareos/plugins/bareos_fd_consts.py
+lib/bareos/plugins/bareos-fd.py.template
+lib/bareos/plugins/bpipe-fd.so
+man/man8/bareos-fd.8.gz
+man/man1/bconsole.1.gz
+sbin/bareos-fd
+@group bareos
+sbin/bconsole
+bin/bconsole
+@group wheel
+@dir(bareos,bareos,) %%BAREOS_DIR%%
+@dir(,bareos,) %%ETCDIR%%
+@dir lib/bareos/plugins
+@dir lib/bareos/scripts
+@dir /var/log/bareos
+