summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2023-03-08 17:44:42 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-23 22:45:34 +0000
commitee80e8219735e1c97c4cda984d8427379f37f711 (patch)
tree5f7194ad1e70dff6d6f894f767c5397f05372e2a
parent86ea4bde713d30f152792806197f120d170490bb (diff)
downloadpoky-ee80e8219735e1c97c4cda984d8427379f37f711.tar.gz
cups: add/fix web interface packaging
cups includes a web server. Users can surf to port 631 (default) of a machine running cups to (potentially, based on configuration, default off) view jobs, add printers, and perform other forms of administration. The location of the various resources that are used by the built-in web server (e.g. index.html) are installed under ${datadir}/doc/cups. By default these artifacts would be included in the ${PN}-doc package. The comments in this recipe, however, would suggest an attempt was made to have them added to ${PN}; albeit unsuccessfully. These resources add roughly 1.8M to an image. Since cups does include a configuration option to disable the web interface (--enable-webif), add a PACKAGECONFIG (default off) to allow the user to decide whether or not they would like the web interface configured and its pieces added to the image. Enabling this PACKAGECONFIG both enables the web interface to be configured and built into cups, and also adds (by way of a recommendation) the web interface package to the image. Considering that the previous intention was not working, defaulting this option to off preserves the existing behaviour. Previously in order to have the web interface data included in an image, a user would have needed to explicitly add the ${PN}-doc package to their image. (From OE-Core rev: 18194378508beda1ca1fee84e10351b5bf0d86a5) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 2c9bd267ec532cd86a4a1be1d4e499e2aae89aba) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/cups/cups.inc12
1 files changed, 5 insertions, 7 deletions
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
index 714be4b26c..0acc5c575e 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -48,6 +48,7 @@ PACKAGECONFIG[gnutls] = "--with-tls=gnutls,--with-tls=no,gnutls"
48PACKAGECONFIG[pam] = "--enable-pam --with-pam-module=unix, --disable-pam, libpam" 48PACKAGECONFIG[pam] = "--enable-pam --with-pam-module=unix, --disable-pam, libpam"
49PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd" 49PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd"
50PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd" 50PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd"
51PACKAGECONFIG[webif] = "--enable-webif,--disable-webif"
51 52
52EXTRA_OECONF = " \ 53EXTRA_OECONF = " \
53 --enable-dbus \ 54 --enable-dbus \
@@ -93,7 +94,7 @@ do_install () {
93 fi 94 fi
94} 95}
95 96
96PACKAGES =+ "${PN}-lib ${PN}-libimage" 97PACKAGES =+ "${PN}-lib ${PN}-libimage ${PN}-webif"
97 98
98RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}" 99RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}"
99FILES:${PN} += "${libexecdir}/cups/" 100FILES:${PN} += "${libexecdir}/cups/"
@@ -102,13 +103,10 @@ FILES:${PN}-lib = "${libdir}/libcups.so.*"
102 103
103FILES:${PN}-libimage = "${libdir}/libcupsimage.so.*" 104FILES:${PN}-libimage = "${libdir}/libcupsimage.so.*"
104 105
105#package the html for the webgui inside the main packages (~1MB uncompressed) 106# put the html for the web interface into its own PACKAGE
107FILES:${PN}-webif += "${datadir}/doc/cups/ ${datadir}/icons/"
108RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'webif', '${PN}-webif', '', d)}"
106 109
107FILES:${PN} += "${datadir}/doc/cups/images \
108 ${datadir}/doc/cups/*html \
109 ${datadir}/doc/cups/*.css \
110 ${datadir}/icons/ \
111 "
112CONFFILES:${PN} += "${sysconfdir}/cups/cupsd.conf" 110CONFFILES:${PN} += "${sysconfdir}/cups/cupsd.conf"
113 111
114MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/cups-config" 112MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/cups-config"