%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
%endif
%define ex_install_dir %{buildroot}%{_bindir}
+%define ex_lib_dir %{buildroot}%{_libdir}
+%define ex_include_dir %{buildroot}%{_includedir}
%if 0%{?tizen_version_major} < 3
%if ! 0%{?license:0}
%endif
%build
+CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
scons %{JOB} --prefix=%{_prefix} \
ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} \
LIB_INSTALL_DIR=%{_libdir} \
MULTIPLE_OWNER=%{MULTIPLE_OWNER} \
#eol
-
-
%install
%if 0%{?tizen_version_major} < 3
mkdir -p %{buildroot}/%{_datadir}/license
cp LICENSE %{buildroot}/%{_datadir}/license/%{name}
%endif
-rm -rf %{buildroot}
-CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
-scons install --install-sandbox=%{buildroot} --prefix=%{_prefix} \
- ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} \
- LIB_INSTALL_DIR=%{_libdir} \
- LOGGING=%{LOGGING} \
- RD_MODE=%{RD_MODE} \
- RELEASE=%{RELEASE} \
- ROUTING=%{ROUTING} \
- SECURED=%{SECURED} \
- TARGET_ARCH=%{TARGET_ARCH} \
- TARGET_OS=%{TARGET_OS} \
- TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
- VERBOSE=%{VERBOSE} \
- WITH_CLOUD=%{WITH_CLOUD} \
- WITH_MQ=%{WITH_MQ} \
- WITH_PROXY=%{WITH_PROXY} \
- WITH_TCP=%{WITH_TCP} \
- DISABLE_TCP_SERVER=%{DISABLE_TCP_SERVER} \
- RD_MODE=%{RD_MODE} \
- BLE_CUSTOM_ADV=%{BLE_CUSTOM_ADV} \
- BLE_DIVISION=%{BLE_DIVISION} \
- BLE_TIZEN_30=%{BLE_TIZEN_30} \
- MULTIPLE_OWNER=%{MULTIPLE_OWNER} \
- #eol
mkdir -p %{ex_install_dir}
+mkdir -p %{ex_include_dir}
+mkdir -p %{ex_lib_dir}/pkgconfig
#cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/examples/OICMiddle/OICMiddle %{ex_install_dir}
#cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/resource/examples/devicediscoveryclient %{ex_install_dir}
#cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/resource/examples/devicediscoveryserver %{ex_install_dir}
#cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/libcoap.a %{buildroot}%{_libdir}
cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/lib*.a %{buildroot}%{_libdir}
+# Install so files
+cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/lib*.so %{buildroot}%{_libdir}
+cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/resource/src/lib*.so %{buildroot}%{_libdir}
+cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/resource/csdk/lib*.so %{buildroot}%{_libdir}
+cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/resource/oc_logger/lib*.so %{buildroot}%{_libdir}
+cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/service/easy-setup/mediator/richsdk/lib*.so %{buildroot}%{_libdir}
+
+# Install pc file
+cp ./*.pc %{buildroot}%{_libdir}/pkgconfig
+
%if 0%{?WITH_PROXY} == 1
mkdir -p %{ex_install_dir}/proxy-sample
cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/service/coap-http-proxy/samples/proxy_main %{ex_install_dir}/proxy-sample/
cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/service/coap-http-proxy/samples/proxy_client %{ex_install_dir}/proxy-sample/
%endif
+
%if 0%{?SECURED} == 1
mkdir -p %{ex_install_dir}/provisioning
mkdir -p %{ex_install_dir}/provision-sample
+mkdir -p %{ex_include_dir}/mbedtls
cp -R ./extlibs/mbedtls/mbedtls/include/mbedtls/ %{buildroot}%{_includedir}/mbedtls
cp ./resource/csdk/security/include/*.h %{buildroot}%{_includedir}