updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / spideroak / PKGBUILD
blob88e00b7deb06e23fbd7dbfcbfb9e39a9799133ff
1 # Maintainer: Alessio Sergi <asergi at archlinux dot us>
3 pkgname=spideroak
4 pkgver=4.2.9913
5 pkgrel=1
6 pkgdesc="Secure file backup, sync and sharing client"
7 arch=('i686' 'x86_64')
8 url="https://spideroak.com/"
9 license=('custom')
10 conflicts=(${pkgname}-beta)
11 options=('!strip')
12 install=${pkgname}.install
14 _arch='x86_64'
15 [[ "${CARCH}" = 'i686' ]] && _arch='i386'
16 source=("${pkgname}_${pkgver}_${_arch}.deb"::"https://spideroak.com/directdownload?platform=ubuntulucid&arch=${_arch}"
17         "terms.txt")
18 md5sums=('92f06d35e1b580f04be3edbafb143758'
19          '9338d3464e8ce876d7222099c22a205b')
20 [[ "${CARCH}" = 'i686' ]] && md5sums[0]='7dd8a42b42576e5bea0a5154ea6cdde0'
22 package() {
23   cd "${srcdir}"
25   # unpack bundled files
26   bsdtar xf data.tar.gz
28   # install config files
29   install -d -m 755 "${pkgdir}/etc/"{dbus-1/system.d,sysctl.d}
30   install -m 644 "etc/dbus-1/system.d/${pkgname}.dbus.conf" \
31     "${pkgdir}/etc/dbus-1/system.d/${pkgname}.dbus.conf"
32   install -m 644 "etc/sysctl.d/30-${pkgname}.conf" \
33     "${pkgdir}/etc/sysctl.d/30-${pkgname}.conf"
35   # clean up a bit
36   rm -f usr/lib/SpiderOak/lib{gcc_s,stdc++,z}.so.*
37   rm -f usr/lib/SpiderOak/*/*/*.exe
39   # install app in /opt
40   install -d -m 755 "${pkgdir}/opt/SpiderOak"
41   cp -r usr/lib/SpiderOak/* "${pkgdir}/opt/SpiderOak/"
43   # change /usr to /opt in start script file
44   sed -i 's:/usr/lib:/opt:g' usr/bin/SpiderOak
46   # install start script file
47   install -d -m 755 "${pkgdir}/usr/bin"
48   install -m 755 usr/bin/SpiderOak "${pkgdir}/usr/bin/SpiderOak"
50   # fix desktop file (according to the desktop entry spec)
51   sed -i \
52     -e "/Encoding/d" \
53     -e "/^Name=/s: Backup::" \
54     -e "/^Comment=/s:SpiderOak ::" \
55     -e "/^Categories=/s:SpiderOak;::" \
56     -e "/^Icon=/s:=.*:=${pkgname}:" \
57     -e "/^Exec=/s:=.*:=SpiderOak:" \
58     "usr/share/applications/${pkgname}.desktop"
60   # install desktop and pixmap files
61   install -d -m 755 "${pkgdir}/usr/share/"{applications,pixmaps}
62   install -m 644 "usr/share/applications/${pkgname}.desktop" \
63     "${pkgdir}/usr/share/applications/${pkgname}.desktop"
64   install -m 644 "usr/share/pixmaps/${pkgname}.png" \
65     "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
67   # install custom license file
68   install -d -m 755 "${pkgdir}/usr/share/licenses/${pkgname}"
69   install -m 644 terms.txt "${pkgdir}/usr/share/licenses/${pkgname}/terms.txt"
72 # vim:set ts=2 sw=2 et: