void-packages/srcpkgs/btsync/template

63 lines
1.4 KiB
Bash
Raw Normal View History

2015-05-07 15:51:45 +02:00
pkgname=btsync
version=2.0.105
2015-05-08 22:38:53 +02:00
revision=2
2015-05-07 15:51:45 +02:00
repository=nonfree
short_desc="Automatically sync files via secure, distributed technology"
maintainer="Juhani Imberg <juhani@imberg.fi>"
license="Proprietary license"
2015-05-07 15:51:45 +02:00
homepage="https://www.getsync.com"
2015-05-08 22:38:53 +02:00
only_for_archs="x86_64 i686 armv7l armv6l"
2015-05-07 15:51:45 +02:00
case "${XBPS_TARGET_MACHINE}" in
x86_64)
_type=x64
_hash=9e1427b7a6c6e960a378b97ac458ad53c445457ed0e5c8bf693f446597377b78
;;
i686)
_type=i386
_hash=4d446255ff6332da9a244737d6c20e7dcd32d24a8eaabffbaf73147e5898ed8f
;;
arm*)
_type=arm
_hash=c63fccb76ba3f5dd1197f33bfb8427747faaca9c030f9d8c7f5dfc016d293807
;;
esac
_filename="BitTorrent-Sync_${_type}.tar.gz"
distfiles="https://download-cdn.getsyncapp.com/${version}/linux-${_type}/${_filename}"
2015-05-07 15:51:45 +02:00
checksum="$_hash"
skip_extraction=$_filename
create_wrksrc=yes
system_accounts="btsync"
btsync_homedir="/var/lib/btsync"
conf_files="/etc/btsync.conf"
do_fetch() {
mkdir -p $wrksrc
cd $wrksrc
xbps-uhelper fetch $distfiles
echo "$checksum $_filename" | sha256sum -c || { sha256sum "$_filename"; return 1; }
}
do_extract() {
:
}
do_build() {
sed \
-e "s|%BTSYNC_URL%|${distfiles}|" \
-e "s|%BTSYNC_CHECKSUM%|${checksum}|" \
2015-05-07 18:09:19 +02:00
${FILESDIR}/btsync-vars.sh.in > btsync-vars.sh
}
2015-05-07 15:51:45 +02:00
do_install() {
2015-05-07 18:09:19 +02:00
vmkdir "usr/lib/btsync"
vcopy btsync-vars.sh "usr/lib/btsync"
vconf "${FILESDIR}/btsync.conf"
vlicense "${FILESDIR}/LICENSE"
2015-05-07 15:51:45 +02:00
vsv btsync
}