summaryrefslogtreecommitdiffstats
path: root/recipes-support/cups/cups.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-support/cups/cups.inc')
-rw-r--r--recipes-support/cups/cups.inc89
1 files changed, 89 insertions, 0 deletions
diff --git a/recipes-support/cups/cups.inc b/recipes-support/cups/cups.inc
new file mode 100644
index 000000000..0c7b103b8
--- /dev/null
+++ b/recipes-support/cups/cups.inc
@@ -0,0 +1,89 @@
1DESCRIPTION = "An Internet printing system for Unix."
2SECTION = "console/utils"
3LICENSE = "GPL LGPL"
4DEPENDS = "gnutls jpeg dbus dbus-glib libpng zlib fakeroot-native"
5
6INC_PR = "r7"
7
8SRC_URI = "ftp://ftp.easysw.com/pub/cups/${PV}/cups-${PV}-source.tar.bz2 \
9 "
10
11inherit autotools binconfig
12
13EXTRA_OECONF = " \
14 --enable-gnutls \
15 --enable-dbus \
16 --enable-browsing \
17 --disable-openssl \
18 --disable-tiff \
19 --disable-ssl \
20 --without-php \
21 --without-perl \
22 --without-python \
23 --without-java \
24 "
25
26
27do_configure() {
28 export DSOFLAGS="${LDFLAGS}"
29 gnu-configize
30 libtoolize --force
31 oe_runconf
32}
33
34do_compile () {
35 sed -i s:STRIP:NOSTRIP: Makedefs
36 sed -i s:serial:: backend/Makefile
37
38 echo "all:" > man/Makefile
39 echo "install:" >> man/Makefile
40
41 oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \
42 "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \
43 "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \
44 "LIBZ=-lz -L${STAGING_LIBDIR}" \
45 "-I."
46}
47
48fakeroot do_install () {
49 oe_runmake "DSTROOT=${D}" install
50
51 # This directory gets installed with perms 511, which makes packaging fail
52 chmod 0711 "${D}/${localstatedir}/run/cups/certs"
53}
54
55python do_package_append() {
56 # Change permissions back the way they were, they probably had a reason...
57 pkgdest = bb.data.getVar('PKGDEST', d, 1)
58 os.system('chmod 0511 %s/cups/var/run/cups/certs' % pkgdest)
59}
60
61SYSROOT_PREPROCESS_FUNCS += "cups_config_mangle"
62
63cups_config_mangle() {
64 # Undo mangle of cups_datadir and cups_serverbin
65 sed -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:g' \
66 -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:g' \
67 -i ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/cups-config
68}
69
70PACKAGES =+ "${PN}-lib ${PN}-libimage"
71
72FILES_${PN}-lib = "${libdir}/libcups.so.*"
73
74FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
75
76FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \
77 ${libdir}/cups/cgi-bin/.debug \
78 ${libdir}/cups/filter/.debug \
79 ${libdir}/cups/monitor/.debug \
80 ${libdir}/cups/notifier/.debug \
81 ${libdir}/cups/daemon/.debug \
82 "
83#package the html for the webgui inside the main packages (~1MB uncompressed)
84
85FILES_${PN} += "${datadir}/doc/cups/images \
86 ${datadir}/doc/cups/*html \
87 ${datadir}/doc/cups/*.css \
88 ${datadir}/icons/ \
89 "