aboutsummaryrefslogtreecommitdiff
path: root/sysutils/boxbackup
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/boxbackup')
-rw-r--r--sysutils/boxbackup/Makefile51
-rw-r--r--sysutils/boxbackup/files/bbstored.in2
-rw-r--r--sysutils/boxbackup/files/pkg-message.client4
-rw-r--r--sysutils/boxbackup/files/pkg-message.in13
-rw-r--r--sysutils/boxbackup/files/pkg-message.server.in8
5 files changed, 39 insertions, 39 deletions
diff --git a/sysutils/boxbackup/Makefile b/sysutils/boxbackup/Makefile
index 0e754b99041b..b47ef0535b39 100644
--- a/sysutils/boxbackup/Makefile
+++ b/sysutils/boxbackup/Makefile
@@ -26,27 +26,29 @@ MAKE_JOBS_UNSAFE=yes
CONFIGURE_ARGS+=--sysconfdir=${PREFIX}/etc
-PKGMESSAGE= ${WRKDIR}/pkg-message
+SUB_FILES= pkg-message
-OPTIONS= CLIENT "Install the bbackupd client" On \
- SERVER "Install the bbstored server" On \
- GNUREADLINE "Enable the use of GNU readline" Off
+OPTIONS_DEFINE= READLINE
-.include <bsd.port.pre.mk>
+OPTIONS_MULTI= FLAVOUR
+OPTIONS_MULTI_FLAVOUR= CLIENT SERVER
-.if defined(WITH_GNUREADLINE)
-CONFIGURE_ARGS+=--enable-gnu-readline
-.endif
+CLIENT_DESC= Install the bbackupd client
+SERVER_DESC= Install the bbstored server
+
+OPTIONS_DEFAULT=CLIENT SERVER
+
+.include <bsd.port.options.mk>
-.if defined(WITHOUT_CLIENT) && defined(WITHOUT_SERVER)
-IGNORE= requires at least CLIENT or SERVER to be defined.\
- Please 'make config' again
+.if ${PORT_OPTIONS:MREADLINE}
+CONFIGURE_ARGS+=--enable-gnu-readline
.endif
MANCOMPRESSED= yes
-.if defined(WITH_CLIENT)
+.if ${PORT_OPTIONS:MCLIENT}
USE_RC_SUBR+= bbackupd
PLIST_SUB+= CLIENT=""
+SUB_LIST+= CLIENT=""
ALL_TARGET+= build-backup-client
INSTALL_TARGET+=install-backup-client
MAN5+= bbackupd.conf.5
@@ -54,26 +56,29 @@ MAN8+= bbackupd.8 bbackupctl.8 bbackupd-config.8 bbackupquery.8
SUB_FILES+= 999.boxbackup
.else
PLIST_SUB+= CLIENT="@comment "
+SUB_LIST+= CLIENT="@comment "
.endif
-.if defined(WITH_SERVER)
+.if ${PORT_OPTIONS:MSERVER}
USE_RC_SUBR+= bbstored
USERS+= _bbstored
GROUPS+= _bbstored
PLIST_SUB+= SERVER=""
+SUB_LIST+= SERVER=""
ALL_TARGET+= build-backup-server
INSTALL_TARGET+=install-backup-server
MAN5+= bbstored.conf.5 raidfile.conf.5
MAN8+= bbstored.8 bbstoreaccounts.8 bbstored-certs.8 bbstored-config.8 raidfile-config.8
.else
PLIST_SUB+= SERVER="@comment "
+SUB_LIST+= SERVER="@comment "
.endif
-.if defined(WITHOUT_CLIENT)
+.if ! ${PORT_OPTIONS:MCLIENT}
# if this is a server-only install, CONFLICT with an install of the CLIENT or both
CONFLICTS= boxbackup-client-[0-9]* boxbackup-[0-9]*
CLIENT_OR_SERVER=-server
-.elif defined(WITHOUT_SERVER)
+.elif ! ${PORT_OPTIONS:MSERVER}
# if this is a client-only install, CONFLICT with an install of the SERVER or both
CONFLICTS= boxbackup-server-[0-9]* boxbackup-[0-9]*
CLIENT_OR_SERVER=-client
@@ -85,24 +90,18 @@ CONFLICTS= boxbackup-server-[0-9]* boxbackup-client-[0-9]*
post-patch:
@${REINPLACE_CMD} -e '/html/d' ${WRKSRC}/parcels.txt
-.if !defined(WITHOUT_CLIENT)
- @${CAT} ${FILESDIR}/pkg-message.client >> ${PKGMESSAGE}
-.endif
-.if !defined(WITHOUT_SERVER)
- @${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
- ${FILESDIR}/pkg-message.server.in >> ${PKGMESSAGE}
-.endif
post-configure:
- @${REINPLACE_CMD} -e '/share.doc.boxbackup/d' ${WRKSRC}/parcels/scripts/install-backup-*
+ @${REINPLACE_CMD} -e '/share.doc.boxbackup/d' \
+ ${WRKSRC}/parcels/scripts/install-backup-*
post-install:
-.if !defined(WITHOUT_CLIENT)
+.if ${PORT_OPTIONS:MCLIENT}
@${MKDIR} -m 0700 ${PREFIX}/etc/boxbackup/bbackupd
@${MKDIR} ${PREFIX}/etc/periodic/monthly
${INSTALL_SCRIPT} ${WRKDIR}/999.boxbackup ${PREFIX}/etc/periodic/monthly
.endif
-.if !defined(WITHOUT_SERVER)
+.if ${PORT_OPTIONS:MSERVER}
@${MKDIR} -m 0700 ${PREFIX}/etc/boxbackup/bbstored
.endif
@${CAT} ${PKGMESSAGE}
@@ -111,4 +110,4 @@ test:
@${ECHO_CMD} "===> Running tests"
@${MAKE} -C ${WRKSRC} test
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/sysutils/boxbackup/files/bbstored.in b/sysutils/boxbackup/files/bbstored.in
index d150cf686b74..5a4ded4312bd 100644
--- a/sysutils/boxbackup/files/bbstored.in
+++ b/sysutils/boxbackup/files/bbstored.in
@@ -18,7 +18,7 @@ rcvar=bbstored_enable
load_rc_config $name
: ${bbstored_enable:="NO"}
-: ${bbstored_flags:="%%PREFIX%%/etc/boxbackup/bbstored.conf"}
+: ${bbstored_flags:="%%ETCDIR%%/bbstored.conf"}
pidfile=${bbstored_pidfile:-"/var/run/bbstored.pid"}
diff --git a/sysutils/boxbackup/files/pkg-message.client b/sysutils/boxbackup/files/pkg-message.client
deleted file mode 100644
index e804b44d94b9..000000000000
--- a/sysutils/boxbackup/files/pkg-message.client
+++ /dev/null
@@ -1,4 +0,0 @@
-
-To run bbackupd at startup, add bbackupd_enable="YES" to /etc/rc.conf
-Please see http://www.boxbackup.org/client.html for client configuration
-options
diff --git a/sysutils/boxbackup/files/pkg-message.in b/sysutils/boxbackup/files/pkg-message.in
new file mode 100644
index 000000000000..ee4ff003ca2a
--- /dev/null
+++ b/sysutils/boxbackup/files/pkg-message.in
@@ -0,0 +1,13 @@
+%%SERVER%%
+%%SERVER%%To run bbstored at startup, add bbstored_enable="YES" to /etc/rc.conf
+%%SERVER%%Please see http://www.boxbackup.org/server.html for server
+%%SERVER%%configuration options
+
+The default location of configuration files changed from
+%%PREFIX%%/etc/box to %%ETCDIR%%, if you are upgrading then run
+ mv %%PREFIX%%/etc/box %%ETCDIR%%
+
+%%CLIENT%%To run bbackupd at startup, add bbackupd_enable="YES" to /etc/rc.conf
+%%CLIENT%%Please see http://www.boxbackup.org/client.html for client
+%%CLIENT%%configuration options
+%%CLIENT%%
diff --git a/sysutils/boxbackup/files/pkg-message.server.in b/sysutils/boxbackup/files/pkg-message.server.in
deleted file mode 100644
index 94a1c35f64fe..000000000000
--- a/sysutils/boxbackup/files/pkg-message.server.in
+++ /dev/null
@@ -1,8 +0,0 @@
-
-To run bbstored at startup, add bbstored_enable="YES" to /etc/rc.conf
-Please see http://www.boxbackup.org/server.html for server configuration
-options
-
-The default location of configuration files changed from %%PREFIX%%/etc/box to
-%%PREFIX%%/etc/boxbackup, if you are upgrading then run
- mv %%PREFIX%%/etc/box %%PREFIX%%/etc/boxbackup