summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/conf/distro/include/default-distrovars.inc2
-rw-r--r--meta/recipes-connectivity/neard/neard/neard42
-rw-r--r--meta/recipes-connectivity/neard/neard_0.9.bb57
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-base.bb14
4 files changed, 114 insertions, 1 deletions
diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index 1169ca5b6f..f0fec2a011 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -18,7 +18,7 @@ DISTRO_FEATURES_LIBC_DEFAULT ?= "ipv4 ipv6 libc-backtrace libc-big-macros libc-b
DISTRO_FEATURES_LIBC ?= "${DISTRO_FEATURES_LIBC_DEFAULT}"
DISTRO_FEATURES_LIBC_class-nativesdk = "${DISTRO_FEATURES_LIBC_DEFAULT}"
DISTRO_FEATURES_INITMAN ?= "sysvinit"
-DISTRO_FEATURES ?= "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g x11 ${DISTRO_FEATURES_LIBC} ${DISTRO_FEATURES_INITMAN}"
+DISTRO_FEATURES ?= "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 ${DISTRO_FEATURES_LIBC} ${DISTRO_FEATURES_INITMAN}"
IMAGE_FEATURES ?= ""
diff --git a/meta/recipes-connectivity/neard/neard/neard b/meta/recipes-connectivity/neard/neard/neard
new file mode 100644
index 0000000000..5f36174d62
--- /dev/null
+++ b/meta/recipes-connectivity/neard/neard/neard
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+DAEMON=/usr/sbin/neard
+PIDFILE=/var/run/neard.pid
+DESC="Linux NFC daemon"
+
+if [ -f /etc/default/neard ] ; then
+ . /etc/default/neard
+fi
+
+set -e
+
+do_start() {
+ $DAEMON
+}
+
+do_stop() {
+ start-stop-daemon --stop --name neard --quiet
+}
+
+case "$1" in
+ start)
+ echo "Starting $DESC"
+ do_start
+ ;;
+ stop)
+ echo "Stopping $DESC"
+ do_stop
+ ;;
+ restart|force-reload)
+ echo "Restarting $DESC"
+ do_stop
+ sleep 1
+ do_start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta/recipes-connectivity/neard/neard_0.9.bb b/meta/recipes-connectivity/neard/neard_0.9.bb
new file mode 100644
index 0000000000..61ea58cc14
--- /dev/null
+++ b/meta/recipes-connectivity/neard/neard_0.9.bb
@@ -0,0 +1,57 @@
+SUMMARY = "Linux NFC daemon"
+DESCRIPTION = "A daemon for the Linux Near Field Communication stack"
+HOMEPAGE = "http://01.org/linux-nfc"
+
+LICENSE = "GPLv2"
+
+DEPENDS = "dbus glib-2.0 libnl"
+
+inherit autotools pkgconfig update-rc.d
+
+INITSCRIPT_NAME = "neard"
+INITSCRIPT_PARAMS = "defaults 64"
+
+# This would copy neard start-stop shell and test scripts
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/neard ${D}${sysconfdir}/init.d/neard
+
+ install -d ${D}${libdir}/neard
+ install -m 0755 ${S}/test/* ${D}${libdir}/neard/
+ install -m 0755 ${S}/tools/nfctool/nfctool ${D}${libdir}/neard/
+}
+
+RDEPENDS_${PN} = "dbus python python-dbus python-pygobject"
+
+# Bluez & Wifi are not mandatory except for handover "
+RRECOMMENDS_${PN} = "\
+ ${@base_contains('DISTRO_FEATURES', 'bluetooth', 'bluez4', '', d)} \
+ ${@base_contains('DISTRO_FEATURES', 'wifi','wpa-supplicant', '', d)} \
+ "
+
+#Additional
+PACKAGES =+ "${PN}-tests"
+
+FILES_${PN}-tests = "${libdir}/neard/*-test"
+RDEPENDS_${PN}-tests = "python python-dbus python-pygobject"
+
+FILES_${PN}-dbg += "${bindir}/neard/*/.debug"
+
+##=============================
+# This is valid for 0.9+
+LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
+ file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \
+ "
+S = "${WORKDIR}/git"
+SRCREV = "7abdb13d106d496e1115fab49e6448a249dfb3c8"
+PV = "0.9-git${SRCPV}"
+PR = "r1"
+
+SRC_URI = "git://git.kernel.org/pub/scm/network/nfc/neard.git;protocol=git \
+ file://neard \
+ "
+
+EXTRA_OECONF += "--enable-tools \
+ "
+
+
diff --git a/meta/recipes-core/packagegroups/packagegroup-base.bb b/meta/recipes-core/packagegroups/packagegroup-base.bb
index 100cc88be3..799e12a7ac 100644
--- a/meta/recipes-core/packagegroups/packagegroup-base.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-base.bb
@@ -28,6 +28,7 @@ PACKAGES = ' \
${@base_contains("DISTRO_FEATURES", "bluetooth", "packagegroup-base-bluetooth", "", d)} \
${@base_contains("DISTRO_FEATURES", "wifi", "packagegroup-base-wifi", "", d)} \
${@base_contains("DISTRO_FEATURES", "3g", "packagegroup-base-3g", "", d)} \
+ ${@base_contains("DISTRO_FEATURES", "nfc", "packagegroup-base-nfc", "", d)} \
${@base_contains("DISTRO_FEATURES", "cramfs", "packagegroup-base-cramfs", "", d)} \
${@base_contains("DISTRO_FEATURES", "ipsec", "packagegroup-base-ipsec", "", d)} \
${@base_contains("DISTRO_FEATURES", "ipv6", "packagegroup-base-ipv6", "", d)} \
@@ -71,6 +72,7 @@ RDEPENDS_packagegroup-base = "\
${@base_contains('COMBINED_FEATURES', 'bluetooth', 'packagegroup-base-bluetooth', '',d)} \
${@base_contains('COMBINED_FEATURES', 'wifi', 'packagegroup-base-wifi', '',d)} \
${@base_contains('COMBINED_FEATURES', '3g', 'packagegroup-base-3g', '',d)} \
+ ${@base_contains('COMBINED_FEATURES', 'nfc', 'packagegroup-base-nfc', '',d)} \
\
${@base_contains('DISTRO_FEATURES', 'nfs', 'packagegroup-base-nfs', '',d)} \
${@base_contains('DISTRO_FEATURES', 'cramfs', 'packagegroup-base-cramfs', '',d)} \
@@ -96,11 +98,13 @@ RDEPENDS_packagegroup-base-extended = "\
${ADD_WIFI} \
${ADD_BT} \
${ADD_3G} \
+ ${ADD_NFC} \
"
ADD_WIFI = ""
ADD_BT = ""
ADD_3G = ""
+ADD_NFC = ""
python __anonymous () {
# If Distro want wifi and machine feature wifi/pci/pcmcia/usbhost (one of them)
@@ -118,6 +122,9 @@ python __anonymous () {
if "3g" in distro_features and not "3g" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features):
d.setVar("ADD_3G", "packagegroup-base-3g")
+ if "nfc" in distro_features and not "nfc" in machine_features and ("usbhost" in machine_features):
+ d.setVar("ADD_NFC", "packagegroup-base-nfc")
+
# For backwards compatibility after rename
packages = d.getVar("PACKAGES", True).split()
for pkg in packages:
@@ -309,6 +316,13 @@ RRECOMMENDS_packagegroup-base-wifi = "\
kernel-module-aes-generic \
kernel-module-aes"
+SUMMARY_packagegroup-base-nfc = "Near Field Communication support"
+RDEPENDS_packagegroup-base-nfc = "\
+ neard"
+
+RRECOMMENDS_packagegroup-base-nfc = "\
+ kernel-module-nfc"
+
SUMMARY_packagegroup-base-3g = "Cellular data support"
RDEPENDS_packagegroup-base-3g = "\
ofono"