From 58b9f2b2bde8552e1d57faa44cdc920ba222ec46 Mon Sep 17 00:00:00 2001 From: Minchul Lee Date: Mon, 16 Feb 2015 14:32:09 +0900 Subject: [PATCH] Adding build option for tizen armeabi-v7a Change-Id: I95c7f0e19985dfebae35172fec3c0ff7aac2b7fe Signed-off-by: Minchul Lee --- build_common/SConscript | 8 ++++---- tools/tizen/iotivity.spec | 41 ++++++++++++++++++++++++++++++----------- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/build_common/SConscript b/build_common/SConscript index db23ac3..45cb4f6 100644 --- a/build_common/SConscript +++ b/build_common/SConscript @@ -15,7 +15,7 @@ host_target_map = { # Map of os and allowed archs (os: allowed archs) os_arch_map = { 'linux': ['x86', 'x86_64', 'arm', 'arm64'], - 'tizen': ['x86', 'x86_64', 'arm', 'arm64'], + 'tizen': ['x86', 'x86_64', 'arm', 'arm64', 'armeabi-v7a'], 'android': ['x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'], 'windows': ['x86', 'amd64', 'arm'], 'winrt': ['arm'], @@ -174,8 +174,8 @@ Export('env') ###################################################################### if target_os == "yocto": ''' - This code injects Yocto cross-compilation tools+flags into scons' - build environment in order to invoke the relevant tools while + This code injects Yocto cross-compilation tools+flags into scons' + build environment in order to invoke the relevant tools while performing a build. ''' import os.path @@ -213,7 +213,7 @@ if target_os == "yocto": env['TARGET_OS'] = 'linux' ''' We want to preserve debug symbols to allow BitBake to generate both DEBUG and - RELEASE packages for OIC. + RELEASE packages for OIC. ''' env['CCFLAGS'].append('-g') Export('env') diff --git a/tools/tizen/iotivity.spec b/tools/tizen/iotivity.spec index 7f4358c..3776980 100644 --- a/tools/tizen/iotivity.spec +++ b/tools/tizen/iotivity.spec @@ -6,15 +6,20 @@ Group: System Environment/Libraries License: Apache-2.0 URL: https://www.iotivity.org/ Source0: %{name}-%{version}.tar.bz2 - -BuildRequires: gettext, expat-devel -BuildRequires: python, libcurl-devel -BuildRequires: scons -BuildRequires: openssl-devel -BuildRequires: boost-devel +BuildRequires: expat-devel +BuildRequires: gettext-tools +BuildRequires: python, libcurl-devel +BuildRequires: scons +BuildRequires: openssl-devel +BuildRequires: boost-devel +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(capi-network-bluetooth) +BuildRequires: pkgconfig(capi-system-device) Requires(postun): /sbin/ldconfig Requires(post): /sbin/ldconfig +%define release_mode true + %description IoTivity Base (RICH & LITE) Stack & IoTivity Services @@ -33,23 +38,37 @@ developing applications that use %{name}. %build %ifarch %arm -export RPM_ARCH=arm +export RPM_ARCH=armeabi-v7a %else export RPM_ARCH=x86 %endif -scons -j 4 TARGET_ARCH=$RPM_ARCH +scons -j 4 TARGET_OS=tizen TARGET_ARCH=$RPM_ARCH RELEASE=%{release_mode} %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_includedir} +mkdir -p %{buildroot}%{_includedir}/targets mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_sbindir} -cp out/linux/*/release/lib*.so %{buildroot}%{_libdir} -cp out/linux/*/release/lib*.a %{buildroot}%{_libdir} +%if %{release_mode} == "true" +cp out/tizen/*/release/lib*.so %{buildroot}%{_libdir} +cp out/tizen/*/release/lib*.a %{buildroot}%{_libdir} +%else +cp out/tizen/*/debug/lib*.so %{buildroot}%{_libdir} +cp out/tizen/*/debug/lib*.a %{buildroot}%{_libdir} +%endif cp resource/csdk/stack/include/ocstack.h %{buildroot}%{_includedir} +cp resource/csdk/stack/include/ocstackconfig.h %{buildroot}%{_includedir} +cp resource/csdk/ocsocket/include/ocsocket.h %{buildroot}%{_includedir} +cp resource/oc_logger/include/oc_logger.hpp %{buildroot}%{_includedir} +cp resource/oc_logger/include/oc_log_stream.hpp %{buildroot}%{_includedir} +cp resource/oc_logger/include/oc_logger.h %{buildroot}%{_includedir} +cp resource/oc_logger/include/oc_logger_types.h %{buildroot}%{_includedir} +cp resource/oc_logger/include/targets/oc_console_logger.h %{buildroot}%{_includedir}/targets +cp resource/oc_logger/include/targets/oc_ostream_logger.h %{buildroot}%{_includedir}/targets cp resource/include/*.h %{buildroot}%{_includedir} cp service/things-manager/sdk/inc/*.h %{buildroot}%{_includedir} @@ -70,4 +89,4 @@ rm -rf %{buildroot} %files devel %defattr(-,root,root,-) -%{_includedir}/*.h +%{_includedir}/* -- 2.7.4