Make spec compliant with gbs --incremental 86/206986/1
authorKonrad Lipinski <k.lipinski2@partner.samsung.com>
Wed, 29 May 2019 16:08:32 +0000 (18:08 +0200)
committerKonrad Lipinski <k.lipinski2@partner.samsung.com>
Wed, 29 May 2019 16:35:59 +0000 (18:35 +0200)
According to [1], %prep section of the spec file should contain a single
%setup macro, nothing else. According to [2], manifest %files are best
copied to %{buildroot}%{_datadir} in the %install section.

Moved manifest copy operations from %prep to %install accordingly.

References
[1] https://source.tizen.org/documentation/reference/git-build-system/usage/gbs-build
[2] https://wiki.tizen.org/Security/Application_installation_and_Manifest

Change-Id: Ie9b683d8bee96528407aefc04b6bf1981166f559

packaging/tef-simulator-helloworld.spec
packaging/tef-simulator.spec

index 27153d0..eb64196 100644 (file)
@@ -30,7 +30,6 @@ testing purposes.
 
 %prep
 %setup -q
-cp %{SOURCE1} .
 
 %build
 cd helloworld
@@ -45,6 +44,9 @@ make %{?jobs:-j%jobs}
 cd helloworld
 make install
 
+mkdir -p %{buildroot}%{_datadir}/
+cp -a %{SOURCE1} %{buildroot}%{_datadir}/
+
 %pre
 
 %post
@@ -55,6 +57,6 @@ make install
 
 %files -n %{name}
 %license LICENSE
-%manifest tef-simulator-helloworld.manifest
+%manifest %{_datadir}/tef-simulator-helloworld.manifest
 %attr(111,security_fw,security_fw) %{bin_dir}/tef-simulator-helloworld
 %attr(444,security_fw,security_fw) %{tastore_dir}/%{ta_name}
index 2e40843..3294fd6 100644 (file)
@@ -71,7 +71,6 @@ with TEF Simulator.
 
 %prep
 %setup -q
-cp %{SOURCE1} .
 
 %build
 # cannot call cmake rpmbuild macro because of scripts removing libTEEStub.a, which is a part of devkit
@@ -103,6 +102,8 @@ make install
 cp rapidxml/license.txt LICENSE.MIT
 cp include/include/LICENSE LICENSE.BSD
 
+cp -a %{SOURCE1} %{buildroot}%{_datadir}/
+
 %pre
 if [ $1 -gt 1 ] ; then
     systemctl stop tef-simulator.socket
@@ -147,7 +148,7 @@ fi
 %license LICENSE
 %license LICENSE.MIT
 %license LICENSE.Krb5-MIT
-%manifest tef-simulator.manifest
+%manifest %{_datadir}/tef-simulator.manifest
 %attr(111,security_fw,security_fw) %{bin_dir}/tef-simulator-daemon
 %attr(111,security_fw,security_fw) %{bin_dir}/tef-simulator-daemonctl
 %attr(111,security_fw,security_fw) %{bin_dir}/tef-simulator-debugproxy