summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a6c1cf033371c35160c8a06b91cd0c5f67b1f3be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: Chih-Hsuan Yen <yan12125@gmail.com>
# Contributor: Tom < tomgparchaur at gmail dot com >
# Contributor: David Manouchehri <d@32t.ca>

pkgname=dropbox
pkgver=111.4.472
pkgrel=1
pkgdesc="A free service that lets you bring your photos, docs, and videos anywhere and share them easily."
arch=("i686" "x86_64")
url="https://www.dropbox.com"
license=(custom)
depends=("libsm" "libxslt" "libxmu" "libxdamage" "libxrender" "libxxf86vm" "libxcomposite" "fontconfig" "dbus")
makedepends=("gendesk")
optdepends=(
  'ufw-extras: ufw rules for dropbox'
  'perl-file-mimeinfo: opening dropbox folder on some desktop environments'
  'xdg-utils: for "Launch Dropbox Website" and file manager integration'
  'libappindicator-gtk3: make tray icons themed under some desktop environments like KDE plasma'
)
options=('!strip')

# https://www.dropbox.com/scl/fo/0eu2dsn07fy5k0gt5fy74/AABbXqKHbY_mobVJhqgfOXYja/Glyph/Dropbox/SVG/DropboxGlyph_Blue.svg
source=("DropboxGlyph_Blue.svg"
        "terms.txt"
        "dropbox.service"
        "dropbox@.service")
source_i686=("https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.x86-$pkgver.tar.gz"{,.asc})
source_x86_64=("https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.x86_64-$pkgver.tar.gz"{,.asc})

sha256sums=('9ba76205ec5838db85d822f23cfd7e2112fd2757e8031d8374709f102143c548'
            '34605b2f36fe6b4bde9b858da3f73ac1505986af57be78bbb1c2c9cf1a611578'
            '6c67a9c8c95c08fafafd2f1d828074b13e3347b05d2e4f4bf4e62746115d7477'
            '98581e65a91ae1f19ed42edcdaaa52e102298b5da0d71b50089393d364474d3d')
sha256sums_i686=('349b8c4ca2fe63d5169232119f05145e44e8e91aa0ce21830c71916a83587b85'
                 'SKIP')
sha256sums_x86_64=('b7108d6c84fdeaa8eb759f3bb57a2db303afb1b2ed8871f87c9c7695c527d5d2'
                   'SKIP')
# The PGP key fingerprint should match the one on https://www.dropbox.com/help/desktop-web/linux-commands
validpgpkeys=(
  '1C61A2656FB57B7E4DE0F4C1FC918B335044912E'  # Dropbox Automatic Signing Key <linux@dropbox.com>
)

prepare() {
  gendesk --pkgname="$pkgname" --pkgdesc="$pkgdesc" --categories=Network PKGBUILD
}

package() {
  if [ "$CARCH" = "x86_64" ]; then
    _source_arch="x86_64"
  else
    _source_arch="x86"
  fi

  install -d "$pkgdir"/opt
  cp -dr --no-preserve=ownership "$srcdir"/.dropbox-dist/dropbox-lnx.$_source_arch-$pkgver "$pkgdir"/opt/dropbox
  chmod 755 "$pkgdir"/opt/dropbox/*.so

  install -d "$pkgdir"/usr/bin
  ln -s ../../opt/dropbox/dropbox "$pkgdir"/usr/bin/dropbox

  install -Dm644 "$srcdir"/dropbox.desktop -t "$pkgdir"/usr/share/applications
  install -Dm644 "$srcdir"/DropboxGlyph_Blue.svg "$pkgdir"/usr/share/pixmaps/dropbox.svg
  install -Dm644 "$srcdir"/terms.txt -t "$pkgdir"/usr/share/licenses/$pkgname
  install -Dm644 "$srcdir"/dropbox.service -t "$pkgdir"/usr/lib/systemd/user
  install -Dm644 "$srcdir"/dropbox@.service -t "$pkgdir"/usr/lib/systemd/system
}