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