summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/cups
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-extended/cups
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-extended/cups')
-rw-r--r--meta/recipes-extended/cups/cups.inc136
-rw-r--r--meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch70
-rw-r--r--meta/recipes-extended/cups/cups/cups-no-gcrypt.patch49
-rw-r--r--meta/recipes-extended/cups/cups/cups.path8
-rw-r--r--meta/recipes-extended/cups/cups/cups.service10
-rw-r--r--meta/recipes-extended/cups/cups/cups.socket8
-rw-r--r--meta/recipes-extended/cups/cups/cups_serverbin.patch32
-rw-r--r--meta/recipes-extended/cups/cups/use_echo_only_in_init.patch15
-rw-r--r--meta/recipes-extended/cups/cups_1.7.5.bb6
9 files changed, 334 insertions, 0 deletions
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 @@
1SUMMARY = "An Internet printing system for Unix"
2SECTION = "console/utils"
3LICENSE = "GPLv2 & LGPLv2"
4DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb"
5
6SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
7 file://use_echo_only_in_init.patch \
8 file://0001-don-t-try-to-run-generated-binaries.patch \
9 file://cups_serverbin.patch \
10 file://cups-no-gcrypt.patch \
11 file://cups.socket \
12 file://cups.path \
13 file://cups.service \
14 "
15
16LEAD_SONAME = "libcupsdriver.so"
17
18inherit autotools-brokensep binconfig useradd systemd
19
20USERADD_PACKAGES = "${PN}"
21GROUPADD_PARAM_${PN} = "--system lpadmin"
22
23SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service"
24
25PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
26 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
27PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
28PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
29PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"
30
31EXTRA_OECONF = " \
32 --enable-gnutls \
33 --enable-dbus \
34 --enable-browsing \
35 --disable-openssl \
36 --disable-gssapi \
37 --enable-debug \
38 --disable-relro \
39 --enable-libusb \
40 --without-php \
41 --without-perl \
42 --without-python \
43 --without-java \
44 "
45
46
47do_configure() {
48 gnu-configize
49 libtoolize --force
50 autoconf --force
51 DSOFLAGS="${LDFLAGS}" SERVERBIN="${libdir}/cups" oe_runconf
52}
53
54do_compile () {
55 sed -i s:STRIP:NOSTRIP: Makedefs
56 sed -i s:serial:: backend/Makefile
57
58 echo "all:" > man/Makefile
59 echo "libs:" >> man/Makefile
60 echo "install:" >> man/Makefile
61 echo "install-data:" >> man/Makefile
62 echo "install-exec:" >> man/Makefile
63 echo "install-headers:" >> man/Makefile
64 echo "install-libs:" >> man/Makefile
65
66 oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \
67 "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \
68 "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \
69 "LIBZ=-lz -L${STAGING_LIBDIR}" \
70 "-I."
71}
72
73fakeroot do_install () {
74 oe_runmake "DSTROOT=${D}" install
75
76 # Remove /var/run from package as cupsd will populate it on startup
77 rm -fr ${D}/${localstatedir}/run
78 rmdir ${D}/${libdir}/${BPN}/driver
79
80 # Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES
81 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then
82 rm -rf ${D}${sysconfdir}/init.d/
83 rm -rf ${D}${sysconfdir}/rc*
84 fi
85
86 # Install systemd unit files
87 install -d ${D}${systemd_unitdir}/system
88 install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system
89 install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system
90 install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system
91 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service
92}
93
94python do_package_append() {
95 import subprocess
96 # Change permissions back the way they were, they probably had a reason...
97 workdir = d.getVar('WORKDIR', True)
98 subprocess.call('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir, shell=True)
99}
100
101PACKAGES =+ "${PN}-lib ${PN}-libimage"
102
103RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}"
104FILES_${PN} += "${libdir}/cups/backend \
105 ${libdir}/cups/cgi-bin \
106 ${libdir}/cups/filter \
107 ${libdir}/cups/monitor \
108 ${libdir}/cups/notifier \
109 ${libdir}/cups/daemon \
110 "
111
112FILES_${PN}-lib = "${libdir}/libcups.so.*"
113
114FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
115
116FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \
117 ${libdir}/cups/cgi-bin/.debug \
118 ${libdir}/cups/filter/.debug \
119 ${libdir}/cups/monitor/.debug \
120 ${libdir}/cups/notifier/.debug \
121 ${libdir}/cups/daemon/.debug \
122 "
123
124#package the html for the webgui inside the main packages (~1MB uncompressed)
125
126FILES_${PN} += "${datadir}/doc/cups/images \
127 ${datadir}/doc/cups/*html \
128 ${datadir}/doc/cups/*.css \
129 ${datadir}/icons/ \
130 "
131CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf"
132
133SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess"
134cups_sysroot_preprocess () {
135 sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:'
136}
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 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001
4From: Koen Kooi <koen@dominion.thruhere.net>
5Date: Sun, 30 Jan 2011 16:37:27 +0100
6Subject: [PATCH] don't try to run generated binaries
7
8Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
9---
10 ppdc/Makefile | 30 +++++++++++++++---------------
11 1 files changed, 15 insertions(+), 15 deletions(-)
12
13diff --git a/ppdc/Makefile b/ppdc/Makefile
14index 0288d47..fc87f1b 100644
15--- a/ppdc/Makefile
16+++ b/ppdc/Makefile
17@@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \
18 $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
19 libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \
20 $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
21- echo Generating localization strings...
22- ./genstrings >sample.c
23+# echo Generating localization strings...
24+# ./genstrings >sample.c
25
26
27 #
28@@ -261,9 +261,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po
29 $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
30 ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
31 $(COMMONLIBS) $(LIBZ)
32- echo Testing PPD compiler...
33- ./ppdc-static -l en,fr -I ../data foo.drv
34- ./ppdc-static -l en,fr -z -I ../data foo.drv
35+# echo Testing PPD compiler...
36+# ./ppdc-static -l en,fr -I ../data foo.drv
37+# ./ppdc-static -l en,fr -z -I ../data foo.drv
38
39
40 #
41@@ -290,16 +290,16 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a
42 ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
43 $(COMMONLIBS) $(LIBZ)
44 echo Testing PPD importer...
45- $(RM) -r ppd ppd2 sample-import.drv
46- ./ppdc-static -I ../data sample.drv
47- ./ppdi-static -I ../data -o sample-import.drv ppd/*
48- ./ppdc-static -I ../data -d ppd2 sample-import.drv
49- if diff -r ppd ppd2 >/dev/null; then \
50- echo PPD import OK; \
51- else \
52- echo PPD import FAILED; \
53- exit 1; \
54- fi
55+# $(RM) -r ppd ppd2 sample-import.drv
56+# ./ppdc-static -I ../data sample.drv
57+# ./ppdi-static -I ../data -o sample-import.drv ppd/*
58+# ./ppdc-static -I ../data -d ppd2 sample-import.drv
59+# if diff -r ppd ppd2 >/dev/null; then \
60+# echo PPD import OK; \
61+# else \
62+# echo PPD import FAILED; \
63+# exit 1; \
64+# fi
65
66
67 #
68--
691.6.6.1
70
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 @@
1Description: Don't build-depend on libgcrypt, as nothing is used from it
2Author: Didier Raboud <odyx@debian.org>
3Bug-Debian: https://bugs.debian.org/638416
4Bug: http://www.cups.org/str.php?L????
5
6[CUPS Ticket #4399] -- http://www.cups.org/str.php?L4399
7
8Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch
9
10Upstream-Status: Backport
11
12Signed-off-by: Armin Kuster <akuster@mvista.com>
13
14Last-Update: 2014-04-07
15--- a/config-scripts/cups-ssl.m4
16+++ b/config-scripts/cups-ssl.m4
17@@ -66,7 +66,6 @@
18 dnl Then look for GNU TLS...
19 if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then
20 AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
21- AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config)
22 if $PKGCONFIG --exists gnutls; then
23 have_ssl=1
24 SSLLIBS=`$PKGCONFIG --libs gnutls`
25@@ -84,14 +83,6 @@
26 if test $have_ssl = 1; then
27 CUPS_SERVERCERT="ssl/server.crt"
28 CUPS_SERVERKEY="ssl/server.key"
29-
30- if $PKGCONFIG --exists gcrypt; then
31- SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`"
32- SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`"
33- elif test "x$LIBGCRYPTCONFIG" != x; then
34- SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`"
35- SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`"
36- fi
37 fi
38 fi
39
40--- a/cups/http-private.h
41+++ b/cups/http-private.h
42@@ -80,7 +80,6 @@
43 # elif defined HAVE_GNUTLS
44 # include <gnutls/gnutls.h>
45 # include <gnutls/x509.h>
46-# include <gcrypt.h>
47 # elif defined(HAVE_CDSASSL)
48 # include <CoreFoundation/CoreFoundation.h>
49 # include <Security/Security.h>
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 @@
1[Unit]
2Description=CUPS Printer Service Spool
3
4[Path]
5PathExistsGlob=/var/spool/cups/d*
6
7[Install]
8WantedBy=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 @@
1[Unit]
2Description=CUPS Printing Service
3
4[Service]
5ExecStart=@SBINDIR@/cupsd -f
6PrivateTmp=true
7
8[Install]
9Also=cups.socket cups.path
10WantedBy=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 @@
1[Unit]
2Description=CUPS Printing Service Sockets
3
4[Socket]
5ListenStream=/var/run/cups/cups.sock
6
7[Install]
8WantedBy=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 @@
1Make CUPS_SERVERBIN relative to libdir otherwise on 64bit arches
2e.g. ppc64 where base libdir is lib64 this does not go well
3
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5Upstream-Status: Inappropriate [OE config specific]
6
7Index: cups-1.4.6/config-scripts/cups-directories.m4
8===================================================================
9--- cups-1.4.6.orig/config-scripts/cups-directories.m4 2009-04-12 16:04:51.000000000 -0700
10+++ cups-1.4.6/config-scripts/cups-directories.m4 2012-07-21 12:12:05.896405923 -0700
11@@ -397,7 +397,7 @@
12 *)
13 # All others
14 INSTALL_SYSV="install-sysv"
15- CUPS_SERVERBIN="$exec_prefix/lib/cups"
16+ CUPS_SERVERBIN="$libdir/cups"
17 ;;
18 esac
19
20Index: cups-1.4.6/configure
21===================================================================
22--- cups-1.4.6.orig/configure 2012-07-21 12:13:34.512405950 -0700
23+++ cups-1.4.6/configure 2012-07-21 12:14:05.724406017 -0700
24@@ -11181,7 +11181,7 @@
25 *)
26 # All others
27 INSTALL_SYSV="install-sysv"
28- CUPS_SERVERBIN="$exec_prefix/lib/cups"
29+ CUPS_SERVERBIN="$libdir/cups"
30 ;;
31 esac
32
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 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Index: cups-1.6.1/scheduler/cups.sh.in
4===================================================================
5--- cups-1.6.1.orig/scheduler/cups.sh.in
6+++ cups-1.6.1/scheduler/cups.sh.in
7@@ -67,7 +67,7 @@ case "`uname`" in
8 ECHO_ERROR=:
9 ;;
10
11- Linux*)
12+ DisableLinux*)
13 IS_ON=/bin/true
14 if test -f /etc/init.d/functions; then
15 . /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 @@
1require cups.inc
2
3LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c5e50cb4b8f24b04636b719683a9102d"
4
5SRC_URI[md5sum] = "5d893edc2957005f78e2b2423fdace2e"
6SRC_URI[sha256sum] = "18cb4c6847dbaaaa05c8b35af787f19dd5c7686970b46548e72c711c6f26bd02"