diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 22:31:25 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 19:43:26 +0300 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-extended/cups | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.xz |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-extended/cups')
5 files changed, 238 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cups/cups.inc b/import-layers/yocto-poky/meta/recipes-extended/cups/cups.inc new file mode 100644 index 000000000..4b2d21409 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/cups/cups.inc @@ -0,0 +1,116 @@ +SUMMARY = "An Internet printing system for Unix" +SECTION = "console/utils" +LICENSE = "GPLv2 & LGPLv2" +DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb" + +SRC_URI = "https://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \ + file://use_echo_only_in_init.patch \ + file://0001-don-t-try-to-run-generated-binaries.patch \ + file://cups_serverbin.patch \ + " + +UPSTREAM_CHECK_URI = "http://www.cups.org/software.php" +UPSTREAM_CHECK_REGEX = "cups-(?P<pver>\d+\.\d+(\.\d+)?)-source.tar" + +LEAD_SONAME = "libcupsdriver.so" + +CLEANBROKEN = "1" + +inherit autotools-brokensep binconfig useradd systemd + +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.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', 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 \ + " + +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 +} + +python do_package_append() { + import subprocess + # Change permissions back the way they were, they probably had a reason... + workdir = d.getVar('WORKDIR', True) + subprocess.call('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir, shell=True) +} + +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/import-layers/yocto-poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/import-layers/yocto-poky/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch new file mode 100644 index 000000000..5379eb6aa --- /dev/null +++ b/import-layers/yocto-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.0.0/ppdc/Makefile +=================================================================== +--- cups-2.0.0.orig/ppdc/Makefile ++++ cups-2.0.0/ppdc/Makefile +@@ -242,8 +242,8 @@ genstrings: genstrings.o libcupsppdc.a + $(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 + + + # +@@ -260,9 +260,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cu + $(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 + + + # +@@ -288,17 +288,17 @@ ppdi-static: ppdc-static ppdi.o libcups + $(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/import-layers/yocto-poky/meta/recipes-extended/cups/cups/cups_serverbin.patch b/import-layers/yocto-poky/meta/recipes-extended/cups/cups/cups_serverbin.patch new file mode 100644 index 000000000..f7b44a7bc --- /dev/null +++ b/import-layers/yocto-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/import-layers/yocto-poky/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch b/import-layers/yocto-poky/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch new file mode 100644 index 000000000..696f1374d --- /dev/null +++ b/import-layers/yocto-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/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb b/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb new file mode 100644 index 000000000..aef211d91 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb @@ -0,0 +1,6 @@ +require cups.inc + +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0" + +SRC_URI[md5sum] = "62b8fafd590e75f72316915790b0850a" +SRC_URI[sha256sum] = "36a70d43584aea2617da914b9331e23341c3501a8254c4d2eae9c11ec01fd4d3" |