Sungjae Lim <neueziel.lim at samsung dot com>
Sechang Sohn <sc.sohn at samsung dot com>
Jinmin Chung <jinmin at samsung dot com>
-Jaekyun Lee <jkyun.lee at samsung dot com>
+Youngjae Shin <yj99.shin at samsung dot com>
MESSAGE("build nfc-plugin-emul")
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
-AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/src/oem SRCS)
+AUX_SOURCE_DIRECTORY(${CMAKE_SOURCE_DIR}/src/oem SRCS)
IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
SET(CMAKE_BUILD_TYPE "Release")
MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
INCLUDE(FindPkgConfig)
-
-pkg_check_modules(pkgs REQUIRED glib-2.0 gobject-2.0 dlog nfc-common-lib vconf)
+pkg_check_modules(pkgs REQUIRED glib-2.0 gobject-2.0 dlog nfc-common vconf)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
-# this for NFC flag
-
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fno-strict-aliasing -pipe -fomit-frame-pointer -Wall -Wno-trigraphs -Werror-implicit-function-declaration -Wl,-zdefs -fvisibility=hidden")
-SET(ARM_CFLAGS "${ARM_CFLAGS} -mapcs -mno-sched-prolog -mabi=aapcs-linux -Uarm -fno-common -fpic")
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Wl,--unresolved-symbols=ignore-in-shared-libs")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall -Werror-implicit-function-declaration")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC -fvisibility=hidden")
+#SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fno-strict-aliasing")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
-#SET(CMAKE_C_FLAGS_RELEASE "-O2")
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DUSE_GLIB_MAIN_LOOP")
ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
-
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-ldl")
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} dl)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib/nfc)
+++ /dev/null
-nfc-plugin-emul (0.0.1-10) unstable; urgency=low
-
- * Add the function checking nfc feature.
- * Git: slp/pkgs/n/nfc-plugin-emul
- * Tag: nfc-plugin-emul_0.0.1-10
-
- -- Wonkyu Kwon <wonkyu.kwon@samsung.com> Wed, 30 May 2012 16:35:27 +0900
-
-nfc-plugin-emul (0.0.1-9) unstable; urgency=low
-
- * fix issues
- * Git: slp/pkgs/n/nfc-plugin-emul
- * Tag: nfc-plugin-emul_0.0.1-9
-
- -- Junyong Sim <junyong.sim@samsung.com> Thu, 24 May 2012 18:44:32 +0900
-
-nfc-plugin-emul (0.0.1-8) unstable; urgency=low
-
- * fix tag write fail issue
- * Git: slp/pkgs/n/nfc-plugin-emul
- * Tag: nfc-plugin-emul_0.0.1-8
-
- -- Junyong Sim <junyong.sim@samsung.com> Mon, 23 Apr 2012 17:22:48 +0900
-
-nfc-plugin-emul (0.0.1-7) unstable; urgency=low
-
- * fix tag type issue
- * Git: slp/pkgs/n/nfc-plugin-emul
- * Tag: nfc-plugin-emul_0.0.1-7
-
- -- Junyong Sim <junyong.sim@samsung.com> Sun, 22 Apr 2012 22:57:25 +0900
-
-nfc-plugin-emul (0.0.1-6) unstable; urgency=low
-
- * change boilerplate from samsung to Apache
- * Git: slp/pkgs/n/nfc-plugin-emul
- * Tag: nfc-plugin-emul_0.0.1-6
-
- -- Junyong Sim <junyong.sim@samsung.com> Fri, 16 Mar 2012 13:17:34 +0900
-
-nfc-plugin-emul (0.0.1-5) unstable; urgency=low
-
- * change boilerplate
- * Git: slp/pkgs/n/nfc-plugin-emul
- * Tag: nfc-plugin-emul_0.0.1-5
-
- -- Junyong Sim <junyong.sim@samsung.com> Fri, 17 Feb 2012 11:23:10 +0900
-
-nfc-plugin-emul (0.0.1-4) unstable; urgency=low
-
- * apply the changed message structure of nfc manager
- * Git: slp/pkgs/n/nfc-plugin-emul
- * Tag: nfc-plugin-emul_0.0.1-4
-
- -- Junyong Sim <junyong.sim@samsung.com> Mon, 13 Feb 2012 14:28:58 +0900
-
-nfc-plugin-emul (0.0.1-3) unstable; urgency=low
-
- * implement p2p feature
- * Git: slp/pkgs/n/nfc-plugin-emul
- * Tag: nfc-plugin-emul_0.0.1-3
-
- -- Junyong Sim <junyong.sim@samsung.com> Fri, 13 Jan 2012 13:12:09 +0900
-
-nfc-plugin-emul (0.0.1-2) unstable; urgency=low
-
- * update changelog for first upload
- * Git: slp/pkgs/n/nfc-plugin-emul
- * Tag: nfc-plugin-emul_0.0.1-2
-
- -- Junyong Sim <junyong.sim@samsung.com> Tue, 27 Dec 2011 11:22:56 +0900
-
-nfc-plugin-emul (0.0.1-1) unstable; urgency=low
-
- * first source package for building
- * Git: slp/pkgs/n/nfc-plugin-emul
- * Tag: nfc-plugin-emul_0.0.1-1
-
- -- Junyong Sim <junyong.sim@samsung.com> Wed, 21 Dec 2011 21:11:57 +0900
+++ /dev/null
-Source: nfc-plugin-emul
-Section: libs
-Priority: extra
-Maintainer: Junyong Sim <junyong.sim@samsung.com>
-Build-Depends: debhelper (>= 5), libaul-1-dev, syspopup-caller-dev, libglib2.0-dev, libecore-dev, libvconf-dev, libelm-dev, libmm-common-dev, libmm-sound-dev, libsecurity-server-client-dev, libcontacts-service-dev, libcontacts-service-dev, libbluetooth-frwk-dev,libdbus-glib-1-dev, dlog-dev, libslp-memo-dev, syspopup-caller-dev, libnfc-common-lib-dev
-Standards-Version: 0.0.1
-
-Package: libnfc-plugin-emul-0
-Section: libs
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: NFC Plugin for Emulator
-
-Package: libnfc-plugin-emul-dev
-Section: libs
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libnfc-plugin-emul-0 (= ${Source-Version})
-Description: NFC Plugin for Emulator (stripped)
-
-Package: libnfc-plugin-emul-dbg
-Section: debug
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libnfc-plugin-emul-0 (= ${Source-Version})
-Description: NFC Plugin for Emulator (unstripped)
+++ /dev/null
-@PREFIX@/lib/*.so
-#@PREFIX@/bin/*
-#@PREFIX@/share/dbus-1/services/*
-
+++ /dev/null
-#!/bin/sh
-
-EMUL_FILE_PATH="/opt/nfc"
-
-if [ ${USER} == "root" ]
-then
-echo "User Is ROOT"
-if [ ! -d $EMUL_FILE_PATH ]; then
- echo "Creating $EMUL_FILE_PATH directory."
- mkdir -p $EMUL_FILE_PATH
-fi
-
-chown :0 $EMUL_FILE_PATH
-chmod 775 $EMUL_FILE_PATH
-
-fi
-
+++ /dev/null
-#@PREFIX@/lib/pkgconfig/*
-#@PREFIX@/include/*
-
+++ /dev/null
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-CFLAGS ?= -Wall -g
-CXXFLAGS ?= -Wall -g
-LDFLAGS ?=
-PREFIX ?= /usr
-DATADIR ?= /opt
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
- CXXFLAGS += -O0
-else
- CFLAGS += -O2
- CXXFLAGS += -O2
-endif
-
-LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
-
-CMAKE_TMP_DIR = $(CURDIR)/cmake_tmp
-
-
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- # Add here commands to configure the package.
- mkdir -p $(CMAKE_TMP_DIR);
- cd $(CMAKE_TMP_DIR); CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX=$(PREFIX)
-
- touch configure-stamp
-
-build: build-stamp
-
-build-stamp: configure-stamp
- dh_testdir
-
- # Add here commands to compile the package.
- cd $(CMAKE_TMP_DIR) && $(MAKE)
- #docbook-to-man debian/wavplayer.sgml > wavplayer.1
-
- for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
- cat $$f > $${f%.in}; \
- sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
- sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
- done
-
-
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
-
- # Add here commands to clean up after the build process.
- -cd $(CMAKE_TMP_DIR) && $(MAKE) clean
- rm -rf $(CMAKE_TMP_DIR)
-
- rm -rf CMakeCache.txt
- rm -rf CMakeFiles
- rm -rf cmake_install.cmake
- rm -rf Makefile
- rm -rf install_manifest.txt
- rm -rf *.so
-
- for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
- rm -f $${f%.in}; \
- done
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
-
- # Add here commands to install the package into debian/wavplayer.
- cd $(CMAKE_TMP_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs
-# dh_installdocs
- dh_installexamples
- dh_install --sourcedir=debian/tmp
-# dh_installmenu
-# dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_python
-# dh_installinit
-# dh_installcron
-# dh_installinfo
- dh_installman
- dh_link
- dh_strip --dbg-package=libnfc-plugin-emul-dbg
- dh_compress
- dh_fixperms
-# dh_perl
- dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
Name: nfc-plugin-emul
Summary: NFC emul plugin
-Version: 0.0.10
+Version: 0.0.11
Release: 0
-Group: TO_BE/FILLED_IN
+Group: Network & Connectivity/NFC
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(nfc-common-lib)
+BuildRequires: pkgconfig(nfc-common)
BuildRequires: cmake
-BuildRequires: gettext-tools
%description
-NFC Plugin Emul
+NFC Plugin for Emulator
%prep
%setup -q
-
%build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
-
-make %{?jobs:-j%jobs}
+%cmake .
%install
-rm -rf %{buildroot}
+#rm -rf %{buildroot}
%make_install
+%postun -p /sbin/ldconfig
-%postun
-/sbin/ldconfig
-rm -f build-stamp configure-stamp
-cd cmake_tmp
-rm -rf $(CMAKE_TMP_DIR)
-rm -rf CMakeCache.txt
-rm -rf CMakeFiles
-rm -rf cmake_install.cmake
-rm -rf Makefile
-rm -rf install_manifest.txt
-rm -rf *.so
-
-%post
-
-
+%post -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_libdir}/nfc/libnfc-plugin.so
-
+%license LICENSE.APLv2
#include "net_nfc_oem_controller.h"
#include "net_nfc_typedef.h"
#include "nfc_debug_private.h"
-#include "net_nfc_util_private.h"
#include "net_nfc_util_ndef_message.h"
#include "net_nfc_util_ndef_record.h"
data_s *temp;
- _net_nfc_util_alloc_mem(temp, sizeof(data_s));
+ temp = calloc(1, sizeof(data_s));
if (temp != NULL) {
temp->length = 9;
- _net_nfc_util_alloc_mem(temp->buffer, temp->length);
+ temp->buffer = calloc(1, temp->length);
if (temp->buffer != NULL) {
temp->buffer[7] = (uint8_t)0x91;
temp->buffer[8] = (uint8_t)0xAF;
ret = true;
} else {
*result = NET_NFC_ALLOC_FAIL;
- _net_nfc_util_free_mem(temp);
+ free(temp);
}
} else {
*result = NET_NFC_ALLOC_FAIL;