aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p
diff options
context:
space:
mode:
authorlwhsu <lwhsu@FreeBSD.org>2014-06-29 18:55:52 +0800
committerlwhsu <lwhsu@FreeBSD.org>2014-06-29 18:55:52 +0800
commit486497076f2b9ecc52dcfff2f523ee31664cebe5 (patch)
treed22c7bf6e336f9f6a229c1769fd2d306588d0bcf /net-p2p
parentde0b2534a03e652d4607fbf01b75de86a2412a2b (diff)
downloadfreebsd-ports-gnome-486497076f2b9ecc52dcfff2f523ee31664cebe5.tar.gz
freebsd-ports-gnome-486497076f2b9ecc52dcfff2f523ee31664cebe5.tar.zst
freebsd-ports-gnome-486497076f2b9ecc52dcfff2f523ee31664cebe5.zip
Add btsync, distributed peer-to-peer file syncing application.
PR: 187360 Submitted by: Joshua Ruehlig <joshruehlig@gmail.com>
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/Makefile1
-rw-r--r--net-p2p/btsync/Makefile50
-rw-r--r--net-p2p/btsync/distinfo4
-rw-r--r--net-p2p/btsync/files/btsync.in39
-rw-r--r--net-p2p/btsync/files/pkg-message.in15
-rw-r--r--net-p2p/btsync/pkg-descr6
-rw-r--r--net-p2p/btsync/pkg-plist5
7 files changed, 120 insertions, 0 deletions
diff --git a/net-p2p/Makefile b/net-p2p/Makefile
index 8e9674179ca0..7759e798f062 100644
--- a/net-p2p/Makefile
+++ b/net-p2p/Makefile
@@ -14,6 +14,7 @@
SUBDIR += bnbt
SUBDIR += btpd
SUBDIR += btqueue
+ SUBDIR += btsync
SUBDIR += cdonkey
SUBDIR += cpuminer
SUBDIR += createtorrent
diff --git a/net-p2p/btsync/Makefile b/net-p2p/btsync/Makefile
new file mode 100644
index 000000000000..be9092eee012
--- /dev/null
+++ b/net-p2p/btsync/Makefile
@@ -0,0 +1,50 @@
+# $FreeBSD$
+
+PORTNAME= btsync
+PORTVERSION= 1.3.106
+CATEGORIES= net-p2p
+MASTER_SITES= http://syncapp.bittorrent.com/${PORTVERSION}/
+DISTNAME= ${PORTNAME}_freebsd_${CONFIG_ARCH}-${PORTVERSION}
+
+MAINTAINER= joshruehlig@gmail.com
+COMMENT= Distributed peer-to-peer file syncing application
+
+LICENSE= EULA
+LICENSE_NAME= BitTorrent Sync
+LICENSE_FILE= ${WRKSRC}/LICENSE.TXT
+LICENSE_PERMS= auto-accept
+
+NO_WRKSUBDIR= yes
+NO_BUILD= yes
+ONLY_FOR_ARCHES= amd64 i386
+ONLY_FOR_ARCHES_REASON= It is a binary-only program. Source code not available.
+
+PLIST_SUB= PORTNAME=${PORTNAME} USER=${USERS} GROUP=${GROUPS}
+SUB_LIST= PORTNAME=${PORTNAME} USER=${USERS} GROUP=${GROUPS}
+SUB_FILES= pkg-message
+USE_RC_SUBR= ${PORTNAME}
+
+USERS= ${PORTNAME}
+GROUPS= ${USERS}
+
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64"
+CONFIG_ARCH= x64
+.else
+CONFIG_ARCH= ${ARCH}
+.endif
+
+post-extract:
+ ${MKDIR} ${WRKSRC}/temp
+ ${MV} ${WRKSRC}/${PORTNAME} ${WRKSRC}/temp
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/temp/btsync ${STAGEDIR}${PREFIX}/bin
+ ${WRKSRC}/temp/btsync --dump-sample-config > ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
+ ${REINPLACE_CMD} -e 's;\(^ *"storage_path" *: *\)"/.*",;\1"/var/db/${PORTNAME}",;' ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
+
+post-install:
+ ${MKDIR} ${STAGEDIR}/var/db/btsync
+
+.include <bsd.port.post.mk>
diff --git a/net-p2p/btsync/distinfo b/net-p2p/btsync/distinfo
new file mode 100644
index 000000000000..54fea93b3fa4
--- /dev/null
+++ b/net-p2p/btsync/distinfo
@@ -0,0 +1,4 @@
+SHA256 (btsync_freebsd_x64-1.3.106.tar.gz) = 1d638d52a17e01de2a7e7b4ef97de8b5cdaf0b75690af30a3cf2104e92e178ee
+SIZE (btsync_freebsd_x64-1.3.106.tar.gz) = 3374908
+SHA256 (btsync_freebsd_i386-1.3.106.tar.gz) = 10c9c860b9e90af1d2be03f377b70273355439d21972a66a16651eb24cb3290f
+SIZE (btsync_freebsd_i386-1.3.106.tar.gz) = 3279543
diff --git a/net-p2p/btsync/files/btsync.in b/net-p2p/btsync/files/btsync.in
new file mode 100644
index 000000000000..d64b0b788e67
--- /dev/null
+++ b/net-p2p/btsync/files/btsync.in
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: %%PORTNAME%%
+# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# %%PORTNAME%%_enable (bool): Set to NO by default.
+# Set it to YES to enable it.
+# %%PORTNAME%%_user: The user account %%PORTNAME%% 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.
+# %%PORTNAME%%_group: The group account %%PORTNAME%% 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.
+# %%PORTNAME%%_data_dir: Directory where %%PORTNAME%% configuration
+# data is stored.
+# Default: /var/db/%%PORTNAME%%
+
+. /etc/rc.subr
+name="%%PORTNAME%%"
+rcvar="${name}_enable"
+load_rc_config $name
+
+: ${%%PORTNAME%%_enable:="NO"}
+: ${%%PORTNAME%%_user:="%%USER%%"}
+: ${%%PORTNAME%%_group:="%%GROUP%%"}
+: ${%%PORTNAME%%_data_dir:="/var/db/%%PORTNAME%%"}
+
+pidfile="$btsync_data_dir/sync.pid"
+command="%%PREFIX%%/bin/btsync"
+command_args="--config %%PREFIX%%/etc/%%PORTNAME%%.conf"
+
+run_rc_command "$1"
diff --git a/net-p2p/btsync/files/pkg-message.in b/net-p2p/btsync/files/pkg-message.in
new file mode 100644
index 000000000000..d232ca4f340f
--- /dev/null
+++ b/net-p2p/btsync/files/pkg-message.in
@@ -0,0 +1,15 @@
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+net-p2p/%%PORTNAME%% includes an RC script:
+%%PREFIX%%/etc/rc.d/%%PORTNAME%%
+
+TO START BTSYNC ON BOOT:
+echo 'btsync_enable="YES"' >> /etc/rc.conf
+
+START MANUALLY:
+%%PREFIX%%/etc/rc.d/%%PORTNAME%% start
+
+Once started, visit the following to configure:
+http://localhost:8888/
+
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/net-p2p/btsync/pkg-descr b/net-p2p/btsync/pkg-descr
new file mode 100644
index 000000000000..0a836f0c8b19
--- /dev/null
+++ b/net-p2p/btsync/pkg-descr
@@ -0,0 +1,6 @@
+Bittorrent 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: http://www.bittorrent.com/sync
diff --git a/net-p2p/btsync/pkg-plist b/net-p2p/btsync/pkg-plist
new file mode 100644
index 000000000000..bd5951bd1467
--- /dev/null
+++ b/net-p2p/btsync/pkg-plist
@@ -0,0 +1,5 @@
+@unexec %D/etc/rc.d/%%PORTNAME%% forcestop 2>/dev/null || true
+bin/btsync
+@sample etc/%%PORTNAME%%.conf.sample
+@unexec rmdir /var/db/btsync 2>/dev/null || true
+@exec install -d -o %%USER%% -g %%GROUP%% /var/db/%%PORTNAME%%