blob: 457a974534e6fe4662494b641b323b12151f06a7 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "HP Linux Imaging and Printing"
2LICENSE="GPLv2"
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 \
Andrew Geisslerd688a012020-09-18 13:36:00 -050042 --with-cupsbackenddir=${libexecdir}/cups/backend \
43 --with-cupsfilterdir=${libexecdir}/cups/filter \
Andrew Geissler82c905d2020-04-13 13:39:40 -050044"
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
Andrew Geisslerd688a012020-09-18 13:36:00 -050055PACKAGE_BEFORE_PN += "${PN}-ppd ${PN}-cups ${PN}-backend ${PN}-filter ${PN}-hal"
Andrew Geissler82c905d2020-04-13 13:39:40 -050056
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 += "\
Andrew Geisslerd688a012020-09-18 13:36:00 -050073 ${libexecdir}/cups/backend/.debug \
Andrew Geissler82c905d2020-04-13 13:39:40 -050074 ${PYTHON_SITEPACKAGES_DIR}/.debug \
Andrew Geisslerd688a012020-09-18 13:36:00 -050075 ${libexecdir}/cups/filter/.debug "
Andrew Geissler82c905d2020-04-13 13:39:40 -050076
77FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
78FILES_${PN}-ppd = "${datadir}/ppd"
79FILES_${PN}-cups = "${datadir}/cups"
Andrew Geisslerd688a012020-09-18 13:36:00 -050080FILES_${PN}-backend = "${libexecdir}/cups/backend"
81FILES_${PN}-filter = "${libexecdir}/cups/filter"
Andrew Geissler82c905d2020-04-13 13:39:40 -050082FILES_${PN}-hal = "${datadir}/hal"
83
84FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so"
85
86SYSTEMD_SERVICE_${PN} = "hplip-printer@.service"
87
88CLEANBROKEN = "1"