DESCRIPTION = "mtac drivers" HOMEPAGE = "http://www.multitech.net/" SECTION = "base" PRIORITY = "optional" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "virtual/kernel mts-io" INC_PR = "r0" SRCREV = "${PV}" PR = "${INC_PR}.0-${MLINUX_KERNEL_VERSION}${MLINUX_KERNEL_EXTRA_VERSION}" SRC_URI = " \ git://git.multitech.net/mtac.git;protocol=git \ " S = "${WORKDIR}/git" inherit module EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \ KBUILD_VERBOSE=1 \ M=${S} \ modules \ " do_compile () { bbnote make "$@" make "$@" unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS oe_runmake } L1 = "${STAGING_KERNEL_DIR}/include/linux/" # Bitbake/Yocto automatically installs in to L2. L2 = "${STAGING_INCDIR}/linux/" L3 = "${D}/usr/include/linux/" PACKAGES = "kernel-module-${PN} ${PN}-dev" FILES_kernel-module-${PN} = "${base_libdir}/modules/${KERNEL_VERSION}/extra/mtac.ko" FILES_${PN}-dev += "/usr/include/linux/mtac.h" PARALLEL_MAKE = "" fakeroot do_install () { install -m 0755 -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra install -d ${D}/usr/include/linux/ # use cp instead of install so the driver doesn't get stripped cp ${S}/mtac.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra install -m 0644 ${S}/mtac.h ${L1} install -m 0644 ${S}/mtac.h ${L3} } # Yocto seems to insist on Python for this function # This function is to make debugging easier, so the package # can be built a 2nd time. fakeroot do_cleansstate_prepend() { L1 = d.getVar("L1",True) L2 = d.getVar("L2",True) bb.note("L1 is " + L1) bb.note("L2 is " + L2) F1 = L1 + "/mtac.h" F2 = L2 + "/mtac.h" if os.path.exists(F1): os.remove(F1) if os.path.exists(F2): os.remove(F2) }