This package has some udev tools to assist with printer autodetection.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
[yann.morin.1998@free.fr:
- add missing dependency to host-pkgconf
- add patch for --with-cups-config
- use that to point to cups-config in staging
- append-assign in conditional blocks
- license to be GPL-2.0-or-later (not GPL-2.0-only)
- fix check-package
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
source "package/strongswan/Config.in"
source "package/stunnel/Config.in"
source "package/suricata/Config.in"
+ source "package/system-config-printer/Config.in"
source "package/tcpdump/Config.in"
source "package/tcping/Config.in"
source "package/tcpreplay/Config.in"
--- /dev/null
+From 731c8d7e1f9edb527785d61f74031a5e5846554b Mon Sep 17 00:00:00 2001
+From: James Hilliard <james.hilliard1@gmail.com>
+Date: Sun, 25 Jul 2021 16:30:59 -0600
+Subject: [PATCH] Add option to disable xmlto manual generation.
+
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+[james.hilliard1@gmail.com: backport from upstream commit
+95e0b461f5a46c74b00287aca65732ea2fc9d69b]
+---
+ Makefile.am | 7 ++++++-
+ configure.ac | 5 +++++
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 843ba30d..7facab94 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -209,9 +209,11 @@ else
+ systemd_CLEANFILES=
+ endif
+
++if XMLTO
+ man_MANS= \
+ man/system-config-printer.1 \
+ man/system-config-printer-applet.1
++endif
+
+ dbus_DATA = \
+ dbus/com.redhat.NewPrinterNotification.conf \
+@@ -274,7 +276,6 @@ EXTRA_DIST=\
+ $(bin_SCRIPTS) \
+ setup.py \
+ $(EXPORT_MODULES) \
+- man/system-config-printer.xml \
+ $(dbus_DATA) \
+ $(dbusinterfaces_DATA) \
+ $(dbusservices_DATA) \
+@@ -297,12 +298,16 @@ EXTRA_DIST=\
+ test_PhysicalDevice.py \
+ $(appdata_in_files)
+
++if XMLTO
++EXTRA_DIST+=man/system-config-printer.xml
++
+ # The man pages are generated from DocBook XML.
+ .stamp-man-pages-built: $(top_srcdir)/man/system-config-printer.xml
+ xmlto man -o man $<
+ touch .stamp-man-pages-built
+
+ $(man_MANS): .stamp-man-pages-built
++endif
+
+ html: $(EXPORT_MODULES) $(EXPORT_MODULES_GEN)
+ rm -rf html
+diff --git a/configure.ac b/configure.ac
+index 811f897a..a2a66889 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -75,6 +75,11 @@ if test "x$with_systemdsystemunitdir" != xno; then
+ fi
+ AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
+
++AC_ARG_WITH(xmlto,
++ [AC_HELP_STRING([--with-xmlto],
++ [Enable xmlto manual generation @<:@default=yes@:>@])])
++AM_CONDITIONAL([XMLTO], [test x$with_xmlto != xno])
++
+ ALL_LINGUAS="ar as ast bg bn_IN bn br bs ca cs cy da de el en_GB es et fa fi fr fur gu he hi hr hu id is it ja kn ko lt lv mai ml mr ms nb nds nl nn oc or pa pl pt_BR pt ro ru si sk sl sr@latin sr sv ta te th tr uk vi zh_CN zh_TW"
+ AC_CONFIG_FILES([
+ Makefile
+--
+2.25.1
+
--- /dev/null
+From 75db995dda74696123cde2869e4e9b3315b91abd Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Date: Sun, 1 Aug 2021 13:40:28 +0200
+Subject: [PATCH] configure: accept non-system cups-config
+
+In cross-compilation setups, cups.config might not be installed, and
+might not be in the PATH.
+
+Allow a user to specify the full path to cups-config.
+
+Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
+---
+ configure.ac | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index dd013b4a..9f033d18 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,7 +33,11 @@ fi
+ AC_SUBST(DESKTOPVENDOR)
+ AC_SUBST(DESKTOPPREFIX)
+
+-cupsserverbindir="`cups-config --serverbin`"
++AC_ARG_WITH([cups-config],
++ [AC_HELP_STRING([--with-cups-config], [Specify the path of cups-config])],,
++ [with_cups_config=cups-config])
++
++cupsserverbindir="`${with_cups_config} --serverbin`"
+ AC_SUBST(cupsserverbindir)
+
+ PKG_CHECK_MODULES(GLIB, glib-2.0, has_glib=yes, has_glib=no)
+--
+2.25.1
+
--- /dev/null
+config BR2_PACKAGE_SYSTEM_CONFIG_PRINTER
+ bool "system-config-printer"
+ depends on BR2_PACKAGE_CUPS
+ help
+ Graphical user interface for CUPS administration
+
+ https://github.com/OpenPrinting/system-config-printer
--- /dev/null
+# Locally calculated:
+sha256 fbd226ce215bf014213dded81b43b9d4d90470524f5bf7cd21ecc71d4aefa689 system-config-printer-1.5.15.tar.xz
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
--- /dev/null
+################################################################################
+#
+# system-config-printer
+#
+################################################################################
+
+SYSTEM_CONFIG_PRINTER_VERSION = 1.5.15
+SYSTEM_CONFIG_PRINTER_SOURCE = system-config-printer-$(SYSTEM_CONFIG_PRINTER_VERSION).tar.xz
+SYSTEM_CONFIG_PRINTER_SITE = https://github.com/OpenPrinting/system-config-printer/releases/download/v$(SYSTEM_CONFIG_PRINTER_VERSION)
+SYSTEM_CONFIG_PRINTER_LICENSE = GPL-2.0+
+SYSTEM_CONFIG_PRINTER_LICENSE_FILES = COPYING
+SYSTEM_CONFIG_PRINTER_DEPENDENCIES = cups host-intltool host-pkgconf
+
+# 0001-Add-option-to-disable-xmlto-manual-generation.patch
+# 0002-configure-accept-non-system-cups-config.patch
+SYSTEM_CONFIG_PRINTER_AUTORECONF = YES
+
+SYSTEM_CONFIG_PRINTER_CONF_OPTS = --with-cups-config=$(STAGING_DIR)/usr/bin/cups-config
+
+ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
+SYSTEM_CONFIG_PRINTER_DEPENDENCIES += libglib2
+endif
+
+ifeq ($(BR2_PACKAGE_LIBGLIB2)$(BR2_PACKAGE_LIBUSB)$(BR2_PACKAGE_HAS_UDEV),yyy)
+SYSTEM_CONFIG_PRINTER_CONF_OPTS += --with-udev-rules=yes
+SYSTEM_CONFIG_PRINTER_DEPENDENCIES += libusb udev
+else
+SYSTEM_CONFIG_PRINTER_CONF_OPTS += --with-udev-rules=no
+endif
+
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+SYSTEM_CONFIG_PRINTER_CONF_OPTS += --with-systemdsystemunitdir=/usr/lib/systemd/system
+SYSTEM_CONFIG_PRINTER_DEPENDENCIES += systemd
+else
+SYSTEM_CONFIG_PRINTER_CONF_OPTS += --with-systemdsystemunitdir=no
+endif
+
+$(eval $(autotools-package))