Remove re-build command in the install section 54/181754/1
authorAmit KS <amit.s12@samsung.com>
Mon, 18 Jun 2018 05:01:11 +0000 (10:31 +0530)
committerAmit KS <amit.s12@samsung.com>
Mon, 18 Jun 2018 06:08:31 +0000 (11:38 +0530)
In the build section, scons build is done. So we can use the result
on the install section without rebuild using scons.

Change-Id: I33d47209d0898d703dcedba6bfd00a91d959c9b6
Signed-off-by: Amit KS <amit.s12@samsung.com>
tools/tizen/iotivity-vd-tv-es-tizen30.spec
tools/tizen/iotivity-vd-tv-tizen30.spec
tools/tizen/iotivity.spec

index 2dae53f..a13a036 100644 (file)
@@ -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%{?license:0}
 %define license %doc
@@ -163,6 +159,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} \
@@ -187,40 +184,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}
@@ -246,14 +218,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}
index 86a0068..c48946e 100644 (file)
@@ -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%{?license:0}
 %define license %doc
@@ -163,6 +159,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} \
@@ -187,40 +184,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}
@@ -246,14 +218,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}
index 2a1a9ea..bef87c0 100644 (file)
@@ -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%{?license:0}
 %define license %doc
@@ -162,6 +158,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} \
@@ -185,39 +182,16 @@ 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} \
-    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}
@@ -243,14 +217,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}