From: Amit KS Date: Mon, 18 Jun 2018 08:45:54 +0000 (+0530) Subject: Applying remove re-build command patchset in the public spec file X-Git-Tag: submit/tizen/20180618.102358^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b03465eb5db1d2b7eac63576bd180578a47387c8;p=platform%2Fupstream%2Fiotivity.git Applying remove re-build command patchset in the public spec file In the build section, scons build is done. So we can use the result on the install section without rebuild using scons. Change-Id: I05254fddd617f7c4af35a16e07c584da2b020e03 Signed-off-by: Amit KS --- diff --git a/packaging/iotivity.spec b/packaging/iotivity.spec index f0494d73b..cd9122411 100755 --- a/packaging/iotivity.spec +++ b/packaging/iotivity.spec @@ -27,13 +27,7 @@ Source1002: %{name}-test.manifest %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 @@ -59,6 +53,8 @@ Source1002: %{name}-test.manifest %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} @@ -165,6 +161,7 @@ cp %{SOURCE1001} ./%{name}-test.manifest %endif %build +CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; scons %{JOB} --prefix=%{_prefix} \ ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} \ LIB_INSTALL_DIR=%{_libdir} \ @@ -189,40 +186,15 @@ scons %{JOB} --prefix=%{_prefix} \ 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} @@ -248,14 +220,26 @@ mkdir -p %{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}