btsync: use btsync account, use make_dirs, fix typo

This commit is contained in:
JuhaniImberg 2015-05-07 20:55:18 +03:00
parent 59337ee5df
commit 0b99e87c96
3 changed files with 13 additions and 12 deletions

View file

@ -17,12 +17,12 @@ post)
}
cp $BUILD_DIR/btsync "usr/bin/btsync"
mkdir -p etc
./$BUILD_DIR/btsync --dump-sample-config \
| sed 's:/home/user/\.sync:/var/lib/btsync:' \
| sed 's:btsync/btsync.pid:btsync.pid:' \
| sed 's:\/\/ "pid_file": "pid_file":' \
| sed 's:\/\/ "storage_path": "storage_path":' \
> "etc/btsync.conf"
if [ ! -f etc/btsync.conf ]; then
./$BUILD_DIR/btsync --dump-sample-config \
| sed 's:/home/user/\.sync:/var/lib/btsync:' \
| sed 's:\/\/ "pid_file": "pid_file":' \
| sed 's:\/\/ "storage_path": "storage_path":' \
> "etc/btsync.conf"
fi
;;
esac

View file

@ -1,2 +1,4 @@
#!/bin/sh
exec btsync --nodaemon --config /etc/btsync.conf
mkdir -p /run/btsync
chown -R btsync:btsync /run/btsync
exec chpst -u btsync:btsync btsync --nodaemon --config /etc/btsync.conf 2>&1

View file

@ -4,7 +4,7 @@ revision=1
repository=nonfree
short_desc="Automatically sync files via secure, distributed technology"
maintainer="Juhani Imberg <juhani@imberg.fi>"
license="Propietary license"
license="Proprietary license"
homepage="https://www.getsync.com"
case "${XBPS_TARGET_MACHINE}" in
@ -27,6 +27,8 @@ distfiles="https://download-cdn.getsyncapp.com/${version}/linux-${_type}/${_file
checksum="$_hash"
skip_extraction=$_filename
create_wrksrc=yes
system_accounts="btsync"
make_dirs="/var/lib/btsync 0770 ${system_accounts} ${system_accounts}"
do_fetch() {
mkdir -p $wrksrc
@ -53,8 +55,5 @@ do_install() {
vlicense "${FILESDIR}/LICENSE"
vmkdir var/lib/btsync
touch ${DESTDIR}/var/lib/btsync/.keep
vsv btsync
}