summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/cups/cups.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/cups/cups.inc')
-rw-r--r--meta/recipes-extended/cups/cups.inc117
1 files changed, 0 insertions, 117 deletions
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
deleted file mode 100644
index 24ebcc4aae..0000000000
--- a/meta/recipes-extended/cups/cups.inc
+++ /dev/null
@@ -1,117 +0,0 @@
1SUMMARY = "An Internet printing system for Unix"
2DESCRIPTION = "The Common UNIX Printing System is a printing system and \
3general replacement for lpd and the like. It supports the Internet Printing \
4Protocol (IPP), and has its own filtering driver model for handling various \
5document types."
6HOMEPAGE = "https://www.cups.org/"
7SECTION = "console/utils"
8LICENSE = "Apache-2.0"
9DEPENDS = "libpng jpeg dbus zlib libusb1"
10
11SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/cups-${PV}-source.tar.gz \
12 file://0001-use-echo-only-in-init.patch \
13 file://0002-don-t-try-to-run-generated-binaries.patch \
14 file://libexecdir.patch \
15 file://0004-cups-fix-multilib-install-file-conflicts.patch \
16 file://volatiles.99_cups \
17 file://cups-volatiles.conf \
18 "
19
20GITHUB_BASE_URI = "https://github.com/OpenPrinting/cups/releases"
21
22CVE_STATUS[CVE-2008-1033] = "not-applicable-platform: Issue only applies to MacOS"
23CVE_STATUS[CVE-2009-0032] = "cpe-incorrect: Issue affects pdfdistiller plugin used with but not part of cups"
24CVE_STATUS[CVE-2018-6553] = "not-applicable-platform: This is an Ubuntu only issue"
25CVE_STATUS[CVE-2022-26691] = "fixed-version: This is fixed in 2.4.2 but the cve-check class still reports it"
26
27LEAD_SONAME = "libcupsdriver.so"
28
29CLEANBROKEN = "1"
30
31inherit autotools-brokensep binconfig useradd systemd pkgconfig multilib_script github-releases
32
33USERADD_PACKAGES = "${PN}"
34GROUPADD_PARAM:${PN} = "--system lpadmin"
35
36SYSTEMD_SERVICE:${PN} = "cups.socket cups.path cups.service cups-lpd.socket"
37
38PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
39 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \
40 openssl \
41"
42PACKAGECONFIG[avahi] = "--with-dnssd=avahi,--with-dnssd=no,avahi"
43PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
44PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls,,,openssl"
45PACKAGECONFIG[openssl] = "--with-tls=openssl,,openssl,,,gnutls"
46PACKAGECONFIG[pam] = "--enable-pam --with-pam-module=unix, --disable-pam, libpam"
47PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd"
48PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd"
49PACKAGECONFIG[webif] = "--enable-webif,--disable-webif"
50
51EXTRA_OECONF = " \
52 --enable-dbus \
53 --with-dbusdir=${sysconfdir}/dbus-1 \
54 --enable-browsing \
55 --disable-gssapi \
56 --enable-debug \
57 --disable-relro \
58 --enable-libusb \
59 --with-system-groups=lpadmin,root,sys,wheel \
60 --with-cups-group=lp \
61 --with-domainsocket=/run/cups/cups.sock \
62 --with-pkgconfpath=${libdir}/pkgconfig \
63 DSOFLAGS='${LDFLAGS}' \
64 "
65
66EXTRA_AUTORECONF += "--exclude=autoheader"
67
68do_install () {
69 oe_runmake "BUILDROOT=${D}" install
70
71 # Remove /var/run from package as cupsd will populate it on startup
72 rm -fr ${D}/${localstatedir}/run
73 rm -fr ${D}/${localstatedir}/log
74 rmdir ${D}/${libexecdir}/${BPN}/driver
75
76 # Fix the pam configuration file permissions
77 if ${@bb.utils.contains('PACKAGECONFIG', 'pam', 'true', 'false', d)}; then
78 chmod 0644 ${D}${sysconfdir}/pam.d/cups
79 fi
80
81 # Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES
82 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then
83 rm -rf ${D}${sysconfdir}/init.d/
84 rm -rf ${D}${sysconfdir}/rc*
85 install -d ${D}${sysconfdir}/tmpfiles.d
86 install -m 0644 ${UNPACKDIR}/cups-volatiles.conf \
87 ${D}${sysconfdir}/tmpfiles.d/cups.conf
88 else
89 install -d ${D}${sysconfdir}/default/volatiles
90 install -m 0644 ${UNPACKDIR}/volatiles.99_cups \
91 ${D}${sysconfdir}/default/volatiles/99_cups
92 fi
93}
94
95PACKAGES =+ "${PN}-lib ${PN}-libimage ${PN}-webif"
96
97RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}"
98FILES:${PN} += "${libexecdir}/cups/ ${systemd_system_unitdir}/system-cups.slice"
99
100FILES:${PN}-lib = "${libdir}/libcups.so.*"
101
102FILES:${PN}-libimage = "${libdir}/libcupsimage.so.*"
103
104# put the html for the web interface into its own PACKAGE
105FILES:${PN}-webif += "${datadir}/doc/cups/ ${datadir}/icons/"
106RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'webif', '${PN}-webif', '', d)}"
107
108CONFFILES:${PN} += "${sysconfdir}/cups/cupsd.conf"
109
110MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/cups-config"
111
112LOCALE_PATHS += "${datadir}/cups/templates"
113
114SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess"
115cups_sysroot_preprocess () {
116 sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libexecdir}/cups:'
117}