From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- meta/recipes-extended/cups/cups.inc | 136 +++++++++++++++++++++ .../0001-don-t-try-to-run-generated-binaries.patch | 70 +++++++++++ .../cups/cups/cups-no-gcrypt.patch | 49 ++++++++ meta/recipes-extended/cups/cups/cups.path | 8 ++ meta/recipes-extended/cups/cups/cups.service | 10 ++ meta/recipes-extended/cups/cups/cups.socket | 8 ++ .../cups/cups/cups_serverbin.patch | 32 +++++ .../cups/cups/use_echo_only_in_init.patch | 15 +++ meta/recipes-extended/cups/cups_1.7.5.bb | 6 + 9 files changed, 334 insertions(+) create mode 100644 meta/recipes-extended/cups/cups.inc create mode 100644 meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch create mode 100644 meta/recipes-extended/cups/cups/cups-no-gcrypt.patch create mode 100644 meta/recipes-extended/cups/cups/cups.path create mode 100644 meta/recipes-extended/cups/cups/cups.service create mode 100644 meta/recipes-extended/cups/cups/cups.socket create mode 100644 meta/recipes-extended/cups/cups/cups_serverbin.patch create mode 100644 meta/recipes-extended/cups/cups/use_echo_only_in_init.patch create mode 100644 meta/recipes-extended/cups/cups_1.7.5.bb (limited to 'meta/recipes-extended/cups') diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc new file mode 100644 index 0000000000..fbdc48eab1 --- /dev/null +++ b/meta/recipes-extended/cups/cups.inc @@ -0,0 +1,136 @@ +SUMMARY = "An Internet printing system for Unix" +SECTION = "console/utils" +LICENSE = "GPLv2 & LGPLv2" +DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb" + +SRC_URI = "http://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 \ + file://cups-no-gcrypt.patch \ + file://cups.socket \ + file://cups.path \ + file://cups.service \ + " + +LEAD_SONAME = "libcupsdriver.so" + +inherit autotools-brokensep binconfig useradd systemd + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system lpadmin" + +SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', 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" + +EXTRA_OECONF = " \ + --enable-gnutls \ + --enable-dbus \ + --enable-browsing \ + --disable-openssl \ + --disable-gssapi \ + --enable-debug \ + --disable-relro \ + --enable-libusb \ + --without-php \ + --without-perl \ + --without-python \ + --without-java \ + " + + +do_configure() { + gnu-configize + libtoolize --force + autoconf --force + DSOFLAGS="${LDFLAGS}" SERVERBIN="${libdir}/cups" oe_runconf +} + +do_compile () { + sed -i s:STRIP:NOSTRIP: Makedefs + sed -i s:serial:: backend/Makefile + + 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 "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \ + "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \ + "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \ + "LIBZ=-lz -L${STAGING_LIBDIR}" \ + "-I." +} + +fakeroot 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 + + # 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 + + # Install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service +} + +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.*" + +FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \ + ${libdir}/cups/cgi-bin/.debug \ + ${libdir}/cups/filter/.debug \ + ${libdir}/cups/monitor/.debug \ + ${libdir}/cups/notifier/.debug \ + ${libdir}/cups/daemon/.debug \ + " + +#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/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch new file mode 100644 index 0000000000..e6544b5607 --- /dev/null +++ b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch @@ -0,0 +1,70 @@ +Upstream-Status: Inappropriate [embedded specific] + +From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Sun, 30 Jan 2011 16:37:27 +0100 +Subject: [PATCH] don't try to run generated binaries + +Signed-off-by: Koen Kooi +--- + ppdc/Makefile | 30 +++++++++++++++--------------- + 1 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/ppdc/Makefile b/ppdc/Makefile +index 0288d47..fc87f1b 100644 +--- a/ppdc/Makefile ++++ b/ppdc/Makefile +@@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \ + $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \ + libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \ + $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) +- echo Generating localization strings... +- ./genstrings >sample.c ++# echo Generating localization strings... ++# ./genstrings >sample.c + + + # +@@ -261,9 +261,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po + $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \ + ../cups/libcups.a $(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 + + + # +@@ -290,16 +290,16 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a + ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ + $(COMMONLIBS) $(LIBZ) + echo Testing PPD importer... +- $(RM) -r ppd ppd2 sample-import.drv +- ./ppdc-static -I ../data sample.drv +- ./ppdi-static -I ../data -o sample-import.drv ppd/* +- ./ppdc-static -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 ++# $(RM) -r ppd ppd2 sample-import.drv ++# ./ppdc-static -I ../data sample.drv ++# ./ppdi-static -I ../data -o sample-import.drv ppd/* ++# ./ppdc-static -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 + + + # +-- +1.6.6.1 + diff --git a/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch b/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch new file mode 100644 index 0000000000..8bbcf39497 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch @@ -0,0 +1,49 @@ +Description: Don't build-depend on libgcrypt, as nothing is used from it +Author: Didier Raboud +Bug-Debian: https://bugs.debian.org/638416 +Bug: http://www.cups.org/str.php?L???? + +[CUPS Ticket #4399] -- http://www.cups.org/str.php?L4399 + +Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch + +Upstream-Status: Backport + +Signed-off-by: Armin Kuster + +Last-Update: 2014-04-07 +--- a/config-scripts/cups-ssl.m4 ++++ b/config-scripts/cups-ssl.m4 +@@ -66,7 +66,6 @@ + dnl Then look for GNU TLS... + if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then + AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config) +- AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config) + if $PKGCONFIG --exists gnutls; then + have_ssl=1 + SSLLIBS=`$PKGCONFIG --libs gnutls` +@@ -84,14 +83,6 @@ + if test $have_ssl = 1; then + CUPS_SERVERCERT="ssl/server.crt" + CUPS_SERVERKEY="ssl/server.key" +- +- if $PKGCONFIG --exists gcrypt; then +- SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`" +- SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`" +- elif test "x$LIBGCRYPTCONFIG" != x; then +- SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`" +- SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`" +- fi + fi + fi + +--- a/cups/http-private.h ++++ b/cups/http-private.h +@@ -80,7 +80,6 @@ + # elif defined HAVE_GNUTLS + # include + # include +-# include + # elif defined(HAVE_CDSASSL) + # include + # include diff --git a/meta/recipes-extended/cups/cups/cups.path b/meta/recipes-extended/cups/cups/cups.path new file mode 100644 index 0000000000..de8cc57c27 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups.path @@ -0,0 +1,8 @@ +[Unit] +Description=CUPS Printer Service Spool + +[Path] +PathExistsGlob=/var/spool/cups/d* + +[Install] +WantedBy=multi-user.target diff --git a/meta/recipes-extended/cups/cups/cups.service b/meta/recipes-extended/cups/cups/cups.service new file mode 100644 index 0000000000..7d3e839867 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups.service @@ -0,0 +1,10 @@ +[Unit] +Description=CUPS Printing Service + +[Service] +ExecStart=@SBINDIR@/cupsd -f +PrivateTmp=true + +[Install] +Also=cups.socket cups.path +WantedBy=printer.target diff --git a/meta/recipes-extended/cups/cups/cups.socket b/meta/recipes-extended/cups/cups/cups.socket new file mode 100644 index 0000000000..33148705d6 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups.socket @@ -0,0 +1,8 @@ +[Unit] +Description=CUPS Printing Service Sockets + +[Socket] +ListenStream=/var/run/cups/cups.sock + +[Install] +WantedBy=sockets.target diff --git a/meta/recipes-extended/cups/cups/cups_serverbin.patch b/meta/recipes-extended/cups/cups/cups_serverbin.patch new file mode 100644 index 0000000000..f7b44a7bc1 --- /dev/null +++ b/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 +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/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch b/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch new file mode 100644 index 0000000000..696f1374d9 --- /dev/null +++ b/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/meta/recipes-extended/cups/cups_1.7.5.bb b/meta/recipes-extended/cups/cups_1.7.5.bb new file mode 100644 index 0000000000..5538cecfd5 --- /dev/null +++ b/meta/recipes-extended/cups/cups_1.7.5.bb @@ -0,0 +1,6 @@ +require cups.inc + +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c5e50cb4b8f24b04636b719683a9102d" + +SRC_URI[md5sum] = "5d893edc2957005f78e2b2423fdace2e" +SRC_URI[sha256sum] = "18cb4c6847dbaaaa05c8b35af787f19dd5c7686970b46548e72c711c6f26bd02" -- cgit v1.2.3-54-g00ecf