Update License
[platform/upstream/iotivity.git] / packaging / iotivity.spec
index 5a0e919..e6fb6d5 100644 (file)
@@ -3,41 +3,19 @@ Version: 1.2.1
 Release: 0
 Summary: IoT Connectivity sponsored by the OCF
 Group: Network & Connectivity / IoT Connectivity
-License: Apache-2.0 and BSD-2-Clause and (MIT or BSL-1.0) and MIT
+License: Apache-2.0
 URL: https://www.iotivity.org/
 Source0: http://mirrors.kernel.org/%{name}/%{version}/%{name}-%{version}.tar.gz
 Source1001: %{name}.manifest
 Source1002: %{name}-test.manifest
 
-%if 0%{?tizen:1}
-%define TARGET_OS tizen
-%else
-%define TARGET_OS linux
-%endif
-
-%if "%{tizen}" == "2.3"
-%define TARGET_TRANSPORT IP
-%endif
-
-%if "%{profile}" == "ivi"
-%define TARGET_TRANSPORT IP
-%endif
-
-%if "%{TARGET_OS}" == "linux"
+# Use the official macros that are defined in Project Config (build.tizen.org).
+# https://build.tizen.org/project/prjconf?project=<project_name>
+#  - tizen_version_major 4
+#  - tizen_version_minor 0
+# For backward compatibility. Not needed (always true) in unified environment.
+#  - unified (undefined)
 %define TARGET_TRANSPORT IP
-%endif
-
-%if "%{TARGET_OS}" == "tizen"
-%define TARGET_TRANSPORT IP
-%endif
-
-%define JOB "-j4"
-%if 0%{?speedpython}
-%define JOB %{?_smp_mflags}
-%endif
-%if 0%{?speedpython:1} && 0%{?en_speedpython:1}
-%en_speedpython
-%endif
 
 # default is RELEASE mode.
 # If DEBUG mode is needed, please use tizen_build_devel_mode
@@ -50,9 +28,11 @@ Source1002: %{name}-test.manifest
 %endif
 
 %ifarch armv7l armv7hl armv7nhl armv7tnhl armv7thl
+BuildRequires: python-accel-armv7l-cross-arm
 %define TARGET_ARCH "armeabi-v7a"
 %endif
 %ifarch aarch64
+BuildRequires: python-accel-aarch64-cross-aarch64
 %define TARGET_ARCH "arm64"
 %endif
 %ifarch x86_64
@@ -75,7 +55,7 @@ Source1002: %{name}-test.manifest
 %{!?TARGET_OS: %define TARGET_OS tizen}
 %{!?TARGET_TRANSPORT: %define TARGET_TRANSPORT IP,BT}
 %{!?VERBOSE: %define VERBOSE 1}
-%{!?WITH_CLOUD: %define WITH_CLOUD 0}
+%{!?WITH_CLOUD: %define WITH_CLOUD 1}
 %{!?WITH_MQ: %define WITH_MQ OFF}
 %{!?WITH_PROXY: %define WITH_PROXY 0}
 %{!?WITH_TCP: %define WITH_TCP 1}
@@ -143,24 +123,7 @@ developing applications that use %{name}.
 %setup -q
 chmod g-w %_sourcedir/*
 
-find . \
-     -iname "LICEN*E*"  \
-     -o -name "*BSD*" \
-     -o -name "*COPYING*" \
-     -o -name "*GPL*" \
-     -o -name "*MIT*" \
-     | sort | uniq \
-     | grep -v 'libcoap-4.1.1/LICENSE.GPL'  \
-     | while read file ; do \
-          dir=$(dirname -- "$file")
-          echo "Files: ${dir}/*"
-          echo "License: ${file}"
-          sed 's/^/ /' "${file}"
-          echo ""
-          echo ""
-     done > tmp.tmp && mv tmp.tmp LICENSE
-
-cat LICENSE
+cp LICENSE.md LICENSE
 
 cp %{SOURCE1001} .
 %if 0%{?tizen_version_major} < 3
@@ -169,9 +132,8 @@ cp %{SOURCE1002} .
 cp %{SOURCE1001} ./%{name}-test.manifest
 %endif
 
-
 %build
-scons %{JOB} --prefix=%{_prefix} \
+scons %{?_smp_mflags} --prefix=%{_prefix} \
     ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} \
     LIB_INSTALL_DIR=%{_libdir} \
     LOGGING=%{LOGGING} \
@@ -264,9 +226,6 @@ cp resource/c_common/*.h %{buildroot}%{_includedir}
 cp resource/csdk/stack/include/*.h %{buildroot}%{_includedir}
 cp resource/csdk/logger/include/*.h %{buildroot}%{_includedir}
 
-cp service/easy-setup/inc/*.h %{buildroot}%{_includedir}
-cp service/easy-setup/enrollee/inc/*.h %{buildroot}%{_includedir}
-
 install -d %{buildroot}%{_includedir}/iotivity
 ln -fs ../resource %{buildroot}%{_includedir}/iotivity/
 ln -fs ../service %{buildroot}%{_includedir}/iotivity/
@@ -307,6 +266,7 @@ rm -rfv out %{buildroot}/out %{buildroot}/${HOME} ||:
 %{_libdir}/librcs_server.so
 %{_libdir}/libresource_directory.so
 %{_libdir}/libESEnrolleeSDK.so
+%{_libdir}/libESMediatorRich.so
 %{_libdir}/libnotification*.so
 %if 0%{?WITH_PROXY} == 1
 %{_libdir}/libcoap_http_proxy.so