mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 10:08:00 -06:00
* Print: list driverless CUPS destinations, not only permanent queues The Print dialog's printer list came from `lpstat -p -d`, which lists only permanent queues. A driverless IPP printer discovered on the network — the standard setup on modern Linux desktops — has no permanent queue: only `lpstat -e` (CUPS >= 1.7) names it, and CUPS builds a temporary queue when `lp` sends it a job. Until now such printers were invisible and the dialog showed only Save as PDF. Enumerate `lpstat -e` alongside `lpstat -p -d` and merge the answers: queues first, deduplicated, default still from `-d`; a spooler without `-e` keeps today's behaviour and loses only the driverless names. The .deb/.rpm now recommend cups-client so a machine without a print stack is not silently printerless. Fixes #652 Co-authored-by: ZCode (GLM-5.3) <noreply@z.ai> * Print: fix the off-unix build and a driverless default's marker `lpstat_e_command` is called only from `printers`' unix block, so off unix it was dead code and CI's Windows clippy gate (`-D warnings`) failed to build the crate. Gate it like its caller. The default destination can itself be driverless — `lpoptions -d` names a destination no queue exists for — and the merge appended it from `lpstat -e` with `default: false`, so the dialog preselected the first queue instead of the user's default. The `-d` default now marks the appended entry too; the test covers it, and CRLF in `-e` output. Co-authored-by: ZCode (GLM-5.3) <noreply@z.ai> --------- Co-authored-by: ZCode (GLM-5.3) <noreply@z.ai> Co-authored-by: Brandon Thomas <echelon@gmail.com>
74 lines
2.2 KiB
YAML
74 lines
2.2 KiB
YAML
# .deb and .rpm packages (nfpm: https://nfpm.goreleaser.com). Run by package.sh, which stages
|
|
# the file tree, substitutes its path for ${STAGE} (nfpm doesn't expand env vars in `src`) and
|
|
# exports VERSION and NFPM_ARCH.
|
|
#
|
|
# nfpm package -f packaging/linux/nfpm.yaml -p deb -t dist/release/
|
|
name: pdfcraft
|
|
arch: ${NFPM_ARCH}
|
|
platform: linux
|
|
version: ${VERSION}
|
|
# semver: 0.2.0-rc.1 becomes 0.2.0~rc.1 in deb/rpm, so pre-releases sort before the release.
|
|
version_schema: semver
|
|
release: 1
|
|
section: graphics
|
|
priority: optional
|
|
maintainer: ${PDFCRAFT_MAINTAINER}
|
|
vendor: Learning Machines LLC
|
|
homepage: https://getartcraft.com/apps/pdfcraft
|
|
license: MIT OR Apache-2.0
|
|
description: |-
|
|
Open-source, native PDF workbench: read, comment, fill and sign forms,
|
|
organize, combine, split, edit, redact, protect and export PDFs.
|
|
Includes pdfcraft-cli, a headless command runner and opt-in MCP server.
|
|
|
|
# The binaries link only glibc and libgcc_s directly. Windowing (X11/Wayland, xkbcommon) and the
|
|
# GPU (Vulkan, EGL/GL) are loaded at runtime, so they are dependencies/recommendations here
|
|
# rather than ELF NEEDED entries. Printing likewise shells out to CUPS's lpstat/lp (cups-client);
|
|
# without it the Print dialog still offers Save as PDF, so it is a recommendation, not a hard
|
|
# dependency.
|
|
overrides:
|
|
deb:
|
|
depends:
|
|
- libc6 (>= 2.35)
|
|
- libgcc-s1
|
|
- libxkbcommon0
|
|
- libvulkan1 | libegl1
|
|
recommends:
|
|
- cups-client
|
|
- libwayland-client0
|
|
- libx11-6
|
|
- libx11-xcb1
|
|
- libxcursor1
|
|
- libxi6
|
|
- libxrandr2
|
|
- mesa-vulkan-drivers
|
|
- xdg-desktop-portal
|
|
rpm:
|
|
depends:
|
|
- libxkbcommon
|
|
- (vulkan-loader or libglvnd-egl)
|
|
recommends:
|
|
- cups-client
|
|
- libwayland-client
|
|
- libX11
|
|
- libXcursor
|
|
- libXi
|
|
- libXrandr
|
|
- mesa-vulkan-drivers
|
|
- xdg-desktop-portal
|
|
|
|
contents:
|
|
- src: ${STAGE}/usr/bin/pdfcraft
|
|
dst: /usr/bin/pdfcraft
|
|
file_info: { mode: 0755 }
|
|
- src: ${STAGE}/usr/bin/pdfcraft-cli
|
|
dst: /usr/bin/pdfcraft-cli
|
|
file_info: { mode: 0755 }
|
|
- src: ${STAGE}/usr/share/
|
|
dst: /usr/share/
|
|
type: tree
|
|
|
|
scripts:
|
|
postinstall: packaging/linux/postinst.sh
|
|
postremove: packaging/linux/postinst.sh
|