Skip to content

Instantly share code, notes, and snippets.

@ifschleife
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ifschleife/9400132 to your computer and use it in GitHub Desktop.
Save ifschleife/9400132 to your computer and use it in GitHub Desktop.
PKGBUILD for btsync 1.2.91
# Maintainer: ava1ar <mail(at)ava1ar(dot)info>
# Contributor: Dalton Miller
# Contributor: Kilian Lackhove kilian@lackhove.de
# Contributor: Justin Patera serialhex@gmail.com
pkgname=btsync
pkgver=1.2.91
pkgrel=1
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)
sha1sums=('9187bafe0cc30895d55b8a8a69074ebdca325e4c'
'c4f87b9d65247f4a9033a6039662f4b863a5b03e')
if [ "$CARCH" == x86_64 ]; then
source+=("http://syncapp.bittorrent.com/${pkgver}/${pkgname}_x64-${pkgver}.tar.gz")
sha1sums+=('a0600c40cce869d23417996cc22379cd2496d9a0')
elif [ "$CARCH" == i686 ]; then
source+=("http://syncapp.bittorrent.com/${pkgver}/${pkgname}_i386-${pkgver}.tar.gz")
sha1sums+=('3e1c023b4020bf7e21859c2db4eef0a2199ae767')
elif [[ "$CARCH" == arm || "$CARCH" == armv6 || "$CARCH" == armv6h || "$CARCH" == armv7 || "$CARCH" == armv7h ]]; then
source+=("http://syncapp.bittorrent.com/${pkgver}/${pkgname}_arm-${pkgver}.tar.gz")
sha1sums+=('2c562b698a5ffc74a2e63847bd5f4dd60b8de1f4')
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 license
install -Dm644 LICENSE.TXT "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment