From 154e711e9d96ebbec07a636c069c7098ae2f13a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9C=A4=EC=A7=80=EC=98=81/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84?= =?utf8?q?=EC=9E=90?= Date: Wed, 31 Oct 2018 10:22:27 +0900 Subject: [PATCH] Use rpm macro instead of user define macro in spec file (#3406) %{install_prefix} -> %{_prefix} %{install_prefix}/lib -> %{_libdir} Signed-off-by: Jiyoung Yun --- packaging/nnfw.spec | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/packaging/nnfw.spec b/packaging/nnfw.spec index 733f54c..0682729 100644 --- a/packaging/nnfw.spec +++ b/packaging/nnfw.spec @@ -33,7 +33,6 @@ Requires: nnfw %description test NNFW test rpm. It does not depends on nnfw rpm since it contains nnfw runtime. -%define install_prefix /usr %define test_install_prefix /opt/usr/nnfw-test %ifarch %{arm} @@ -50,7 +49,7 @@ NNFW test rpm. It does not depends on nnfw rpm since it contains nnfw runtime. %if %{coverage_build} == 1 %define build_options COVERAGE_BUILD=1 OBS_BUILD=1 BUILD_TYPE=Debug TARGET_ARCH=%{target_arch} TARGET_OS=tizen UPDATE_MODULE=0 %else -%define build_options OBS_BUILD=1 BUILD_TYPE=%{build_type} INSTALL_PATH=%{buildroot}%{install_prefix} TARGET_ARCH=%{target_arch} TARGET_OS=tizen UPDATE_MODULE=0 +%define build_options OBS_BUILD=1 BUILD_TYPE=%{build_type} INSTALL_PATH=%{buildroot}%{_prefix} TARGET_ARCH=%{target_arch} TARGET_OS=tizen UPDATE_MODULE=0 %endif %prep @@ -66,14 +65,18 @@ cp %{SOURCE1} . %ifarch arm armv7l aarch64 %{build_options} make install +%ifarch aarch64 +mv %{buildroot}%{_prefix}/lib %{buildroot}%{_libdir} +%endif + %if %{coverage_build} == 0 # nnfw-test rpm(like test-suite on cross build) ## install Product mkdir -p %{buildroot}%{test_install_prefix}/Product/out -mv %{buildroot}%{install_prefix}/unittest %{buildroot}%{test_install_prefix}/Product/out -mv %{buildroot}%{install_prefix}/bin %{buildroot}%{test_install_prefix}/Product/out -cp -rf %{buildroot}%{install_prefix}/lib %{buildroot}%{test_install_prefix}/Product/out -rm -rf %{buildroot}%{install_prefix}/lib/pureacl +mv %{buildroot}%{_prefix}/unittest %{buildroot}%{test_install_prefix}/Product/out +mv %{buildroot}%{_prefix}/bin %{buildroot}%{test_install_prefix}/Product/out +cp -rf %{buildroot}%{_libdir} %{buildroot}%{test_install_prefix}/Product/out +rm -rf %{buildroot}%{_libdir}/pureacl ## install tests cp -rf ./tests %{buildroot}%{test_install_prefix}/. ## install tools @@ -95,10 +98,10 @@ rm -rf %{buildroot}%{test_install_prefix}/coverage-suite.tar.gz %manifest %{name}.manifest %defattr(-,root,root,-) %ifarch arm armv7l aarch64 -%{install_prefix}/lib/* -%exclude %{install_prefix}/bin/* -%exclude %{install_prefix}/unittest/* -%exclude %{install_prefix}/lib/debug +%{_libdir}/* +%exclude %{_prefix}/bin/* +%exclude %{_prefix}/unittest/* +%exclude %{_libdir}/debug %endif %files test @@ -106,7 +109,7 @@ rm -rf %{buildroot}%{test_install_prefix}/coverage-suite.tar.gz %defattr(-,root,root,-) %ifarch arm armv7l aarch64 %{test_install_prefix}/* -%exclude %{install_prefix}/lib/debug +%exclude %{_libdir}/debug %endif %changelog -- 2.7.4