aboutsummaryrefslogtreecommitdiff
path: root/net-p2p/rslsync
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p/rslsync')
-rw-r--r--net-p2p/rslsync/Makefile49
-rw-r--r--net-p2p/rslsync/distinfo5
-rw-r--r--net-p2p/rslsync/files/pkg-message.in15
-rw-r--r--net-p2p/rslsync/files/rslsync.in43
-rw-r--r--net-p2p/rslsync/pkg-descr6
-rw-r--r--net-p2p/rslsync/pkg-plist3
6 files changed, 121 insertions, 0 deletions
diff --git a/net-p2p/rslsync/Makefile b/net-p2p/rslsync/Makefile
new file mode 100644
index 000000000000..048a76d98bcb
--- /dev/null
+++ b/net-p2p/rslsync/Makefile
@@ -0,0 +1,49 @@
+# $FreeBSD$
+
+PORTNAME= rslsync
+PORTVERSION= 2.5.12
+CATEGORIES= net-p2p
+MASTER_SITES= https://download-cdn.resilio.com/${PORTVERSION}/FreeBSD-${CONFIG_ARCH}/ \
+ http://download-cdn.resilio.com/${PORTVERSION}/FreeBSD-${CONFIG_ARCH}/
+DISTNAME= resilio-sync_freebsd_${CONFIG_ARCH}
+DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
+
+MAINTAINER= joshruehlig@gmail.com
+COMMENT= Distributed peer-to-peer file syncing application
+
+LICENSE= EULA
+LICENSE_NAME= Resilio Sync
+LICENSE_FILE= ${WRKSRC}/LICENSE.TXT
+LICENSE_PERMS= auto-accept
+
+NO_WRKSUBDIR= yes
+ONLY_FOR_ARCHS= amd64 i386
+ONLY_FOR_ARCHS_REASON= It is a binary-only program. Source code not available.
+
+PLIST_SUB= USER=${USERS} GROUP=${GROUPS}
+SUB_LIST= USER=${USERS} GROUP=${GROUPS}
+SUB_FILES= pkg-message
+USE_RC_SUBR= rslsync
+
+USERS= rslsync
+GROUPS= ${USERS}
+
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64"
+CONFIG_ARCH= x64
+.else
+CONFIG_ARCH= ${ARCH}
+.endif
+
+do-build:
+ ${WRKSRC}/rslsync --dump-sample-config > ${WRKSRC}/rslsync.conf.sample
+ ${REINPLACE_CMD} -e 's;^//\([[:space:]]*"storage_path"[[:space:]]*:[[:space:]]*\)"/.*",$$;\1"/var/db/rslsync",;' ${WRKSRC}/rslsync.conf.sample
+ ${REINPLACE_CMD} -e 's;^//\([[:space:]]*"pid_file"[[:space:]]*:[[:space:]]*\)"/.*",$$;\1"/var/run/rslsync/rslsync.pid",;' ${WRKSRC}/rslsync.conf.sample
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/rslsync ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/rslsync.conf.sample ${STAGEDIR}${PREFIX}/etc
+ ${MKDIR} ${STAGEDIR}/var/db/rslsync
+
+.include <bsd.port.post.mk>
diff --git a/net-p2p/rslsync/distinfo b/net-p2p/rslsync/distinfo
new file mode 100644
index 000000000000..538b3491e2d9
--- /dev/null
+++ b/net-p2p/rslsync/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1526266298
+SHA256 (rslsync-2.5.12/resilio-sync_freebsd_i386.tar.gz) = 90aec753fb41c55c3344047ba6c94a7012642ff9eff9e19a7460f9cdbe303454
+SIZE (rslsync-2.5.12/resilio-sync_freebsd_i386.tar.gz) = 10960760
+SHA256 (rslsync-2.5.12/resilio-sync_freebsd_x64.tar.gz) = 32462b30f706791da1997021f7a51d0b42497cb076760ae9937f37836762b4ba
+SIZE (rslsync-2.5.12/resilio-sync_freebsd_x64.tar.gz) = 11138832
diff --git a/net-p2p/rslsync/files/pkg-message.in b/net-p2p/rslsync/files/pkg-message.in
new file mode 100644
index 000000000000..ea5383906b8c
--- /dev/null
+++ b/net-p2p/rslsync/files/pkg-message.in
@@ -0,0 +1,15 @@
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+net-p2p/rslsync includes an RC script:
+%%PREFIX%%/etc/rc.d/rslsync
+
+TO START ON BOOT:
+# sysrc rslsync_enable=YES
+
+START MANUALLY:
+# service rslsync start
+
+Once started, visit the following to configure:
+http://localhost:8888/
+
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/net-p2p/rslsync/files/rslsync.in b/net-p2p/rslsync/files/rslsync.in
new file mode 100644
index 000000000000..1111f36794e2
--- /dev/null
+++ b/net-p2p/rslsync/files/rslsync.in
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: rslsync
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# rslsync_enable (bool): Set to NO by default.
+# Set it to YES to enable it.
+# rslsync_user: The user account rslsync daemon runs as
+# what you want it to be. It uses '%%USER%%'
+# user by default. Do not sets it as empty or it
+# will run as root.
+# rslsync_group: The group account rslsync daemon runs as
+# what you want it to be. It uses '%%GROUP%%'
+# group by default. Do not sets it as empty or it
+# will run as wheel.
+
+. /etc/rc.subr
+name="rslsync"
+rcvar="${name}_enable"
+load_rc_config ${name}
+
+: ${rslsync_enable:="NO"}
+: ${rslsync_user:="%%USER%%"}
+: ${rslsync_group:="%%GROUP%%"}
+
+pidfile="/var/run/rslsync/rslsync.pid"
+command="%%PREFIX%%/bin/rslsync"
+command_args="--config %%PREFIX%%/etc/rslsync.conf"
+
+start_precmd=rslsync_prestart
+rslsync_prestart() {
+ if [ ! -d ${pidfile%/*} ]; then
+ install -d -o ${rslsync_user} -g ${rslsync_group} ${pidfile%/*}
+ fi
+}
+
+run_rc_command "$1"
diff --git a/net-p2p/rslsync/pkg-descr b/net-p2p/rslsync/pkg-descr
new file mode 100644
index 000000000000..e2d2132246c3
--- /dev/null
+++ b/net-p2p/rslsync/pkg-descr
@@ -0,0 +1,6 @@
+Resilio Sync is a way to automatically sync files via a secure,
+distributed technology. This allows users to share, sync and copy
+data between computers and, optionally, share subsets of their data
+with other people.
+
+WWW: https://www.resilio.com/
diff --git a/net-p2p/rslsync/pkg-plist b/net-p2p/rslsync/pkg-plist
new file mode 100644
index 000000000000..f13c80edbf78
--- /dev/null
+++ b/net-p2p/rslsync/pkg-plist
@@ -0,0 +1,3 @@
+bin/rslsync
+@sample etc/rslsync.conf.sample
+@dir(%%USER%%,%%GROUP%%,) /var/db/rslsync