1 DESCRIPTION = "An Internet printing system for Unix."
2 SECTION = "console/utils"
4 DEPENDS = "gnutls jpeg dbus dbus-glib libpng zlib fakeroot-native"
8 SRC_URI = "ftp://ftp.easysw.com/pub/cups/${PV}/cups-${PV}-source.tar.bz2 \
11 inherit autotools binconfig
27 export DSOFLAGS="${LDFLAGS}"
34 sed -i s:STRIP:NOSTRIP: Makedefs
35 sed -i s:serial:: backend/Makefile
37 echo "all:" > man/Makefile
38 echo "install:" >> man/Makefile
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}" \
47 fakeroot do_install () {
48 oe_runmake "DSTROOT=${D}" install
50 # This directory gets installed with perms 511, which makes packaging fail
51 chmod 0711 "${D}/${localstatedir}/run/cups/certs"
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}
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)
68 SYSROOT_PREPROCESS_FUNCS += "cups_config_mangle"
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
77 PACKAGES =+ "${PN}-lib ${PN}-libimage"
79 FILES_${PN}-lib = "${libdir}/libcups.so.*"
81 FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
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 \
90 #package the html for the webgui inside the main packages (~1MB uncompressed)
92 FILES_${PN} += "${datadir}/doc/cups/images \
93 ${datadir}/doc/cups/*html \
94 ${datadir}/doc/cups/*.css \