mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-03 16:41:26 +01:00
Videos without a server thumbnail fell through to the local fallback, which downloaded the whole file, failed to decode it as an image and wrote the video off for good. Grab one frame with ffmpeg instead, a second in or from the start for shorter clips. Probe for ffmpeg before downloading, bound every run, and skip videos over 256 MiB. Migration V32 gives the videos written off so far another try. Those videos had no server thumbnail because our uploads never sent one. Every upload path (bulk upload, drained mount writes, conflict copies, new revisions and folder sync) now attaches a thumbnail rendered from the local file, kept under the 60 KiB Proton's own clients use. Files that are not images or videos, or cannot be decoded, upload bare as before; a .ts file only counts as video with an MPEG-TS sync byte. ffmpeg is a new optional dependency in the PKGBUILDs.
83 lines
3.0 KiB
Bash
83 lines
3.0 KiB
Bash
# Maintainer: Nils Pukropp <contact@narl.io>
|
|
|
|
pkgname=proton-drive-for-linux-git
|
|
pkgver=2.0.0.r1.g56161f6
|
|
pkgrel=1
|
|
pkgdesc="Unofficial Proton Drive client: FUSE files-on-demand mount, CLI, GTK4 app, tray (git)"
|
|
arch=('x86_64')
|
|
url="https://github.com/narrrl/proton-drive-linux"
|
|
license=('MIT')
|
|
depends=('fuse3' 'gtk4' 'libadwaita' 'webkitgtk-6.0' 'dbus' 'gcc-libs' 'glibc'
|
|
'hicolor-icon-theme')
|
|
makedepends=('cargo' 'git' 'gettext')
|
|
optdepends=('perl-image-exiftool: thumbnails for camera RAW files'
|
|
'ffmpeg: video thumbnails'
|
|
'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%-git}=$pkgver" "proton-drive-linux=$pkgver" 'pdfs')
|
|
conflicts=('proton-drive-linux' 'proton-drive-for-linux' 'proton-drive-for-linux-bin')
|
|
# LTO has broken GTK/Rust links for this workspace; the release profile keeps it off.
|
|
options=('!lto')
|
|
source=("$pkgname::git+$url.git")
|
|
sha256sums=('SKIP')
|
|
|
|
pkgver() {
|
|
cd "$pkgname"
|
|
git describe --long --abbrev=7 --tags 2>/dev/null |
|
|
sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
|
|
printf '0.0.0.r%s.g%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
|
|
}
|
|
|
|
prepare() {
|
|
cd "$pkgname"
|
|
export RUSTUP_TOOLCHAIN=stable
|
|
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname"
|
|
export RUSTUP_TOOLCHAIN=stable
|
|
export CARGO_TARGET_DIR=target
|
|
cargo build --frozen --release \
|
|
--bin pdfs \
|
|
--bin pdfs-tray \
|
|
--bin pdfs-app \
|
|
--bin pdfs-prompt
|
|
}
|
|
|
|
check() {
|
|
cd "$pkgname"
|
|
export RUSTUP_TOOLCHAIN=stable
|
|
export CARGO_TARGET_DIR=target
|
|
cargo test --frozen --workspace
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname"
|
|
|
|
install -Dm755 target/release/pdfs "$pkgdir/usr/bin/pdfs"
|
|
install -Dm755 target/release/pdfs-tray "$pkgdir/usr/bin/pdfs-tray"
|
|
install -Dm755 target/release/pdfs-app "$pkgdir/usr/bin/pdfs-app"
|
|
install -Dm755 target/release/pdfs-prompt "$pkgdir/usr/bin/pdfs-prompt"
|
|
|
|
install -Dm644 packaging/io.narl.proton-drive-linux.desktop \
|
|
"$pkgdir/usr/share/applications/io.narl.proton-drive-linux.desktop"
|
|
install -Dm644 packaging/io.narl.proton-drive-linux-tray.desktop \
|
|
"$pkgdir/etc/xdg/autostart/io.narl.proton-drive-linux-tray.desktop"
|
|
install -Dm644 packaging/io.narl.proton-drive-linux.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 packaging/proton-drive.service \
|
|
"$pkgdir/usr/lib/systemd/user/proton-drive.service"
|
|
|
|
# Translations: compiled from po/ into /usr/share/locale.
|
|
po/build.sh "$pkgdir/usr/share/locale"
|
|
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
|
}
|