xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-connectivity/neard/neard_0.16.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Linux NFC daemon"
2*4882a593SmuzhiyunDESCRIPTION = "A daemon for the Linux Near Field Communication stack"
3*4882a593SmuzhiyunHOMEPAGE = "http://01.org/linux-nfc"
4*4882a593SmuzhiyunLICENSE = "GPL-2.0-only"
5*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
6*4882a593Smuzhiyun                    file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \
7*4882a593Smuzhiyun                   "
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunDEPENDS = "dbus glib-2.0 libnl"
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunSRC_URI = "git://git.kernel.org/pub/scm/network/nfc/neard.git;protocol=git;branch=master \
12*4882a593Smuzhiyun           file://neard.in \
13*4882a593Smuzhiyun           file://Makefile.am-fix-parallel-issue.patch \
14*4882a593Smuzhiyun           file://Makefile.am-do-not-ship-version.h.patch \
15*4882a593Smuzhiyun           file://0001-Add-header-dependency-to-nciattach.o.patch \
16*4882a593Smuzhiyun          "
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunSRCREV = "949795024f7625420e93e288c56e194cb9a3e74a"
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunS = "${WORKDIR}/git"
21*4882a593Smuzhiyun
22*4882a593Smuzhiyuninherit autotools pkgconfig systemd update-rc.d
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunPACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunPACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir}/ --with-systemduserunitdir=${systemd_unitdir}/user/,--disable-systemd"
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunEXTRA_OECONF += "--enable-tools"
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun# This would copy neard start-stop shell and test scripts
31*4882a593Smuzhiyundo_install:append() {
32*4882a593Smuzhiyun	if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
33*4882a593Smuzhiyun		install -d ${D}${sysconfdir}/init.d/
34*4882a593Smuzhiyun		sed "s:@installpath@:${libexecdir}/nfc:" ${WORKDIR}/neard.in \
35*4882a593Smuzhiyun		  > ${D}${sysconfdir}/init.d/neard
36*4882a593Smuzhiyun		chmod 0755 ${D}${sysconfdir}/init.d/neard
37*4882a593Smuzhiyun	fi
38*4882a593Smuzhiyun}
39*4882a593Smuzhiyun
40*4882a593SmuzhiyunRDEPENDS:${PN} = "dbus"
41*4882a593Smuzhiyun
42*4882a593Smuzhiyun# Bluez & Wifi are not mandatory except for handover
43*4882a593SmuzhiyunRRECOMMENDS:${PN} = "\
44*4882a593Smuzhiyun                     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
45*4882a593Smuzhiyun                     ${@bb.utils.contains('DISTRO_FEATURES', 'wifi','wpa-supplicant', '', d)} \
46*4882a593Smuzhiyun                    "
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunINITSCRIPT_NAME = "neard"
49*4882a593SmuzhiyunINITSCRIPT_PARAMS = "defaults 64"
50*4882a593Smuzhiyun
51*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN} = "neard.service"
52