summaryrefslogtreecommitdiff
path: root/package/libnfc-nci
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-03-22 09:07:43 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2016-03-22 09:08:00 +0100
commit561a2b5764af1fd1301e24d703e680aafc0ffae5 (patch)
treebc88af3969cdecf145d86ade01a26efe279c4a64 /package/libnfc-nci
parentab20306b70b10a860b566bf912487d1f8a6eb22e (diff)
nfc: add driver and library for nfc-nci chips
Diffstat (limited to 'package/libnfc-nci')
-rw-r--r--package/libnfc-nci/Makefile35
-rw-r--r--package/libnfc-nci/patches/patch-configure_ac37
2 files changed, 72 insertions, 0 deletions
diff --git a/package/libnfc-nci/Makefile b/package/libnfc-nci/Makefile
new file mode 100644
index 000000000..2632d167c
--- /dev/null
+++ b/package/libnfc-nci/Makefile
@@ -0,0 +1,35 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= libnfc-nci
+PKG_VERSION:= fbad2fb842f2b4e7cfd5bc82136a9381402c07ce
+PKG_RELEASE:= 1
+PKG_GIT:= hash
+PKG_DESCR:= nfc nci library
+PKG_SECTION:= libs/net
+PKG_DEPENDS:= nxp-pn5xx
+PKG_NEEDS:= threads rt c++
+PKG_URL:= https://github.com/NXPNFCLinux/linux_libnfc-nci
+PKG_SITES:= https://github.com/NXPNFCLinux/linux_libnfc-nci.git
+PKG_OPTS:= dev
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,LIBNFC_NCI,libnfc-nci,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
+
+AUTOTOOL_STYLE:= bootstrap
+
+libnfc-nci-install:
+ $(INSTALL_DIR) $(IDIR_LIBNFC_NCI)/etc
+ $(INSTALL_DIR) $(IDIR_LIBNFC_NCI)/usr/lib
+ $(INSTALL_DIR) $(IDIR_LIBNFC_NCI)/usr/sbin
+ $(CP) $(WRKINST)/usr/lib/libnfc*.so* \
+ $(IDIR_LIBNFC_NCI)/usr/lib
+ $(CP) $(WRKINST)/usr/sbin/nfcDemoApp \
+ $(IDIR_LIBNFC_NCI)/usr/sbin
+ $(CP) $(WRKINST)/etc/libnfc* \
+ $(IDIR_LIBNFC_NCI)/etc
+
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/libnfc-nci/patches/patch-configure_ac b/package/libnfc-nci/patches/patch-configure_ac
new file mode 100644
index 000000000..fc8d2c6e2
--- /dev/null
+++ b/package/libnfc-nci/patches/patch-configure_ac
@@ -0,0 +1,37 @@
+--- libnfc-nci-fbad2fb842f2b4e7cfd5bc82136a9381402c07ce.orig/configure.ac 2016-03-21 10:14:22.000000000 +0100
++++ libnfc-nci-fbad2fb842f2b4e7cfd5bc82136a9381402c07ce/configure.ac 2016-03-21 10:21:27.855611688 +0100
+@@ -54,16 +54,6 @@ AC_ARG_ENABLE([pn7120],
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-pn7120]) ;;
+ esac],[pn7120=false])
+
+-AC_ARG_VAR(openssldir, help-string)
+-
+-AC_ARG_ENABLE([llcp1_3],
+-[ --enable-llcp1_3 enable LLCP1.3 (secured P2P)],
+-[case "${enableval}" in
+- yes) llcp1_3=true ;;
+- no) llcp1_3=false ;;
+- *) AC_MSG_ERROR([bad value ${enableval} for --enable-llcp1_3]) ;;
+-esac],[llcp1_3=false])
+-
+ AM_CONDITIONAL([CHIP_SEL_NOK], [
+ COUNT=0
+ if [ "$pn7120" = "true" ]; then
+@@ -73,17 +63,6 @@ if [test "$COUNT" -gt 1]; then
+ AC_MSG_ERROR(Can not enable multiple chip type)
+ fi])
+
+-AM_CONDITIONAL([LLCP1_3_ENABLED], [if [$llcp1_3]; then
+-AC_MSG_NOTICE([LLCP1.3 support is enabled (secure P2P)])
+-AM_CONDITIONAL([OPENSSLDIR_SET], [if ["${ac_cv_env_openssldir_set}" = "set"]; then
+-AC_MSG_NOTICE([openssldir path set])
+-else
+-AC_MSG_ERROR(path to openssldir not set (required when LLCP1.3 support is enabled))
+-fi])
+-else
+-AC_MSG_NOTICE([LLCP1.3 support is disabled (no secure P2P)])
+-fi])
+-
+ AM_CONDITIONAL([CHIP_SEL_ONE], [if [$pn7120]; then
+ AC_MSG_NOTICE([Selected chip type is PN7120])
+ else