summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-extended/cups
diff options
context:
space:
mode:
authorDave Cobbley <david.j.cobbley@linux.intel.com>2018-08-14 20:05:37 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-23 04:26:31 +0300
commiteb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch)
treede291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/recipes-extended/cups
parent9c3cf826d853102535ead04cebc2d6023eff3032 (diff)
downloadopenbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz
[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 <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-extended/cups')
-rw-r--r--poky/meta/recipes-extended/cups/cups.inc110
-rw-r--r--poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch69
-rw-r--r--poky/meta/recipes-extended/cups/cups/cups_serverbin.patch32
-rw-r--r--poky/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch15
-rw-r--r--poky/meta/recipes-extended/cups/cups_2.2.6.bb6
5 files changed, 232 insertions, 0 deletions
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<pver>\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:'
+}
diff --git a/poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
new file mode 100644
index 0000000000..db013cf08c
--- /dev/null
+++ b/poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
@@ -0,0 +1,69 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Sun, 30 Jan 2011 16:37:27 +0100
+Subject: [PATCH] don't try to run generated binaries
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ ppdc/Makefile | 30 +++++++++++++++---------------
+ 1 files changed, 15 insertions(+), 15 deletions(-)
+
+Index: cups-2.2.6/ppdc/Makefile
+===================================================================
+--- cups-2.2.6.orig/ppdc/Makefile
++++ cups-2.2.6/ppdc/Makefile
+@@ -228,8 +228,8 @@ genstrings: genstrings.o libcupsppdc.a
+ $(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
+ libcupsppdc.a ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) \
+ $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+- echo Generating localization strings...
+- ./genstrings >sample.c
++# echo Generating localization strings...
++# ./genstrings >sample.c
+
+
+ #
+@@ -246,9 +246,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cu
+ $(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
+ ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+ $(COMMONLIBS) $(LIBZ)
+- echo Testing PPD compiler...
+- ./ppdc-static -l en,fr -I ../data foo.drv
+- ./ppdc-static -l en,fr -z -I ../data foo.drv
++# echo Testing PPD compiler...
++# ./ppdc-static -l en,fr -I ../data foo.drv
++# ./ppdc-static -l en,fr -z -I ../data foo.drv
+
+
+ #
+@@ -274,17 +274,17 @@ ppdi-static: ppdc-static ppdi.o libcups
+ $(LD_CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \
+ ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+ $(COMMONLIBS) $(LIBZ)
+- echo Testing PPD importer...
+- $(RM) -r ppd ppd2 sample-import.drv
+- ./ppdc-static -l en -I ../data sample.drv
+- ./ppdi-static -I ../data -o sample-import.drv ppd/*
+- ./ppdc-static -l en -I ../data -d ppd2 sample-import.drv
+- if diff -r ppd ppd2 >/dev/null; then \
+- echo PPD import OK; \
+- else \
+- echo PPD import FAILED; \
+- exit 1; \
+- fi
++# echo Testing PPD importer...
++# $(RM) -r ppd ppd2 sample-import.drv
++# ./ppdc-static -l en -I ../data sample.drv
++# ./ppdi-static -I ../data -o sample-import.drv ppd/*
++# ./ppdc-static -l en -I ../data -d ppd2 sample-import.drv
++# if diff -r ppd ppd2 >/dev/null; then \
++# echo PPD import OK; \
++# else \
++# echo PPD import FAILED; \
++# exit 1; \
++# fi
+
+
+ #
diff --git a/poky/meta/recipes-extended/cups/cups/cups_serverbin.patch b/poky/meta/recipes-extended/cups/cups/cups_serverbin.patch
new file mode 100644
index 0000000000..f7b44a7bc1
--- /dev/null
+++ b/poky/meta/recipes-extended/cups/cups/cups_serverbin.patch
@@ -0,0 +1,32 @@
+Make CUPS_SERVERBIN relative to libdir otherwise on 64bit arches
+e.g. ppc64 where base libdir is lib64 this does not go well
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate [OE config specific]
+
+Index: cups-1.4.6/config-scripts/cups-directories.m4
+===================================================================
+--- cups-1.4.6.orig/config-scripts/cups-directories.m4 2009-04-12 16:04:51.000000000 -0700
++++ cups-1.4.6/config-scripts/cups-directories.m4 2012-07-21 12:12:05.896405923 -0700
+@@ -397,7 +397,7 @@
+ *)
+ # All others
+ INSTALL_SYSV="install-sysv"
+- CUPS_SERVERBIN="$exec_prefix/lib/cups"
++ CUPS_SERVERBIN="$libdir/cups"
+ ;;
+ esac
+
+Index: cups-1.4.6/configure
+===================================================================
+--- cups-1.4.6.orig/configure 2012-07-21 12:13:34.512405950 -0700
++++ cups-1.4.6/configure 2012-07-21 12:14:05.724406017 -0700
+@@ -11181,7 +11181,7 @@
+ *)
+ # All others
+ INSTALL_SYSV="install-sysv"
+- CUPS_SERVERBIN="$exec_prefix/lib/cups"
++ CUPS_SERVERBIN="$libdir/cups"
+ ;;
+ esac
+
diff --git a/poky/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch b/poky/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch
new file mode 100644
index 0000000000..696f1374d9
--- /dev/null
+++ b/poky/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Index: cups-1.6.1/scheduler/cups.sh.in
+===================================================================
+--- cups-1.6.1.orig/scheduler/cups.sh.in
++++ cups-1.6.1/scheduler/cups.sh.in
+@@ -67,7 +67,7 @@ case "`uname`" in
+ ECHO_ERROR=:
+ ;;
+
+- Linux*)
++ DisableLinux*)
+ IS_ON=/bin/true
+ if test -f /etc/init.d/functions; then
+ . /etc/init.d/functions
diff --git a/poky/meta/recipes-extended/cups/cups_2.2.6.bb b/poky/meta/recipes-extended/cups/cups_2.2.6.bb
new file mode 100644
index 0000000000..3aa934bc03
--- /dev/null
+++ b/poky/meta/recipes-extended/cups/cups_2.2.6.bb
@@ -0,0 +1,6 @@
+require cups.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f212b4338db0da8cb892e94bf2949460"
+
+SRC_URI[md5sum] = "e91c26d8d97b5a1630a962f530f02192"
+SRC_URI[sha256sum] = "40385778c2b3bdf55030d1c999734e22774c79e3425d91339ce677825620169b"