270.9. system-config-printer-1.5.18
Printer configuration tool for CUPS — add, configure and manage print queues (GTK 3)
| Version | 1.5.18, release 1 |
| Shelf | printing — Printing, printer drivers, labels, scanning and OCR |
| Phase | 43_toolkits (Toolkits), 260 of 344 in build order |
| Licence | GPL-2.0-or-later |
| Homepage | https://github.com/OpenPrinting/system-config-printer |
| Build time | 0.5 SBU |
| Installed size | 3.0 MiB in 184 files |
| Recipe | ports/core/printing/system-config-printer/kpkgbuild |
About
system-config-printer is the GTK 3 printer-configuration program for CUPS, written in Python: it finds printers, adds and removes print queues, picks a driver or PPD for each, and changes a queue’s options. It also installs the cupshelpers Python module it is built on. The desktop entry calls it Print Settings.
Sources
system-config-printer-1.5.18.tar.xz(1.3 MiB)
sha256b1a69e1b4ec2add569a87aeca811a37c5361ee6ae327ec852b79e64223e34bee
upstream: https://github.com/OpenPrinting/system-config-printer/releases/download/v1.5.18/system-config-printer-1.5.18.tar.xz
archive copy: sources-3/printing--system-config-printer-1.5.18.tar.xz
Dependencies
Depends on: autoconf, automake, gettext, pkgconf, cups, glib, glib-introspection, gtk3, libnotify, python3, python3-gobject, python3-cairo, python3-dbus, python3-cups, python3-requests, python3-setuptools, desktop-file-utils, xmlto, docbook-xml, docbook-xsl, libxslt.
Required by (1): print-manager.
Patches
build.sh applies these; kpkg applies nothing by itself.
gettext-1.0.patch— Fix bootstrap scriptIt fixed two issues:
- AM_GNU_GETTEXT in AX_REQUIRE_DEFINED caused error during autoconf, because AM_GNU_GETTEXT is now forbidden to use without arguments. Remove the AX_REQUIRE_DEFINED - if AM_GNU_GETTEXT is missing, autoconf will fail later anyway - AM_GNU_GETTEXT_VERSION and AM_GNU_GETTEXT were not found during autoconf - use AC_CONFIG_MACRO_DIR to tell autoconf to search in local generated directory m4
Fixes #416
makefile-am-fix-setup-py-install.patch— makes the Python module’s install rule inMakefile.amcallsetup.py install --root=$(DESTDIR) --prefix=$(prefix)instead of--prefix=$(DESTDIR)$(prefix), so the module is staged underDESTDIRwhile its installed paths name/usr, not the staging directory.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install system-config-printer'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/printing/system-config-printer.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/printing/system-config-printer
echo 'b1a69e1b4ec2add569a87aeca811a37c5361ee6ae327ec852b79e64223e34bee system-config-printer-1.5.18.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/system-config-printer
SRC=$SRC_ROOT/system-config-printer-1.5.18
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf system-config-printer-1.5.18.tar.xz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/gettext-1.0.patch"
patch -p1 -i "$PORT_SRC/makefile-am-fix-setup-py-install.patch"
autoreconf -fi
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--mandir=/usr/share/man \
--without-udev-rules \
--without-systemdsystemunitdir \
--with-xmlto
make
make DESTDIR=$PKG install
rm -f "$PKG/etc/xdg/autostart/print-applet.desktop"
cat > "$PKG/usr/share/applications/system-config-printer.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Print Settings
GenericName=Printer Configuration
Comment=Add printers and change their settings
Exec=system-config-printer
Icon=printer
Terminal=false
StartupNotify=true
StartupWMClass=system-config-printer
Categories=GTK;Settings;HardwareSettings;Printing;System;
Keywords=printer;print;queue;cups;driver;ppd;
DESKTOP
chmod 644 "$PKG/usr/share/applications/system-config-printer.desktop"
The switches, and why each is set:
--without-udev-rules— Do not install the USB auto-configuration helper, udev rules that add a print queue when a USB printer is plugged in. It is upstream’s default. Queues are set up through cups-browsed and this program.--without-systemdsystemunitdir— Install no systemd unit. Without the switch configure asks pkg-config for systemd’s unit directory; KDOS has no systemd (see No systemd).--with-xmlto— Build the manual pages from DocBook withxmlto, through docbook-xml and docbook-xsl.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/system-config-printer, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf system-config-printer-1.5.18-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/system-config-printer, and runs the triggers its paths call for.
Contents
Installed programs: install-printerdriver, scp-dbus-service, system-config-printer, system-config-printer-applet.
Installed directories: /etc/cupshelpers, /usr/lib/python3.14/site-packages/cupshelpers, /usr/lib/python3.14/site-packages/cupshelpers-1.0-py3.14.egg-info, /usr/share/licenses/system-config-printer, /usr/share/system-config-printer.
Short descriptions
system-config-printer |
configure a CUPS server |
system-config-printer-applet |
print job manager |
Notes
The build files are regenerated from configure.ac and Makefile.am: build.sh applies both patches and then runs autoreconf -fi. The first, gettext-1.0.patch, is upstream’s own fix to configure.ac: it drops the AX_REQUIRE_DEFINED([AM_GNU_GETTEXT]) check, which fails under gettext 1.0’s macros because AM_GNU_GETTEXT may no longer be used without arguments, and adds AC_CONFIG_MACRO_DIR([m4]) so the gettext macros are found.
build.sh removes /etc/xdg/autostart/print-applet.desktop. The print applet is a GtkStatusIcon, which draws only on an X11 tray; started in every session, it would run with no icon to show.
build.sh replaces upstream’s desktop entry. The program calls GLib.set_prgname("system-config-printer"), which becomes its Wayland app id, and the entry names it in StartupWMClass. Icon=printer is the printer icon of the KDOS icon theme.