From: Jooseok Park Date: Thu, 6 Apr 2017 10:22:54 +0000 (+0900) Subject: Remove tizen version check X-Git-Tag: submit/tizen/20170407.012347^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cef98e8575e36fb551cbec39d15df72714d0b8d7;p=platform%2Fcore%2Fiot%2Fiotcon.git Remove tizen version check - cleanup spec/cmake file Change-Id: I78f9d321edd78bc3e142a5663fb189b65bd29c85 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c360255..ca6d5cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,10 +22,6 @@ ENDFOREACH(flag) INCLUDE_DIRECTORIES(${pkgs_INCLUDE_DIRS}) LINK_DIRECTORIES(${pkgs_LIBRARY_DIRS}) -IF(TZ_VER_3) - ADD_DEFINITIONS("-DTZ_VER_3") -ENDIF(TZ_VER_3) - ADD_LIBRARY(${LIB} SHARED ${SRCS}) TARGET_LINK_LIBRARIES(${LIB} ${pkgs_LIBRARIES} pthread) SET_TARGET_PROPERTIES(${LIB} PROPERTIES VERSION ${FULLVER} SOVERSION ${MAJORVER}) diff --git a/include/iotcon-errors.h b/include/iotcon-errors.h index 13a5916..05a8b61 100644 --- a/include/iotcon-errors.h +++ b/include/iotcon-errors.h @@ -21,10 +21,7 @@ #include - -#ifndef TZ_VER_3 #define TIZEN_ERROR_IOTCON -0x01C80000 -#endif /** diff --git a/packaging/iotcon.spec b/packaging/iotcon.spec index 0ab0dd7..42d50bc 100644 --- a/packaging/iotcon.spec +++ b/packaging/iotcon.spec @@ -1,6 +1,6 @@ Name: iotcon Summary: Tizen IoT Connectivity -Version: 0.3.16 +Version: 0.3.17 Release: 0 Group: Network & Connectivity/Service License: Apache-2.0 @@ -22,18 +22,8 @@ BuildRequires: pkgconfig(capi-network-wifi) BuildRequires: pkgconfig(iotivity) BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(cynara-client) - -%if "%{tizen}" == "2.3" -BuildRequires: python-xml -%endif -%if 0%{?tizen_version_major} >= 3 Requires(post): /usr/bin/chgrp, /usr/bin/chmod, /usr/bin/chsmack -%endif -Requires(post): /sbin/ldconfig, /usr/bin/systemctl -Requires(postun): /sbin/ldconfig, /usr/bin/systemctl -%define _unitdir /usr/lib/systemd/system -%define _dbus_interface org.tizen.iotcon.dbus %description Tizen IoT Connectivity Service & Library(Client) based on Iotivity @@ -60,57 +50,29 @@ Tizen IoT Connectivity Test Programs %prep %setup -q chmod g-w %_sourcedir/* -%if 0%{?tizen_version_major} < 3 -cp %{SOURCE1002} ./%{name}.manifest -cp %{SOURCE1004} ./%{name}-test.manifest -%else cp %{SOURCE1001} ./%{name}.manifest cp %{SOURCE1003} ./%{name}-test.manifest cp %{SOURCE1005} ./%{name}-network-get cp %{SOURCE1006} ./%{name}-internet -%endif %build -%if 0%{?tizen_version_major} < 3 -TZ_VER_3=0 -%else -TZ_VER_3=1 -%endif - -# for aarch64, x86_64 -%define BUILD_ARCH %{_arch} - -%ifarch armv7l armv7hl armv7nhl armv7tnhl armv7thl -%define BUILD_ARCH "arm" -%endif - -%ifarch %{ix86} -%define BUILD_ARCH "x86" -%endif - MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` -%cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version} -DBIN_INSTALL_DIR:PATH=%{_bindir} \ - -DTZ_VER_3=${TZ_VER_3} -DARCH=%{BUILD_ARCH} +%cmake . -DMAJORVER=${MAJORVER} \ + -DFULLVER=%{version} \ + -DBIN_INSTALL_DIR:PATH=%{_bindir} + %install rm -rf %{buildroot} %make_install - -%if 0%{?tizen_version_major} < 3 -mkdir -p %{buildroot}/%{_datadir}/license -cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name} -cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}-test -cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}-devel -%else mkdir -p %{buildroot}/usr/share/%{name} cp %{name}-network-get %{buildroot}/usr/share/%{name}/%{name}-network-get cp %{name}-internet %{buildroot}/usr/share/%{name}/%{name}-internet -%endif + %post -%if 0%{?tizen_version_major} >= 3 chgrp priv_internet /usr/share/%{name}/%{name}-internet chmod g+r /usr/share/%{name}/%{name}-internet chmod o= /usr/share/%{name}/%{name}-internet @@ -120,7 +82,7 @@ chgrp priv_network_get /usr/share/%{name}/%{name}-network-get chmod g+r /usr/share/%{name}/%{name}-network-get chmod o= /usr/share/%{name}/%{name}-network-get chsmack -a "*" /usr/share/%{name}/%{name}-network-get -%endif + /sbin/ldconfig %postun @@ -131,31 +93,21 @@ chsmack -a "*" /usr/share/%{name}/%{name}-network-get %manifest %{name}.manifest %defattr(-,root,root,-) %{_libdir}/lib%{name}.so.* -%if 0%{?tizen_version_major} < 3 -%{_datadir}/license/%{name} -%else -%license LICENSE.APLv2 /usr/share/%{name}/%{name}-network-get /usr/share/%{name}/%{name}-internet -%endif +%license LICENSE.APLv2 + %files devel %defattr(-,root,root,-) -%if 0%{?tizen_version_major} < 3 -%{_datadir}/license/%{name} -%else -%license LICENSE.APLv2 -%endif %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc %{_includedir}/%{name}/*.h +%license LICENSE.APLv2 %files test %manifest %{name}-test.manifest %defattr(-,root,root,-) %{_bindir}/iotcon-test-* -%if 0%{?tizen_version_major} < 3 -%{_datadir}/license/%{name}-test -%else %license LICENSE.APLv2 -%endif + diff --git a/src/ic-utils.c b/src/ic-utils.c index 781c694..fdaef06 100644 --- a/src/ic-utils.c +++ b/src/ic-utils.c @@ -30,17 +30,8 @@ #include "ic-log.h" #include "ic-utils.h" -#ifdef TZ_VER_3 static int _ic_ocf_feature = -1; static const char *IC_FEATURE_OCF = "http://tizen.org/feature/iot.ocf"; -#endif - -#if 0 -#ifdef TZ_VER_3 -static const char *IC_PRIV_FILE_NETWORK_GET = "/usr/share/iotcon/iotcon-network-get"; -static const char *IC_PRIV_FILE_INTERNET = "/usr/share/iotcon/iotcon-internet"; -#endif -#endif /* TODO : need guide from security team */ #define SMACK_LABEL_LEN 255 @@ -131,16 +122,12 @@ bool ic_utils_check_permission(int permssion) bool ic_utils_check_ocf_feature() { -#ifdef TZ_VER_3 if (_ic_ocf_feature < 0) { bool feature_supported = false; system_info_get_platform_bool(IC_FEATURE_OCF, &feature_supported); _ic_ocf_feature = feature_supported ? 1 : 0; } return _ic_ocf_feature; -#else - return true; -#endif } static inline pthread_mutex_t* _utils_mutex_get(int type)