Skip to content
Permalink
Browse files
Add build support for openembedded.
To build, copy the files into a usb-moded sub-dir in the meta tree,
and build with # bitbake usb-moded

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Oct 14, 2014
1 parent 033c3b1 commit 2c56db0ded705e65cf287ca904c967acab82281b
Showing with 74 additions and 0 deletions.
  1. +59 −0 openembedded/usb-moded.inc
  2. +15 −0 openembedded/usb-moded_0.80.7.bb
@@ -0,0 +1,59 @@
SUMMARY = "Usb-moded: usb gadget driver handler and modesetting "
DESCRIPTION = "Usb_moded provides a dbus interface, app autostarting and configuration \
for USB gadgets. This way several different modes can be handled and network gadgets configured.\
It also helps to save memory by only running USB services when plugged etc..."
HOMEPAGE = "https://github.com/nemomobile/usb-moded"
SECTION = "libs/network"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5f30f0716dfdd0d91eb439ebec522ec2"
DEPENDS = "dbus-glib intltool-native"
#RDEPENDS_${PN} = "ofono"


EXTRA_OECONF +="\
--enable-ofono \
--enable-debug \
--enable-dbus-appsync \
"
SYSTEMD_SERVICE_${PN} = "usb-moded.service"

do_install_append() {
install -m 644 -D src/usb_moded-dbus.h ${D}/${includedir}/usb-moded/usb_moded-dbus.h
install -m 644 -D src/usb_moded-modes.h ${D}/${includedir}/usb-moded/usb_moded-modes.h
install -m 644 -D src/usb_moded-appsync-dbus.h ${D}/${includedir}/usb-moded/usb_moded-appsync-dbus.h
install -m 644 -D usb_moded.pc ${D}/${libdir}/pkgconfig/usb_moded.pc
install -d ${D}/${docdir}/usb-moded
install -m 644 docs/usb_moded-doc.txt ${D}/${docdir}/usb-moded/
install -m 644 -D debian/manpage.1 ${D}/${mandir}/man1/usb-moded.1
install -m 644 -D debian/usb_moded.conf ${D}/${sysconfdir}/dbus-1/system.d/usb_moded.conf
install -m 644 -D ${S}/debian/usb_moded.conf ${D}/${sysconfdir}/modprobe.d/usb_moded.conf
install -d ${D}/${sysconfdir}/usb-moded
install -d ${D}/${sysconfdir}/usb-moded/run
install -d ${D}/${sysconfdir}/usb-moded/run-diag
install -d ${D}/${sysconfdir}/usb-moded/dyn-modes
install -d ${D}/${sysconfdir}/usb-moded/diag
install -m 644 -D config/dyn-modes/* ${D}/${sysconfdir}/usb-moded/dyn-modes/
install -m 644 -D config/diag/* ${D}/${sysconfdir}/usb-moded/diag/
install -m 644 -D config/run/* ${D}/${sysconfdir}/usb-moded/run/
install -m 644 -D config/run/udhcpd-developer-mode.ini ${D}/${sysconfdir}/usb-moded/run/dhcpd-developer-android-mode.ini
install -m 644 -D config/run-diag/* ${D}/${sysconfdir}/usb-moded/run-diag/
}

PACKAGES =+ "${PN}-android-gadget-configs ${PN}-kernel-gadget-configs"

FILES_${PN}-android-gadget-configs += "${sysconfdir}/usb-moded/dyn-modes/*android* \
${sysconfdir}/usb-moded/dyn-modes/connection_sharing.ini \
${sysconfdir}/usb-moded/dyn-modes/diag_mode.ini \
${sysconfdir}/usb-moded/dyn-modes/adb_mode.ini \
${sysconfdir}/usb-moded/run/adb.ini \
${sysconfdir}/usb-moded/run/adb-diag.ini \
${sysconfdir}/usb-moded/run/udhcpd-connection-sharing.ini \
${sysconfdir}/usb-moded/run/udhcpd-developer-mode-android.ini \
${sysconfdir}/usb-moded/run-diag/* \
${sysconfdir}/usb-moded/diag/* \
"
FILES_${PN}-kernel-gadget-configs += "${sysconfdir}/usb-moded/dyn-modes/* \
${sysconfdir}/usb-moded/run/udhcpd-developer-mode.ini \
${sysconfdir}/usb-moded/run/mtp.ini \
"

@@ -0,0 +1,15 @@
require usb-moded.inc

SUMMARY = "Usb-moded: usb gadget driver handler and modesetting "
HOMEPAGE = "https://github.com/nemomobile/usb-moded"
SECTION = "libs/network"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5f30f0716dfdd0d91eb439ebec522ec2"

# 0.80.7 tag
SRCREV = "033c3b10197f3a6fc5ddf82ecf226b6d5c1bb208"
SRC_URI = "git://github.com/nemomobile/usb-moded.git;protocol=https"

S = "${WORKDIR}/git"

inherit autotools-brokensep

0 comments on commit 2c56db0

Please sign in to comment.