# Maintainer: ava1ar # Contributor: Dalton Miller # Contributor: Kilian Lackhove kilian@lackhove.de # Contributor: Justin Patera serialhex@gmail.com pkgname=btsync pkgver=1.3.94 pkgrel=3 pkgdesc="BitTorrent Sync - automatically sync files via secure, distributed technology" license=("custom:btsync") arch=('i686' 'x86_64' 'arm' 'armv6' 'armv7' 'armv6h' 'armv7h') url="http://www.bittorrent.com/sync" install=btsync.install backup=('etc/btsync.conf') optdepends=("btsync-autoconfig: Auto-create users' config files if needed") source=(btsync.service btsync@.service btsync_user.service) sha1sums=('9187bafe0cc30895d55b8a8a69074ebdca325e4c' 'c4f87b9d65247f4a9033a6039662f4b863a5b03e' 'dd80af8594aef9bbeafa74b7c36b4b980c4c3751') if [ "$CARCH" == x86_64 ]; then source+=(http://syncapp.bittorrent.com/${pkgver}/${pkgname}_x64-${pkgver}.tar.gz) sha1sums+=('8394f4653c7b85feac62426c357a423c3f67c00e') elif [ "$CARCH" == i686 ]; then source+=(http://syncapp.bittorrent.com/${pkgver}/${pkgname}_i386-${pkgver}.tar.gz) sha1sums+=('6b54317da8cf3a94f0f398877288c76bac152a6b') elif [[ "$CARCH" == arm || "$CARCH" == armv6 || "$CARCH" == armv6h || "$CARCH" == armv7 || "$CARCH" == armv7h ]]; then source+=(http://syncapp.bittorrent.com/${pkgver}/${pkgname}_arm-${pkgver}.tar.gz) sha1sums+=('4a73e6152cf22dcb156a4b32339d6bb3ae8c10dc') fi package() { cd ${srcdir} install -Dm755 btsync ${pkgdir}/usr/bin/btsync # generate and install system-wide configand systemd unit mkdir -p ${pkgdir}/etc ./btsync --dump-sample-config | sed 's:/home/user/\.sync:/var/lib/btsync:g' > ${pkgdir}/etc/btsync.conf # install systemd units install -Dm644 btsync.service ${pkgdir}/usr/lib/systemd/system/btsync.service install -Dm644 btsync@.service ${pkgdir}/usr/lib/systemd/system/btsync@.service install -Dm644 btsync_user.service ${pkgdir}/usr/lib/systemd/user/btsync.service # install license install -Dm644 LICENSE.TXT "${pkgdir}/usr/share/licenses/${pkgname}/license.txt" }