xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1SUMMARY = "HP Linux Imaging and Printing"
2LICENSE="GPL-2.0-only"
3LIC_FILES_CHKSUM = "file://COPYING;md5=20f2c819499cc2063e9a7b07b408815c"
4
5SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
6           file://configure.patch \
7           file://fix-libusb-paths.patch \
8           file://999-remove-lImageProcessor.patch \
9           file://600-fix.patch \
10           file://030-replace_unsafe_memcpy_with_memmove.patch \
11           file://050-fix-glibcisms.patch \
12           file://hplip-3.19.6-fix-return.patch \
13"
14SRC_URI[md5sum] = "d72bc77d791c150c2c22b84e9553bab3"
15SRC_URI[sha256sum] = "b7f398502fb659e0de8e54976237e3c6a64fec0b3c36054a515876f7b006b255"
16
17DEPENDS += "cups python3 libusb"
18
19inherit autotools-brokensep python3-dir python3native pkgconfig systemd
20
21export STAGING_INCDIR
22export STAGING_LIBDIR
23
24CFLAGS += "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}"
25
26EXTRA_OECONF += "\
27        LIBUSBINCLUDEROOT=${STAGING_INCDIR} \
28        --enable-cups-ppd-install \
29        --disable-network-build \
30        --disable-doc-build \
31        --disable-pp-build \
32        --disable-scan-build \
33        --disable-gui-build \
34        --disable-fax-build \
35        --disable-policykit  \
36        --disable-qt4 \
37        --disable-qt3 \
38        --disable-dbus-build \
39        --enable-foomatic-drv-install \
40        --disable-foomatic-ppd-install \
41        --disable-foomatic-rip-hplip-install \
42        --with-cupsbackenddir=${libexecdir}/cups/backend \
43        --with-cupsfilterdir=${libexecdir}/cups/filter \
44"
45
46EXTRA_OEMAKE = "rulessystemdir=${systemd_unitdir}/system/"
47
48do_install:append() {
49    rm -rf ${D}${datadir}/hplip/upgrade.py
50    rm -rf ${D}${datadir}/hplip/uninstall.py
51    sed -i -e "s|/usr/bin/env python|/usr/bin/env python3|g" ${D}${datadir}/hplip/*.py
52    sed -i -e "s|/usr/bin/python|/usr/bin/env python3|g" ${D}${datadir}/hplip/*.py
53}
54
55PACKAGE_BEFORE_PN += "${PN}-ppd ${PN}-cups ${PN}-backend ${PN}-filter ${PN}-hal"
56
57RDEPENDS:${PN} += " \
58        python3\
59        python3-syslog \
60        python3-pprint \
61        python3-compression \
62        python3-shell \
63        python3-xml \
64        python3-unixadmin \
65        python3-html \
66        python3-resource \
67        python3-terminal \
68"
69RDEPENDS:${PN}-filter += "perl"
70
71# need to snag the debug file or OE will fail on backend package
72FILES:${PN}-dbg += "\
73        ${libexecdir}/cups/backend/.debug \
74        ${PYTHON_SITEPACKAGES_DIR}/.debug \
75        ${libexecdir}/cups/filter/.debug "
76
77FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
78FILES:${PN}-ppd = "${datadir}/ppd"
79FILES:${PN}-cups = "${datadir}/cups"
80FILES:${PN}-backend = "${libexecdir}/cups/backend"
81FILES:${PN}-filter = "${libexecdir}/cups/filter"
82FILES:${PN}-hal = "${datadir}/hal"
83
84FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so"
85
86SYSTEMD_SERVICE:${PN} = "hplip-printer@.service"
87
88CLEANBROKEN = "1"
89