diff options
author | Saul Wold <sgw@linux.intel.com> | 2013-10-27 01:42:18 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-30 13:39:12 +0000 |
commit | 3f4d3eef3478d6f28ad4cee25eb58db4cb0b3ef6 (patch) | |
tree | 1fb692f58cf2cc7186a025284acde0015f18dd4d /meta/recipes-extended/cups/cups.inc | |
parent | 1a573bbf2d40320a0a7fa2439f498ae6e8bb2ce3 (diff) | |
download | poky-3f4d3eef3478d6f28ad4cee25eb58db4cb0b3ef6.tar.gz |
cups: upgrade to 1.7.0
Rename and consolidate cups16.inc to cups.inc use PACKAGECONFIG
for pam.
(From OE-Core rev: b749bed86efcdc063d720fa095ffa7a7984cd53c)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/cups/cups.inc')
-rw-r--r-- | meta/recipes-extended/cups/cups.inc | 116 |
1 files changed, 116 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..62295b73ca --- /dev/null +++ b/meta/recipes-extended/cups/cups.inc | |||
@@ -0,0 +1,116 @@ | |||
1 | SUMMARY = "An Internet printing system for Unix" | ||
2 | DESCRIPTION = "An Internet printing system for Unix." | ||
3 | SECTION = "console/utils" | ||
4 | LICENSE = "GPLv2 & LGPLv2" | ||
5 | DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb" | ||
6 | PROVIDES = "cups14" | ||
7 | |||
8 | SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \ | ||
9 | file://use_echo_only_in_init.patch \ | ||
10 | file://0001-don-t-try-to-run-generated-binaries.patch \ | ||
11 | file://cups_serverbin.patch \ | ||
12 | " | ||
13 | |||
14 | LEAD_SONAME = "libcupsdriver.so" | ||
15 | |||
16 | inherit autotools binconfig | ||
17 | |||
18 | PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ | ||
19 | ${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | ||
20 | PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" | ||
21 | PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl" | ||
22 | PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam" | ||
23 | |||
24 | EXTRA_OECONF = " \ | ||
25 | --enable-gnutls \ | ||
26 | --enable-dbus \ | ||
27 | --enable-browsing \ | ||
28 | --disable-openssl \ | ||
29 | --disable-tiff \ | ||
30 | --disable-gssapi \ | ||
31 | --enable-debug \ | ||
32 | --disable-relro \ | ||
33 | --enable-libusb \ | ||
34 | --without-php \ | ||
35 | --without-perl \ | ||
36 | --without-python \ | ||
37 | --without-java \ | ||
38 | --with-pdftops=none \ | ||
39 | " | ||
40 | |||
41 | |||
42 | do_configure() { | ||
43 | gnu-configize | ||
44 | libtoolize --force | ||
45 | DSOFLAGS="${LDFLAGS}" SERVERBIN="${libdir}/cups" oe_runconf | ||
46 | } | ||
47 | |||
48 | do_compile () { | ||
49 | sed -i s:STRIP:NOSTRIP: Makedefs | ||
50 | sed -i s:serial:: backend/Makefile | ||
51 | |||
52 | echo "all:" > man/Makefile | ||
53 | echo "libs:" >> man/Makefile | ||
54 | echo "install:" >> man/Makefile | ||
55 | echo "install-data:" >> man/Makefile | ||
56 | echo "install-exec:" >> man/Makefile | ||
57 | echo "install-headers:" >> man/Makefile | ||
58 | echo "install-libs:" >> man/Makefile | ||
59 | |||
60 | oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \ | ||
61 | "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \ | ||
62 | "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \ | ||
63 | "LIBZ=-lz -L${STAGING_LIBDIR}" \ | ||
64 | "-I." | ||
65 | } | ||
66 | |||
67 | fakeroot do_install () { | ||
68 | oe_runmake "DSTROOT=${D}" install | ||
69 | |||
70 | # Remove /var/run from package as cupsd will populate it on startup | ||
71 | rm -fr ${D}/${localstatedir}/run | ||
72 | rmdir ${D}/${libdir}/${BPN}/driver | ||
73 | } | ||
74 | |||
75 | python do_package_append() { | ||
76 | import subprocess | ||
77 | # Change permissions back the way they were, they probably had a reason... | ||
78 | workdir = d.getVar('WORKDIR', True) | ||
79 | subprocess.call('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir, shell=True) | ||
80 | } | ||
81 | |||
82 | PACKAGES =+ "${PN}-lib ${PN}-libimage" | ||
83 | |||
84 | FILES_${PN} += "${libdir}/cups/backend \ | ||
85 | ${libdir}/cups/cgi-bin \ | ||
86 | ${libdir}/cups/filter \ | ||
87 | ${libdir}/cups/monitor \ | ||
88 | ${libdir}/cups/notifier \ | ||
89 | ${libdir}/cups/daemon \ | ||
90 | " | ||
91 | |||
92 | FILES_${PN}-lib = "${libdir}/libcups.so.*" | ||
93 | |||
94 | FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*" | ||
95 | |||
96 | FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \ | ||
97 | ${libdir}/cups/cgi-bin/.debug \ | ||
98 | ${libdir}/cups/filter/.debug \ | ||
99 | ${libdir}/cups/monitor/.debug \ | ||
100 | ${libdir}/cups/notifier/.debug \ | ||
101 | ${libdir}/cups/daemon/.debug \ | ||
102 | " | ||
103 | |||
104 | #package the html for the webgui inside the main packages (~1MB uncompressed) | ||
105 | |||
106 | FILES_${PN} += "${datadir}/doc/cups/images \ | ||
107 | ${datadir}/doc/cups/*html \ | ||
108 | ${datadir}/doc/cups/*.css \ | ||
109 | ${datadir}/icons/ \ | ||
110 | " | ||
111 | CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf" | ||
112 | |||
113 | SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess" | ||
114 | cups_sysroot_preprocess () { | ||
115 | sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:' | ||
116 | } | ||