pdf-compressor
LOW
maintainer cosct
0 votes
scanned 2026-09-05 14:00:22.289320
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: cosct
2
3
pkgname=pdf-compressor
4
pkgver=0.5.0
5
pkgrel=1
6
pkgdesc='Local-first desktop PDF compressor built with Vue, Tauri, and Rust (GUI + headless CLI)'
7
arch=('x86_64')
8
url='https://github.com/cosct/pdf-compressor'
9
license=('MIT')
10
# Distro LTO injection (-flto=auto into CFLAGS/LDFLAGS) breaks the link:
11
# zlib-ng (built by the cc crate) comes out as LTO bytecode objects that the
12
# final rustc link cannot resolve. The workspace does its own ThinLTO.
13
options=(!lto)
14
depends=(
15
'gtk3'
16
'webkit2gtk-4.1'
17
'hicolor-icon-theme'
18
)
19
optdepends=(
20
'libnotify: desktop notifications for the right-click quick-compress mode'
21
)
22
makedepends=(
23
'cargo'
24
'nodejs'
25
'pnpm'
26
'pkgconf'
27
)
28
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
29
sha256sums=('331a665018cb725874b718b03cd7204b65f75cb2f34e38dd92667e1c95459879')
30
31
build() {
32
cd "${pkgname}-${pkgver}"
33
34
pnpm install --frozen-lockfile
35
36
# Same pipeline as the deb/appimage bundles: `tauri build` runs the frontend
37
# build (beforeBuildCommand) and compiles the release binary with the
38
# custom-protocol feature (dist/ embedded) — the steps are not duplicated
39
# here, so the bundle targets and this package cannot drift apart.
40
pnpm exec tauri build --no-bundle
41
42
# Headless CLI lives outside the Tauri shell.
43
cargo build --release --locked -p pdf-core --bin pdf-compressor-cli
44
}
45
46
package() {
47
cd "${pkgname}-${pkgver}"
48
49
# The cargo target dir may be redirected machine-wide (build.target-dir in
50
# ~/.cargo/config.toml) — resolve it via cargo metadata instead of assuming ./target.
51
local _target
52
_target=$(cargo metadata --format-version 1 --no-deps | sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p')
53
[[ -z "$_target" ]] && _target=target
54
55
install -Dm755 "${_target}/release/app" "${pkgdir}/usr/bin/pdf-compressor"
56
install -Dm755 "${_target}/release/pdf-compressor-cli" "${pkgdir}/usr/bin/pdf-compressor-cli"
57
install -Dm644 src-tauri/icons/128x128.png "${pkgdir}/usr/share/icons/hicolor/128x128/apps/pdf-compressor.png"
58
install -Dm644 src-tauri/icons/32x32.png "${pkgdir}/usr/share/icons/hicolor/32x32/apps/pdf-compressor.png"
59
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
60
install -Dm644 README.zh-CN.md "${pkgdir}/usr/share/doc/${pkgname}/README.zh-CN.md"
61
62
install -Dm644 packaging/pdf-compressor.desktop "${pkgdir}/usr/share/applications/pdf-compressor.desktop"
63
# KDE Dolphin right-click integration for PDFs (headless quick mode).
64
install -Dm644 packaging/servicemenus/pdf-compressor.desktop "${pkgdir}/usr/share/kio/servicemenus/pdf-compressor.desktop"
65
66
# GNOME Nautilus / Nemo "Scripts" menu entries. The Scripts folder is
67
# per-user by design — copy these into ~/.local/share/nautilus/scripts/
68
# (run packaging/nautilus/install.sh from a source checkout for the
69
# automatic variant).
70
install -dm755 "${pkgdir}/usr/share/${pkgname}/nautilus"
71
for _script in packaging/nautilus/compress-*.sh; do
72
install -m755 "${_script}" "${pkgdir}/usr/share/${pkgname}/nautilus/"
73
done
74
}
75
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-05 14:00:22 | Low | 1 |