diff options
author | pawel <pawel@FreeBSD.org> | 2014-09-21 03:02:30 +0800 |
---|---|---|
committer | pawel <pawel@FreeBSD.org> | 2014-09-21 03:02:30 +0800 |
commit | 432d71843773e6244d49cdd013f523d010297854 (patch) | |
tree | d90c4adaacb88462f6837df8286eb2138a2946fe /net-p2p | |
parent | d7750d8ff7d1ca14319c47874615872231d17465 (diff) | |
download | freebsd-ports-gnome-432d71843773e6244d49cdd013f523d010297854.tar.gz freebsd-ports-gnome-432d71843773e6244d49cdd013f523d010297854.tar.zst freebsd-ports-gnome-432d71843773e6244d49cdd013f523d010297854.zip |
- 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
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/btsync/Makefile | 7 | ||||
-rw-r--r-- | net-p2p/btsync/distinfo | 8 | ||||
-rw-r--r-- | net-p2p/btsync/files/btsync.in | 13 | ||||
-rw-r--r-- | net-p2p/btsync/pkg-plist | 2 |
4 files changed, 17 insertions, 13 deletions
diff --git a/net-p2p/btsync/Makefile b/net-p2p/btsync/Makefile index 058a567eaa62..0d1ea598f6ea 100644 --- a/net-p2p/btsync/Makefile +++ b/net-p2p/btsync/Makefile @@ -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> diff --git a/net-p2p/btsync/distinfo b/net-p2p/btsync/distinfo index dd3a9ee53b64..ae9ecefdd5e8 100644 --- a/net-p2p/btsync/distinfo +++ b/net-p2p/btsync/distinfo @@ -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 diff --git a/net-p2p/btsync/files/btsync.in b/net-p2p/btsync/files/btsync.in index d64b0b788e67..66c62d6eb629 100644 --- a/net-p2p/btsync/files/btsync.in +++ b/net-p2p/btsync/files/btsync.in @@ -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" diff --git a/net-p2p/btsync/pkg-plist b/net-p2p/btsync/pkg-plist index bd5951bd1467..7c0ce8454fe1 100644 --- a/net-p2p/btsync/pkg-plist +++ b/net-p2p/btsync/pkg-plist @@ -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%% |