updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / spideroak-latest / PKGBUILD
blob5a828f668dfbd60baad933f308351d1ba60b8b5c
1 # Maintainer: Dan Serban
2 # Contributor: ddffnn <ddffnn@gmail.com>
3 # Contributor: sfabius <sfabius@gmail.com>
4 # Contributor: nblock <nblock [/at\] archlinux DOT us>
6 pkgname=spideroak-latest
7 pkgver=4.x.xxxx.beta # 4.x.xxxx (beta) series
8 pkgrel=1
9 pkgdesc="Secure, cross-platform, consolidated, free online backup, storage, access, sharing and sync tool (beta channel)"
10 url=https://spideroak.com/
11 arch=(i686 x86_64)
12 depends=(openssl)
13 optdepends=(dbus qt)
14 conflicts=(spideroak)
15 license=(custom:freeware)
16 options=(!strip)
17 _filearch=i386
18 _last_known_md5sum="f212ff2b9b8a9f2e4bf71cd5de2560ea"
19 [ "${CARCH}" == "x86_64" ] && _filearch=x86_64 && _last_known_md5sum="1bb0dbfa1305041e49660bc6151bf3c5"
21 build()
23   _file="${pkgname}_beta.deb"
24   wget -O "${_file}" "https://spideroak.com/directdownload?platform=ubuntumaverick&arch=${_filearch}&beta=yes"
25   _actual_md5sum=$(md5sum "${_file}" | cut -d" " -f1)
26   [ "${_actual_md5sum}" != "${_last_known_md5sum}" ] && echo && echo && echo "Please raise the out-of-date flag for this package: http://aur.archlinux.org/packages.php?ID=47096" && echo && echo
27   msg "Extracting ..."
28   bsdtar -xf "${_file}" data.tar.gz
29   bsdtar -xf data.tar.gz
30   msg2 "... completed."
31   rm data.tar.gz
32   cd "${srcdir}"/etc
33   rm -r apt
34   mkdir -p "${srcdir}"/usr/share/spideroak
35   cd "${srcdir}"/usr/lib
36   mv SpiderOak lib
37   mv lib "${srcdir}"/usr/share/spideroak/
38   cd "${srcdir}"/usr
39   rm -r bin lib
40   cd "${srcdir}"
41   mv etc usr "${pkgdir}"/
42   mkdir -p "${pkgdir}"/usr/bin
43   USRBINFILE="${pkgdir}"/usr/bin/spideroak
44   echo '#!/bin/bash' > "${USRBINFILE}"
45   echo 'export LD_LIBRARY_PATH="/usr/share/spideroak/lib:${LD_LIBRARY_PATH}"' >> "${USRBINFILE}"
46   echo '/usr/share/spideroak/lib/SpiderOak "$@"' >> "${USRBINFILE}"
47   chmod +x "${USRBINFILE}"
48   DESKTOPFILE="${pkgdir}"/usr/share/applications/spideroak.desktop
49   echo "[Desktop Entry]" > "${DESKTOPFILE}"
50   echo "Name=SpiderOak (Beta)" >> "${DESKTOPFILE}"
51   echo "Comment=SpiderOak Secure Backup and File Sharing Client (Beta)" >> "${DESKTOPFILE}"
52   echo "Exec=spideroak" >> "${DESKTOPFILE}"
53   echo "Terminal=false" >> "${DESKTOPFILE}"
54   echo "Type=Application" >> "${DESKTOPFILE}"
55   echo "Icon=/usr/share/pixmaps/spideroak.png" >> "${DESKTOPFILE}"
56   echo "Categories=Network;" >> "${DESKTOPFILE}"