Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Sep 2014 19:02:30 +0000 (UTC)
From:      Pawel Pekala <pawel@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r368676 - in head/net-p2p/btsync: . files
Message-ID:  <201409201902.s8KJ2Ukn062033@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pawel
Date: Sat Sep 20 19:02:30 2014
New Revision: 368676
URL: http://svnweb.freebsd.org/changeset/ports/368676
QAT: https://qat.redports.org/buildarchive/r368676/

Log:
  - Update to version 1.4.75
  - Move pidfile to /var/run/btsync dir
  - Use %%PORTNAME%% subs in rc file
  
  PR:		ports/193676
  Submitted by:	maintainer

Modified:
  head/net-p2p/btsync/Makefile
  head/net-p2p/btsync/distinfo
  head/net-p2p/btsync/files/btsync.in
  head/net-p2p/btsync/pkg-plist

Modified: head/net-p2p/btsync/Makefile
==============================================================================
--- head/net-p2p/btsync/Makefile	Sat Sep 20 19:01:46 2014	(r368675)
+++ head/net-p2p/btsync/Makefile	Sat Sep 20 19:02:30 2014	(r368676)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	btsync
-PORTVERSION=	1.3.109
+PORTVERSION=	1.4.75
 CATEGORIES=	net-p2p
 MASTER_SITES=	http://syncapp.bittorrent.com/${PORTVERSION}/
 DISTNAME=	${PORTNAME}_freebsd_${CONFIG_ARCH}-${PORTVERSION}
@@ -42,9 +42,10 @@ post-extract:
 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
+	${REINPLACE_CMD} -e 's;^//\( *"storage_path" *: *\)"/.*",;\1"/var/db/${PORTNAME}",;' ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
+	${REINPLACE_CMD} -e 's;^//\( *"pid_file" *: *"/var/run/${PORTNAME}/${PORTNAME}.pid",\);\1;' ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
 
 post-install:
-	${MKDIR} ${STAGEDIR}/var/db/btsync
+	${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}
 
 .include <bsd.port.post.mk>

Modified: head/net-p2p/btsync/distinfo
==============================================================================
--- head/net-p2p/btsync/distinfo	Sat Sep 20 19:01:46 2014	(r368675)
+++ head/net-p2p/btsync/distinfo	Sat Sep 20 19:02:30 2014	(r368676)
@@ -1,4 +1,4 @@
-SHA256 (btsync_freebsd_i386-1.3.109.tar.gz) = b451949b677d3aa006199164a7d7f9f799eb5b7758f96b0f2a5bbbb84a9a4aad
-SIZE (btsync_freebsd_i386-1.3.109.tar.gz) = 3279348
-SHA256 (btsync_freebsd_x64-1.3.109.tar.gz) = 31599871449dca3fbc464422fd31440d730cfb0ad11f05321e482ae7ed7f47df
-SIZE (btsync_freebsd_x64-1.3.109.tar.gz) = 3374894
+SHA256 (btsync_freebsd_i386-1.4.75.tar.gz) = 88262978b0c68406be93d0e98e9ffaff6fe73840195c63e43a846810eaa05e48
+SIZE (btsync_freebsd_i386-1.4.75.tar.gz) = 3543603
+SHA256 (btsync_freebsd_x64-1.4.75.tar.gz) = 3772d82c865a462ab47a8fad56e924a47eb0d0983aa23705d4a59ae3ad33c99b
+SIZE (btsync_freebsd_x64-1.4.75.tar.gz) = 3688773

Modified: head/net-p2p/btsync/files/btsync.in
==============================================================================
--- head/net-p2p/btsync/files/btsync.in	Sat Sep 20 19:01:46 2014	(r368675)
+++ head/net-p2p/btsync/files/btsync.in	Sat Sep 20 19:02:30 2014	(r368676)
@@ -18,9 +18,6 @@
 #                               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%%"
@@ -30,10 +27,16 @@ 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"
+pidfile="/var/run/%%PORTNAME%%/%%PORTNAME%%.pid"
 command="%%PREFIX%%/bin/btsync"
 command_args="--config %%PREFIX%%/etc/%%PORTNAME%%.conf"
 
+start_precmd=%%PORTNAME%%_prestart
+%%PORTNAME%%_prestart(){
+	if [ ! -d ${pidfile%/*} ]; then
+		install -d -o $%%PORTNAME%%_user -g $%%PORTNAME%%_group ${pidfile%/*}
+	fi
+}
+
 run_rc_command "$1"

Modified: head/net-p2p/btsync/pkg-plist
==============================================================================
--- head/net-p2p/btsync/pkg-plist	Sat Sep 20 19:01:46 2014	(r368675)
+++ head/net-p2p/btsync/pkg-plist	Sat Sep 20 19:02:30 2014	(r368676)
@@ -1,5 +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
+@unexec rmdir /var/db/%%PORTNAME%% 2>/dev/null || true
 @exec install -d -o %%USER%% -g %%GROUP%% /var/db/%%PORTNAME%%



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