diff options
Diffstat (limited to 'meta/recipes-extended/cups/cups.inc')
| -rw-r--r-- | meta/recipes-extended/cups/cups.inc | 117 |
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 @@ | |||
| 1 | SUMMARY = "An Internet printing system for Unix" | ||
| 2 | DESCRIPTION = "The Common UNIX Printing System is a printing system and \ | ||
| 3 | general replacement for lpd and the like. It supports the Internet Printing \ | ||
| 4 | Protocol (IPP), and has its own filtering driver model for handling various \ | ||
| 5 | document types." | ||
| 6 | HOMEPAGE = "https://www.cups.org/" | ||
| 7 | SECTION = "console/utils" | ||
| 8 | LICENSE = "Apache-2.0" | ||
| 9 | DEPENDS = "libpng jpeg dbus zlib libusb1" | ||
| 10 | |||
| 11 | SRC_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 | |||
| 20 | GITHUB_BASE_URI = "https://github.com/OpenPrinting/cups/releases" | ||
| 21 | |||
| 22 | CVE_STATUS[CVE-2008-1033] = "not-applicable-platform: Issue only applies to MacOS" | ||
| 23 | CVE_STATUS[CVE-2009-0032] = "cpe-incorrect: Issue affects pdfdistiller plugin used with but not part of cups" | ||
| 24 | CVE_STATUS[CVE-2018-6553] = "not-applicable-platform: This is an Ubuntu only issue" | ||
| 25 | CVE_STATUS[CVE-2022-26691] = "fixed-version: This is fixed in 2.4.2 but the cve-check class still reports it" | ||
| 26 | |||
| 27 | LEAD_SONAME = "libcupsdriver.so" | ||
| 28 | |||
| 29 | CLEANBROKEN = "1" | ||
| 30 | |||
| 31 | inherit autotools-brokensep binconfig useradd systemd pkgconfig multilib_script github-releases | ||
| 32 | |||
| 33 | USERADD_PACKAGES = "${PN}" | ||
| 34 | GROUPADD_PARAM:${PN} = "--system lpadmin" | ||
| 35 | |||
| 36 | SYSTEMD_SERVICE:${PN} = "cups.socket cups.path cups.service cups-lpd.socket" | ||
| 37 | |||
| 38 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ | ||
| 39 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \ | ||
| 40 | openssl \ | ||
| 41 | " | ||
| 42 | PACKAGECONFIG[avahi] = "--with-dnssd=avahi,--with-dnssd=no,avahi" | ||
| 43 | PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl" | ||
| 44 | PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls,,,openssl" | ||
| 45 | PACKAGECONFIG[openssl] = "--with-tls=openssl,,openssl,,,gnutls" | ||
| 46 | PACKAGECONFIG[pam] = "--enable-pam --with-pam-module=unix, --disable-pam, libpam" | ||
| 47 | PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd" | ||
| 48 | PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd" | ||
| 49 | PACKAGECONFIG[webif] = "--enable-webif,--disable-webif" | ||
| 50 | |||
| 51 | EXTRA_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 | |||
| 66 | EXTRA_AUTORECONF += "--exclude=autoheader" | ||
| 67 | |||
| 68 | do_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 | |||
| 95 | PACKAGES =+ "${PN}-lib ${PN}-libimage ${PN}-webif" | ||
| 96 | |||
| 97 | RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}" | ||
| 98 | FILES:${PN} += "${libexecdir}/cups/ ${systemd_system_unitdir}/system-cups.slice" | ||
| 99 | |||
| 100 | FILES:${PN}-lib = "${libdir}/libcups.so.*" | ||
| 101 | |||
| 102 | FILES:${PN}-libimage = "${libdir}/libcupsimage.so.*" | ||
| 103 | |||
| 104 | # put the html for the web interface into its own PACKAGE | ||
| 105 | FILES:${PN}-webif += "${datadir}/doc/cups/ ${datadir}/icons/" | ||
| 106 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'webif', '${PN}-webif', '', d)}" | ||
| 107 | |||
| 108 | CONFFILES:${PN} += "${sysconfdir}/cups/cupsd.conf" | ||
| 109 | |||
| 110 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/cups-config" | ||
| 111 | |||
| 112 | LOCALE_PATHS += "${datadir}/cups/templates" | ||
| 113 | |||
| 114 | SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess" | ||
| 115 | cups_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 | } | ||
