Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "HP Linux Imaging and Printing" |
| 2 | LICENSE="GPLv2" |
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=20f2c819499cc2063e9a7b07b408815c" |
| 4 | |
| 5 | SRC_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 | " |
| 14 | SRC_URI[md5sum] = "d72bc77d791c150c2c22b84e9553bab3" |
| 15 | SRC_URI[sha256sum] = "b7f398502fb659e0de8e54976237e3c6a64fec0b3c36054a515876f7b006b255" |
| 16 | |
| 17 | DEPENDS += "cups python3 libusb" |
| 18 | |
| 19 | inherit autotools-brokensep python3-dir python3native pkgconfig systemd |
| 20 | |
| 21 | export STAGING_INCDIR |
| 22 | export STAGING_LIBDIR |
| 23 | |
| 24 | CFLAGS += "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}" |
| 25 | |
| 26 | EXTRA_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 Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 42 | --with-cupsbackenddir=${libexecdir}/cups/backend \ |
| 43 | --with-cupsfilterdir=${libexecdir}/cups/filter \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 44 | " |
| 45 | |
| 46 | EXTRA_OEMAKE = "rulessystemdir=${systemd_unitdir}/system/" |
| 47 | |
| 48 | do_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 Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 55 | PACKAGE_BEFORE_PN += "${PN}-ppd ${PN}-cups ${PN}-backend ${PN}-filter ${PN}-hal" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 56 | |
| 57 | RDEPENDS_${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 | " |
| 69 | RDEPENDS_${PN}-filter += "perl" |
| 70 | |
| 71 | # need to snag the debug file or OE will fail on backend package |
| 72 | FILES_${PN}-dbg += "\ |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 73 | ${libexecdir}/cups/backend/.debug \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 74 | ${PYTHON_SITEPACKAGES_DIR}/.debug \ |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 75 | ${libexecdir}/cups/filter/.debug " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 76 | |
| 77 | FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" |
| 78 | FILES_${PN}-ppd = "${datadir}/ppd" |
| 79 | FILES_${PN}-cups = "${datadir}/cups" |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 80 | FILES_${PN}-backend = "${libexecdir}/cups/backend" |
| 81 | FILES_${PN}-filter = "${libexecdir}/cups/filter" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 82 | FILES_${PN}-hal = "${datadir}/hal" |
| 83 | |
| 84 | FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so" |
| 85 | |
| 86 | SYSTEMD_SERVICE_${PN} = "hplip-printer@.service" |
| 87 | |
| 88 | CLEANBROKEN = "1" |