Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Mar 2014 01:18:01 GMT
From:      Joshua Ruehlig <joshruehlig@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/187360: new port: net-p2p/btsync
Message-ID:  <201403080118.s281I1Kh040313@cgiserv.freebsd.org>
Resent-Message-ID: <201403080120.s281K1Vs002794@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         187360
>Category:       ports
>Synopsis:       new port: net-p2p/btsync
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 08 01:20:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Joshua Ruehlig
>Release:        FreeBSD 9.2
>Organization:
>Environment:
FreeBSD freebsd-ports 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
This is a copy of the below change-request with a few updates to the 'shar' file.
http://www.freebsd.org/cgi/query-pr.cgi?pr=179724
####

Please find attached my port of the Bittorrent Sync program, provided by Bittorrent Labs, http://labs.bittorrent.com/experiments/sync.html

This program allows the user to sync multiple files/directories between machines using the bittorrent peer-to-peer protocol.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	btsync
#	btsync/files
#	btsync/files/pkg-message.in
#	btsync/files/btsync.in
#	btsync/pkg-plist
#	btsync/pkg-descr
#	btsync/distinfo
#	btsync/Makefile
#
echo c - btsync
mkdir -p btsync > /dev/null 2>&1
echo c - btsync/files
mkdir -p btsync/files > /dev/null 2>&1
echo x - btsync/files/pkg-message.in
sed 's/^X//' >btsync/files/pkg-message.in << '95ce5a46d8be569ce093b7533a255508'
X* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
X
Xnet-p2p/btsync includes an RC script:
X%%PREFIX%%/etc/rc.d/%%PORTNAME%%
X
XTO START BTSYNC ON BOOT:
Xecho 'btsync_enable="YES"' >> /etc/rc.conf
X
XSTART MANUALLY:
X%%PREFIX%%/etc/rc.d/%%PORTNAME%% start
X
XOnce started, visit the following to configure:
Xhttp://localhost:8888/
X
X* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
95ce5a46d8be569ce093b7533a255508
echo x - btsync/files/btsync.in
sed 's/^X//' >btsync/files/btsync.in << '64819afaeed23226ed46a77814e11309'
X#!/bin/sh
X#
X# PROVIDE: %%PORTNAME%%
X# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv
X#
X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
X# to enable this service:
X#
X# btsync_enable (bool):	Set to NO by default.
X#			Set it to YES to enable it.
X# btsync_data_dir:	Directory where %%PORTNAME%% configuration
X#			data is stored.
X#			Default: %%PREFIX%%/etc/%%PORTNAME%%
X# btsync_user:		The user account %%PORTNAME%% daemon runs as what
X#			you want it to be. It uses '%%USER%%' user by
X#			default. Do not sets it as empty or it will run
X#			as root.
X# btsync_group:		The group account %%PORTNAME%% daemon runs as what
X#			you want it to be. It uses '%%GROUP%%' group by
X#			default. Do not sets it as empty or it will run
X#			as wheel.
X
X. /etc/rc.subr
Xname="%%PORTNAME%%"
Xrcvar="${name}_enable"
Xload_rc_config $name
X
X: ${btsync_enable:="NO"}
X: ${btsync_user:="%%USER%%"}
X: ${btsyncr_group:="%%GROUP%%"}
X: ${btsync_data_dir:="%%PREFIX%%/etc/%%PORTNAME%%"}
X
Xpidfile="$btsync_data_dir/sync.pid"
Xcommand="%%PREFIX%%/bin/btsync"
Xcommand_args="--config $btsync_data_dir/config.ini"
X
Xrun_rc_command "$1"
64819afaeed23226ed46a77814e11309
echo x - btsync/pkg-plist
sed 's/^X//' >btsync/pkg-plist << '30d2f526778ca707f8632c3faf0d8368'
X@unexec %D/etc/rc.d/%%PORTNAME%% forcestop 2>/dev/null || true
X@unexec if cmp -s %D/etc/%%PORTNAME%%/config.ini.sample %D/etc/%%PORTNAME%%/config.ini; then rm -f %D/etc/%%PORTNAME%%/config.ini; fi
X%%ETCDIR%%/config.ini.sample
X@dirrmtry %%ETCDIR%%
X@exec if [ ! -f %D/etc/%%PORTNAME%%/config.ini ] ; then cp -p %D/etc/%%PORTNAME%%/config.ini.sample %D/etc/%%PORTNAME%%/config.ini; fi
X@exec chown -R %%USER%%:%%GROUP%% %D/etc/%%PORTNAME%%
Xbin/btsync
30d2f526778ca707f8632c3faf0d8368
echo x - btsync/pkg-descr
sed 's/^X//' >btsync/pkg-descr << '92010dae403596fe833d9444b5125467'
XBittorrent 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.
X
XWWW: http://www.bittorrent.com/sync
92010dae403596fe833d9444b5125467
echo x - btsync/distinfo
sed 's/^X//' >btsync/distinfo << 'a180c56fd5f147d80bb576e1c1853574'
XSHA256 (btsync_freebsd_x64-1.2.91.tar.gz) = 03146aa9804343d0d97b3cfb5fe758b3cfd52a03101a42668aff0afcfb629202
XSIZE (btsync_freebsd_x64-1.2.91.tar.gz) = 1988531
a180c56fd5f147d80bb576e1c1853574
echo x - btsync/Makefile
sed 's/^X//' >btsync/Makefile << '3997951ecc0e65e1631b2e94c7af9cc5'
X# $FreeBSD$
X
XPORTNAME=	btsync
XPORTVERSION=	1.2.91
XCATEGORIES=	net-p2p
XMASTER_SITES=   http://syncapp.bittorrent.com/${PORTVERSION}/
XDISTNAME=       ${PORTNAME}_freebsd_${CONFIG_ARCH}-${PORTVERSION}
X
XMAINTAINER=     joshruehlig@gmail.com
XCOMMENT=        Distributed peer-to-peer file syncing application.
X
X.include <bsd.port.options.mk>
X.if ${ARCH} == "amd64"
XCONFIG_ARCH=	x64
X.else
XCONFIG_ARCH=	${ARCH}
X.endif
X
XLICENSE=	EULA
XLICENSE_NAME=	BitTorrent Sync
XLICENSE_FILE=	${WRKSRC}/LICENSE.TXT
XLICENSE_PERMS=	# Any copying or redistribution of the Software is prohibited.
X
X
XNO_WRKSUBDIR=	yes
XNO_BUILD=	yes
XONLY_FOR_ARCHES=	amd64 i386
XONLY_FOR_ARCHES_REASON=	It is a binary-only program. Source code not available.
X
XPLIST_SUB=	PORTNAME=${PORTNAME} USER=${USERS} GROUP=${GROUPS}
XSUB_LIST=	PORTNAME=${PORTNAME} USER=${USERS} GROUP=${GROUPS}
XSUB_FILES=	pkg-message
XUSE_RC_SUBR=	${PORTNAME}
X
XUSERS=		${PORTNAME}
XGROUPS=		${PORTNAME}
X
X.include <bsd.port.pre.mk>
X
Xpost-extract:
X	${MKDIR} ${WRKSRC}/temp
X	${MV} ${WRKSRC}/${PORTNAME} ${WRKSRC}/temp
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/temp/btsync ${STAGEDIR}${PREFIX}/bin
X	${INSTALL} -d ${STAGEDIR}/${ETCDIR}
X	${WRKSRC}/temp/btsync --dump-sample-config > ${STAGEDIR}/${ETCDIR}/config.ini.sample
X	@${REINPLACE_CMD} -e 's!/home/user/.sync!${ETCDIR}!' ${STAGEDIR}/${ETCDIR}/config.ini.sample
X
X.include <bsd.port.post.mk>
3997951ecc0e65e1631b2e94c7af9cc5
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403080118.s281I1Kh040313>