Build dropbox and dropbox-cli for aarch64
Dropbox publishes its Linux client for x86_64 only, so on AArch64 the dropbox package installs that same client and runs it under box64. Only dropboxd changes: it execs the client through box64, and /usr/bin/dropbox points at it, so the systemd units and `dropbox-cli start` both go through the emulator. The x86_64 package is unchanged. dropbox-cli is a Python script and becomes arch=any.
This commit is contained in:
1 parent
71154a8fdc
commit
3761f122b8
2 files changed
+15
-4
No files matched your search
@@ -7,9 +7,9 @@
|
||||
|
||||
pkgname=dropbox-cli
|
||||
pkgver=2026.09.28
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Command line interface for Dropbox"
|
||||
arch=("x86_64")
|
||||
arch=("any")
|
||||
url="https://www.dropbox.com"
|
||||
license=("GPL-3.0-or-later")
|
||||
makedepends=("gdk-pixbuf2")
|
||||
|
||||
@@ -7,10 +7,13 @@ pkgname=dropbox
|
||||
pkgver=272.4.3798
|
||||
pkgrel=1
|
||||
pkgdesc="A free service that lets you bring your photos, docs, and videos anywhere and share them easily."
|
||||
arch=("x86_64")
|
||||
arch=("x86_64" "aarch64")
|
||||
url="https://www.dropbox.com"
|
||||
license=(custom:Dropbox)
|
||||
depends=("libsm" "libxslt" "libxmu" "libxdamage" "libxrender" "libxxf86vm" "libxcomposite" "fontconfig" "dbus")
|
||||
# Dropbox ships Linux builds for x86_64 only. AArch64 runs the same client
|
||||
# under box64, which maps its glibc and GTK calls onto the native libraries.
|
||||
depends_aarch64=("box64")
|
||||
makedepends=("gendesk")
|
||||
optdepends=(
|
||||
'ufw-extras: ufw rules for dropbox'
|
||||
@@ -43,7 +46,15 @@ package() {
|
||||
chmod 755 "$pkgdir"/opt/dropbox/*.so
|
||||
|
||||
install -d "$pkgdir"/usr/bin
|
||||
ln -s ../../opt/dropbox/dropbox "$pkgdir"/usr/bin/dropbox
|
||||
if [[ $CARCH == aarch64 ]]; then
|
||||
# `dropbox-cli start` runs dropboxd, so pointing dropboxd at box64 and
|
||||
# /usr/bin/dropbox at dropboxd sends every launch through the emulator.
|
||||
sed -i 's|^exec "$PAR"/dropbox "$@"$|exec /usr/bin/box64 "$PAR"/dropbox "$@"|' "$pkgdir"/opt/dropbox/dropboxd
|
||||
grep -qxF 'exec /usr/bin/box64 "$PAR"/dropbox "$@"' "$pkgdir"/opt/dropbox/dropboxd
|
||||
ln -s ../../opt/dropbox/dropboxd "$pkgdir"/usr/bin/dropbox
|
||||
else
|
||||
ln -s ../../opt/dropbox/dropbox "$pkgdir"/usr/bin/dropbox
|
||||
fi
|
||||
|
||||
install -Dm644 "$srcdir"/dropbox.desktop -t "$pkgdir"/usr/share/applications
|
||||
install -Dm644 "$srcdir"/DropboxGlyph_Blue.svg "$pkgdir"/usr/share/pixmaps/dropbox.svg
|
||||
|
||||
Reference in new issue
Block a user