summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/cups
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-11 00:08:40 +0000
commitea40bc3c75ddaf870d3c4bf29499f1859ccd055a (patch)
tree160f281d7dea746cad70e40abe803906c0ff468f /meta/recipes-extended/cups
parent51553b3f28ec057c91da12efbeda3b5cecfd4960 (diff)
downloadpoky-ea40bc3c75ddaf870d3c4bf29499f1859ccd055a.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: 2c9bd267ec532cd86a4a1be1d4e499e2aae89aba) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/cups')
-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 1b522d7d85..da320b1085 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -47,6 +47,7 @@ PACKAGECONFIG[gnutls] = "--with-tls=gnutls,--with-tls=no,gnutls"
47PACKAGECONFIG[pam] = "--enable-pam --with-pam-module=unix, --disable-pam, libpam" 47PACKAGECONFIG[pam] = "--enable-pam --with-pam-module=unix, --disable-pam, libpam"
48PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd" 48PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd"
49PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd" 49PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd"
50PACKAGECONFIG[webif] = "--enable-webif,--disable-webif"
50 51
51EXTRA_OECONF = " \ 52EXTRA_OECONF = " \
52 --enable-dbus \ 53 --enable-dbus \
@@ -92,7 +93,7 @@ do_install () {
92 fi 93 fi
93} 94}
94 95
95PACKAGES =+ "${PN}-lib ${PN}-libimage" 96PACKAGES =+ "${PN}-lib ${PN}-libimage ${PN}-webif"
96 97
97RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}" 98RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}"
98FILES:${PN} += "${libexecdir}/cups/" 99FILES:${PN} += "${libexecdir}/cups/"
@@ -101,13 +102,10 @@ FILES:${PN}-lib = "${libdir}/libcups.so.*"
101 102
102FILES:${PN}-libimage = "${libdir}/libcupsimage.so.*" 103FILES:${PN}-libimage = "${libdir}/libcupsimage.so.*"
103 104
104#package the html for the webgui inside the main packages (~1MB uncompressed) 105# put the html for the web interface into its own PACKAGE
106FILES:${PN}-webif += "${datadir}/doc/cups/ ${datadir}/icons/"
107RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'webif', '${PN}-webif', '', d)}"
105 108
106FILES:${PN} += "${datadir}/doc/cups/images \
107 ${datadir}/doc/cups/*html \
108 ${datadir}/doc/cups/*.css \
109 ${datadir}/icons/ \
110 "
111CONFFILES:${PN} += "${sysconfdir}/cups/cupsd.conf" 109CONFFILES:${PN} += "${sysconfdir}/cups/cupsd.conf"
112 110
113MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/cups-config" 111MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/cups-config"