Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD for btsync using static url to btsync's distr

By: EasySly on May 19th, 2014  |  syntax: Bash  |  size: 2.00 KB  |  views: 172  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: ava1ar <mail(at)ava1ar(dot)info>
  2. # Contributor: Dalton Miller
  3. # Contributor: Kilian Lackhove kilian@lackhove.de
  4. # Contributor: Justin Patera serialhex@gmail.com
  5.  
  6. pkgname=btsync
  7. pkgver=1.3.94
  8. pkgrel=3
  9. pkgdesc="BitTorrent Sync - automatically sync files via secure, distributed technology"
  10. license=("custom:btsync")
  11. arch=('i686' 'x86_64' 'arm' 'armv6' 'armv7' 'armv6h' 'armv7h')
  12. url="http://www.bittorrent.com/sync"
  13. install=btsync.install
  14. backup=('etc/btsync.conf')
  15. optdepends=("btsync-autoconfig: Auto-create users' config files if needed")
  16.  
  17. source=(btsync.service
  18.         btsync@.service
  19.         btsync_user.service)
  20.  
  21. sha1sums=('9187bafe0cc30895d55b8a8a69074ebdca325e4c'
  22.           'c4f87b9d65247f4a9033a6039662f4b863a5b03e'
  23.           'dd80af8594aef9bbeafa74b7c36b4b980c4c3751')
  24.  
  25. if [ "$CARCH" == x86_64 ]; then
  26.         source+=(http://syncapp.bittorrent.com/${pkgver}/${pkgname}_x64-${pkgver}.tar.gz)
  27.         sha1sums+=('8394f4653c7b85feac62426c357a423c3f67c00e')
  28. elif [ "$CARCH" == i686 ]; then
  29.         source+=(http://syncapp.bittorrent.com/${pkgver}/${pkgname}_i386-${pkgver}.tar.gz)
  30.         sha1sums+=('6b54317da8cf3a94f0f398877288c76bac152a6b')
  31. elif [[ "$CARCH" == arm ||  "$CARCH" == armv6 || "$CARCH" == armv6h || "$CARCH" == armv7 || "$CARCH" == armv7h ]]; then
  32.         source+=(http://syncapp.bittorrent.com/${pkgver}/${pkgname}_arm-${pkgver}.tar.gz)
  33.         sha1sums+=('4a73e6152cf22dcb156a4b32339d6bb3ae8c10dc')
  34. fi
  35.  
  36. package() {
  37.         cd ${srcdir}
  38.         install -Dm755 btsync ${pkgdir}/usr/bin/btsync
  39.         # generate and install system-wide configand systemd unit
  40.         mkdir -p ${pkgdir}/etc
  41.         ./btsync --dump-sample-config | sed 's:/home/user/\.sync:/var/lib/btsync:g' > ${pkgdir}/etc/btsync.conf
  42.         # install systemd units
  43.         install -Dm644 btsync.service ${pkgdir}/usr/lib/systemd/system/btsync.service
  44.         install -Dm644 btsync@.service ${pkgdir}/usr/lib/systemd/system/btsync@.service
  45.         install -Dm644 btsync_user.service ${pkgdir}/usr/lib/systemd/user/btsync.service
  46.         # install license
  47.         install -Dm644 LICENSE.TXT "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
  48. }
clone this paste RAW Paste Data