[gnome-build-meta/valentindavid/printing: 3/4] Add support for printing in control center



commit d3e19d622a82f3bf1ef91355ddd99251b767edca
Author: Valentin David <valentin david codethink co uk>
Date:   Thu Jun 25 10:15:36 2020 +0200

    Add support for printing in control center

 elements/core-deps.bst                       |  3 +++
 elements/core-deps/cups-pk-helper.bst        | 29 ++++++++++++++++++++++++++++
 elements/core-deps/pycups.bst                | 11 +++++++++++
 elements/core-deps/system-config-printer.bst | 22 +++++++++++++++++++++
 elements/core/gnome-control-center.bst       |  1 +
 elements/core/gnome-settings-daemon.bst      |  2 +-
 files/cups-pk-helper/cups-pk-helper.service  |  8 ++++++++
 7 files changed, 75 insertions(+), 1 deletion(-)
---
diff --git a/elements/core-deps.bst b/elements/core-deps.bst
index 3d4dd06e..b7f000e4 100644
--- a/elements/core-deps.bst
+++ b/elements/core-deps.bst
@@ -15,6 +15,7 @@ depends:
 - core-deps/cairomm-1.0.bst
 - core-deps/colord-gtk.bst
 - core-deps/colord.bst
+- core-deps/cups-pk-helper.bst
 - core-deps/dotconf.bst
 - core-deps/eos-updater.bst
 - core-deps/espeak.bst
@@ -97,6 +98,7 @@ depends:
 - core-deps/portaudio.bst
 - core-deps/ppp.bst
 - core-deps/pyatspi.bst
+- core-deps/pycups.bst
 - core-deps/python-pyparsing.bst
 - core-deps/rpcsvc-proto.bst
 - core-deps/samba.bst
@@ -105,6 +107,7 @@ depends:
 - core-deps/spice-gtk.bst
 - core-deps/spice-protocol.bst
 - core-deps/startup-notification.bst
+- core-deps/system-config-printer.bst
 - core-deps/template-glib.bst
 - core-deps/tepl.bst
 - core-deps/totem-pl-parser.bst
diff --git a/elements/core-deps/cups-pk-helper.bst b/elements/core-deps/cups-pk-helper.bst
new file mode 100644
index 00000000..2d854916
--- /dev/null
+++ b/elements/core-deps/cups-pk-helper.bst
@@ -0,0 +1,29 @@
+kind: autotools
+
+sources:
+- kind: tar
+  url: https://www.freedesktop.org/software/cups-pk-helper/releases/cups-pk-helper-0.2.6.tar.xz
+- kind: local
+  path: files/cups-pk-helper/cups-pk-helper.service
+
+build-depends:
+- sdk/glib.bst
+- core-deps/intltool.bst
+- freedesktop-sdk.bst:components/systemd.bst
+- freedesktop-sdk.bst:public-stacks/buildsystem-autotools.bst
+
+depends:
+- freedesktop-sdk.bst:components/cups.bst
+- freedesktop-sdk.bst:components/polkit.bst
+
+config:
+  install-commands:
+    (>):
+    - |
+      cat <<EOF 
"%{install-root}%{datadir}/dbus-1/system-services/org.opensuse.CupsPkHelper.Mechanism.service"
+      SystemdService=cups-pk-helper.service
+      EOF
+
+    - |
+      systemdsystemunitdir="$(pkg-config --variable systemdsystemunitdir systemd)"
+      install -Dm644 -t "%{install-root}${systemdsystemunitdir}" cups-pk-helper.service
diff --git a/elements/core-deps/pycups.bst b/elements/core-deps/pycups.bst
new file mode 100644
index 00000000..ac225c6b
--- /dev/null
+++ b/elements/core-deps/pycups.bst
@@ -0,0 +1,11 @@
+kind: distutils
+sources:
+- kind: tar
+  url: http://cyberelk.net/tim/data/pycups/pycups-1.9.73.tar.bz2
+
+depends:
+- freedesktop-sdk.bst:components/cups.bst
+- freedesktop-sdk.bst:components/python3.bst
+
+variables:
+  python: python3
diff --git a/elements/core-deps/system-config-printer.bst b/elements/core-deps/system-config-printer.bst
new file mode 100644
index 00000000..15fbbca6
--- /dev/null
+++ b/elements/core-deps/system-config-printer.bst
@@ -0,0 +1,22 @@
+kind: autotools
+
+sources:
+- kind: tar
+  url: 
https://github.com/OpenPrinting/system-config-printer/releases/download/1.5.12/system-config-printer-1.5.12.tar.xz
+
+build-depends:
+- core-deps/intltool.bst
+- freedesktop-sdk.bst:public-stacks/buildsystem-autotools.bst
+- freedesktop-sdk.bst:components/desktop-file-utils.bst
+- freedesktop-sdk.bst:components/docbook-xsl.bst
+- freedesktop-sdk.bst:components/libxslt.bst
+- freedesktop-sdk.bst:components/xmlto.bst
+
+depends:
+- sdk/gtk+-3.bst
+- sdk/pygobject.bst
+- core-deps/pycups.bst
+- freedesktop-sdk.bst:components/cups-daemon.bst
+- freedesktop-sdk.bst:components/python3-dbus.bst
+- freedesktop-sdk.bst:components/python3-requests.bst
+- freedesktop-sdk.bst:components/systemd.bst
diff --git a/elements/core/gnome-control-center.bst b/elements/core/gnome-control-center.bst
index 1d023509..41f5e948 100644
--- a/elements/core/gnome-control-center.bst
+++ b/elements/core/gnome-control-center.bst
@@ -28,6 +28,7 @@ depends:
 - core-deps/libhandy-0.bst
 - core-deps/libnma.bst
 - core-deps/samba.bst
+- core-deps/system-config-printer.bst
 - core-deps/udisks2.bst
 - core-deps/upower.bst
 - core/cheese.bst
diff --git a/elements/core/gnome-settings-daemon.bst b/elements/core/gnome-settings-daemon.bst
index 1fb5409c..0f844062 100644
--- a/elements/core/gnome-settings-daemon.bst
+++ b/elements/core/gnome-settings-daemon.bst
@@ -15,6 +15,7 @@ depends:
 - core-deps/ModemManager.bst
 - core-deps/NetworkManager.bst
 - core-deps/colord.bst
+- core-deps/cups-pk-helper.bst
 - core-deps/geocode-glib.bst
 - core-deps/libcanberra.bst
 - core-deps/libgweather.bst
@@ -28,7 +29,6 @@ depends:
 - sdk/ibus.bst
 - sdk/libnotify.bst
 - freedesktop-sdk.bst:components/alsa-lib.bst
-- freedesktop-sdk.bst:components/cups.bst
 - freedesktop-sdk.bst:components/libgudev.bst
 - freedesktop-sdk.bst:components/libwacom.bst
 - freedesktop-sdk.bst:components/xorg-lib-xtst.bst
diff --git a/files/cups-pk-helper/cups-pk-helper.service b/files/cups-pk-helper/cups-pk-helper.service
new file mode 100644
index 00000000..0f0ec529
--- /dev/null
+++ b/files/cups-pk-helper/cups-pk-helper.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Cups PolicyKit helper
+
+[Service]
+Type=dbus
+BusName=org.opensuse.CupsPkHelper.Mechanism
+ExecStart=/usr/libexec/cups-pk-helper-mechanism
+User=root


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]