From 3761f122b8a70070afa36627eafb9dbb91352d0a Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Tue, 6 Oct 2026 20:34:19 -0400 Subject: [PATCH] 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. --- pkgbuilds/dropbox-cli/PKGBUILD | 4 ++-- pkgbuilds/dropbox/PKGBUILD | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgbuilds/dropbox-cli/PKGBUILD b/pkgbuilds/dropbox-cli/PKGBUILD index 61b6e5d..adc51a6 100644 --- a/pkgbuilds/dropbox-cli/PKGBUILD +++ b/pkgbuilds/dropbox-cli/PKGBUILD @@ -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") diff --git a/pkgbuilds/dropbox/PKGBUILD b/pkgbuilds/dropbox/PKGBUILD index e589002..86198ab 100644 --- a/pkgbuilds/dropbox/PKGBUILD +++ b/pkgbuilds/dropbox/PKGBUILD @@ -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