From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- poky/meta/recipes-extended/cups/cups.inc | 110 +++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 poky/meta/recipes-extended/cups/cups.inc (limited to 'poky/meta/recipes-extended/cups/cups.inc') diff --git a/poky/meta/recipes-extended/cups/cups.inc b/poky/meta/recipes-extended/cups/cups.inc new file mode 100644 index 0000000000..ac4d225c1a --- /dev/null +++ b/poky/meta/recipes-extended/cups/cups.inc @@ -0,0 +1,110 @@ +SUMMARY = "An Internet printing system for Unix" +HOMEPAGE = "https://www.cups.org/" +SECTION = "console/utils" +LICENSE = "GPLv2 & LGPLv2" +DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb" + +SRC_URI = "https://github.com/apple/cups/releases/download/v${PV}/${BP}-source.tar.gz \ + file://use_echo_only_in_init.patch \ + file://0001-don-t-try-to-run-generated-binaries.patch \ + file://cups_serverbin.patch \ + " + +UPSTREAM_CHECK_URI = "https://github.com/apple/cups/releases" +UPSTREAM_CHECK_REGEX = "cups-(?P\d+\.\d+(\.\d+)?)-source.tar" + +LEAD_SONAME = "libcupsdriver.so" + +CLEANBROKEN = "1" + +inherit autotools-brokensep binconfig useradd systemd pkgconfig + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system lpadmin" + +SYSTEMD_SERVICE_${PN} = "org.cups.cupsd.socket org.cups.cupsd.path org.cups.cupsd.service org.cups.cups-lpd.socket org.cups.cups-lpd@.service" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)}" +PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" +PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl" +PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam" +PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd" +PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd" + +EXTRA_OECONF = " \ + --enable-gnutls \ + --enable-dbus \ + --enable-browsing \ + --disable-gssapi \ + --enable-debug \ + --disable-relro \ + --enable-libusb \ + --without-php \ + --without-perl \ + --without-python \ + --without-java \ + DSOFLAGS='${LDFLAGS}' \ + " + +EXTRA_AUTORECONF += "--exclude=autoheader" + +do_compile () { + echo "all:" > man/Makefile + echo "libs:" >> man/Makefile + echo "install:" >> man/Makefile + echo "install-data:" >> man/Makefile + echo "install-exec:" >> man/Makefile + echo "install-headers:" >> man/Makefile + echo "install-libs:" >> man/Makefile + + oe_runmake +} + +do_install () { + oe_runmake "DSTROOT=${D}" install + + # Remove /var/run from package as cupsd will populate it on startup + rm -fr ${D}/${localstatedir}/run + rmdir ${D}/${libdir}/${BPN}/driver + + # Fix the pam configuration file permissions + if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then + chmod 0644 ${D}${sysconfdir}/pam.d/cups + fi + + # Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then + rm -rf ${D}${sysconfdir}/init.d/ + rm -rf ${D}${sysconfdir}/rc* + fi +} + +PACKAGES =+ "${PN}-lib ${PN}-libimage" + +RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}" +FILES_${PN} += "${libdir}/cups/backend \ + ${libdir}/cups/cgi-bin \ + ${libdir}/cups/filter \ + ${libdir}/cups/monitor \ + ${libdir}/cups/notifier \ + ${libdir}/cups/daemon \ + " + +FILES_${PN}-lib = "${libdir}/libcups.so.*" + +FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*" + +#package the html for the webgui inside the main packages (~1MB uncompressed) + +FILES_${PN} += "${datadir}/doc/cups/images \ + ${datadir}/doc/cups/*html \ + ${datadir}/doc/cups/*.css \ + ${datadir}/icons/ \ + " +CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf" + +SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess" +cups_sysroot_preprocess () { + sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:' +} -- cgit v1.2.3