mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-03 16:41:26 +01:00
Removing the package left the user service running from the deleted binary, with ~/ProtonDrive still mounted. A user who then deleted the folder to clean up had every file in it moved to the Proton Drive trash, as any delete through the mount is. The .deb (prerm on remove), the .rpm (%preun on erase) and the Arch packages (pre_remove) now stop proton-drive.service for every user with a running user manager, through runuser with that user's XDG_RUNTIME_DIR, so no systemd-machined is needed. Upgrades are left alone. Queued writes stay in the state directory for a later install. The pacman install script lives once in packaging/ and the AUR directories link it; push.sh copies its content into each AUR repository. The uninstall guide now warns not to delete the mount point while the service runs. Reported on Reddit by a user who restored the files from the trash.
69 lines
3.9 KiB
Bash
69 lines
3.9 KiB
Bash
# Maintainer: Nils Pukropp <contact@narl.io>
|
|
|
|
pkgname=proton-drive-for-linux-bin
|
|
pkgver=3.3.0
|
|
pkgrel=1
|
|
pkgdesc="Unofficial Proton Drive client: FUSE files-on-demand mount, CLI, GTK4 app, tray (binaries)"
|
|
arch=('x86_64')
|
|
url="https://proton-drive.narl.io"
|
|
_repo="https://github.com/narrrl/proton-drive-linux"
|
|
license=('MIT')
|
|
depends=('fuse3' 'gtk4' 'libadwaita' 'webkitgtk-6.0' 'dbus' 'gcc-libs' 'glibc'
|
|
'hicolor-icon-theme')
|
|
optdepends=('perl-image-exiftool: thumbnails for camera RAW files'
|
|
'ffmpeg: video thumbnails'
|
|
'iso-codes: country names in your language under Places'
|
|
'gnome-keyring: credential storage over the Secret Service API'
|
|
'kwallet: credential storage over the Secret Service API'
|
|
'xdg-utils: "Open folder" action in the tray menu'
|
|
'fzf: search-as-you-type launcher (pdfs-prompt --fzf)'
|
|
'foot: terminal that hosts pdfs-prompt --fzf when started from a keybinding')
|
|
provides=("${pkgname%-bin}=$pkgver" "proton-drive-linux=$pkgver" 'pdfs')
|
|
conflicts=('proton-drive-linux' 'proton-drive-for-linux' 'proton-drive-for-linux-git')
|
|
# Upstream ships the binaries already built on Ubuntu 24.04; do not rewrite them.
|
|
options=('!strip' '!debug')
|
|
# Stops the running daemon before removal, so the mount stops mirroring deletes.
|
|
install=proton-drive.install
|
|
_tag="v$pkgver"
|
|
_raw="https://raw.githubusercontent.com/narrrl/proton-drive-linux/$_tag"
|
|
# The release tarball holds the four binaries only, so the desktop integration
|
|
# files come straight from the tagged tree. Every one carries $pkgver in its
|
|
# name: makepkg reuses a cached file of the same name, so an unversioned name
|
|
# keeps the old copy after upstream changes it and fails the checksum.
|
|
source=("proton-drive-linux-$pkgver-x86_64.tar.gz::$_repo/releases/download/$_tag/proton-drive-linux-$pkgver-x86_64.tar.gz"
|
|
"io.narl.proton-drive-linux-$pkgver.desktop::$_raw/packaging/io.narl.proton-drive-linux.desktop"
|
|
"io.narl.proton-drive-linux-tray-$pkgver.desktop::$_raw/packaging/io.narl.proton-drive-linux-tray.desktop"
|
|
"io.narl.proton-drive-linux-$pkgver.svg::$_raw/packaging/io.narl.proton-drive-linux.svg"
|
|
"proton-drive-$pkgver.service::$_raw/packaging/proton-drive.service"
|
|
"LICENSE-$pkgver::$_raw/LICENSE")
|
|
sha256sums=('2e4a8ee660f1d1d683a03afd7d3c1262be87cebeb53893cae55f5e1b44199a04'
|
|
'd190d6771fff0b975271fb62fd3fb0fa8bbf17d7278c10853c18557855b0c123'
|
|
'1d95e250370220e3bb6aead6ce34d1d6cc759f42c4803b75f1667e78ff47c6c0'
|
|
'e598a93c2715c3a9fdc7fb937902083d4a1135e8fbdfe6fe7e37f0383ebbd828'
|
|
'77280bff5f693fbc5ffa9f3ccd06a43cfff96d770290aa8d7d0c28e9dde277be'
|
|
'02c419e7f9af08dda720e4f852f3e57cf5a69e192605440f750e9d244fa2817c')
|
|
|
|
package() {
|
|
install -Dm755 "$srcdir/pdfs" "$pkgdir/usr/bin/pdfs"
|
|
install -Dm755 "$srcdir/pdfs-tray" "$pkgdir/usr/bin/pdfs-tray"
|
|
install -Dm755 "$srcdir/pdfs-app" "$pkgdir/usr/bin/pdfs-app"
|
|
install -Dm755 "$srcdir/pdfs-prompt" "$pkgdir/usr/bin/pdfs-prompt"
|
|
|
|
install -Dm644 "$srcdir/io.narl.proton-drive-linux-$pkgver.desktop" \
|
|
"$pkgdir/usr/share/applications/io.narl.proton-drive-linux.desktop"
|
|
install -Dm644 "$srcdir/io.narl.proton-drive-linux-tray-$pkgver.desktop" \
|
|
"$pkgdir/etc/xdg/autostart/io.narl.proton-drive-linux-tray.desktop"
|
|
install -Dm644 "$srcdir/io.narl.proton-drive-linux-$pkgver.svg" \
|
|
"$pkgdir/usr/share/icons/hicolor/scalable/apps/io.narl.proton-drive-linux.svg"
|
|
|
|
# systemd user unit for the auto-mount daemon; enabled per user, not by pacman.
|
|
install -Dm644 "$srcdir/proton-drive-$pkgver.service" \
|
|
"$pkgdir/usr/lib/systemd/user/proton-drive.service"
|
|
|
|
# Translations ship precompiled in the release tarball.
|
|
install -dm755 "$pkgdir/usr/share"
|
|
cp -r --no-preserve=ownership "$srcdir/locale" "$pkgdir/usr/share/locale"
|
|
|
|
install -Dm644 "$srcdir/LICENSE-$pkgver" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|