summaryrefslogtreecommitdiff
path: root/packaging/building-blocks.spec
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2017-03-06 19:29:05 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2017-03-06 19:29:05 +0900
commit96353c9325e3595d8fa6e04f66a0f62994d7fec3 (patch)
tree87c1397c22de74d1d26ceb8bc81b5d304db26a14 /packaging/building-blocks.spec
parent33a0976653a674c5d273d652c4981784097ea89d (diff)
downloadbuilding-blocks-96353c9325e3595d8fa6e04f66a0f62994d7fec3.tar.gz
building-blocks-96353c9325e3595d8fa6e04f66a0f62994d7fec3.tar.bz2
building-blocks-96353c9325e3595d8fa6e04f66a0f62994d7fec3.zip
Rewrite include macro for higher readability
%include_if_mainbuild includes the file if Source1001 (domain-kernel.inc) is located. (when rpmbuild becomes able to access files in packaging/* located at SOURCES directory) Change-Id: I849422e3e9c9fd286651968f651f05fd8d29cabc Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'packaging/building-blocks.spec')
-rw-r--r--packaging/building-blocks.spec40
1 files changed, 25 insertions, 15 deletions
diff --git a/packaging/building-blocks.spec b/packaging/building-blocks.spec
index d39b43a..2fb3699 100644
--- a/packaging/building-blocks.spec
+++ b/packaging/building-blocks.spec
@@ -27,6 +27,12 @@ Source1100: domain-security.inc
Source2001: epicfeature-headless.inc
Source2010: epicfeature-development.inc
+
+# Do not try to include files if RPMBUILD has already expanded source files
+# Use Source1001 (domain-kernel) as the probing point.
+%define include_if_mainbuild() %{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1001}"), "f") then print("%include "..rpm.expand("%{1}")) end}}
+
+
Suggests: %{name}-root-UI
Suggests: %{name}-root-HAL
Suggests: %{name}-root-Kernel
@@ -35,6 +41,10 @@ Suggests: %{name}-root-System_FW
Suggests: %{name}-root-feature_Headless
Suggests: %{name}-root-feature_Headed
+Suggests: %{name}-root-feature_Development
+
+Suggests: %{name}-root-preset
+
%description
The root of all Tizen building block meta packages.
Every root-level Tizen building block should be included by this.
@@ -51,30 +61,30 @@ In Tizen building blocks, "Requires" means mandatory package.
############## DOMAINS ##################
# Include "Kernel" domain. The script should not execute "include" if the contexts is in GBS service in OBS or GBS-Export
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1001}"), "f") then print("%include %{SOURCE1001}") end}}
+%include_if_mainbuild %{SOURCE1001}
# Include "systemfw" domain. The script should not execute "include" if the contexts is in GBS service in OBS or GBS-Export
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1002}"), "f") then print("%include %{SOURCE1002}") end}}
+%include_if_mainbuild %{SOURCE1002}
# And other domains
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1010}"), "f") then print("%include %{SOURCE1010}") end}}
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1020}"), "f") then print("%include %{SOURCE1020}") end}}
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1030}"), "f") then print("%include %{SOURCE1030}") end}}
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1040}"), "f") then print("%include %{SOURCE1040}") end}}
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1050}"), "f") then print("%include %{SOURCE1050}") end}}
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1060}"), "f") then print("%include %{SOURCE1060}") end}}
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1070}"), "f") then print("%include %{SOURCE1070}") end}}
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1080}"), "f") then print("%include %{SOURCE1080}") end}}
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1090}"), "f") then print("%include %{SOURCE1090}") end}}
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1100}"), "f") then print("%include %{SOURCE1100}") end}}
-
+%include_if_mainbuild %{SOURCE1010}
+%include_if_mainbuild %{SOURCE1020}
+%include_if_mainbuild %{SOURCE1030}
+%include_if_mainbuild %{SOURCE1040}
+%include_if_mainbuild %{SOURCE1050}
+%include_if_mainbuild %{SOURCE1060}
+%include_if_mainbuild %{SOURCE1070}
+%include_if_mainbuild %{SOURCE1080}
+%include_if_mainbuild %{SOURCE1090}
+%include_if_mainbuild %{SOURCE1100}
############## EPIC FEATURES ######################
# Include "headless" epic feature. The script should not execute "include" if the contexts is in GBS service in OBS or GBS-Export
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE2001}"), "f") then print("%include %{SOURCE2001}") end}}
+%include_if_mainbuild %{SOURCE2001}
+
+%include_if_mainbuild %{SOURCE2010}
-%{expand:%{lua:if posix.access(rpm.expand("%{SOURCE2010}"), "f") then print("%include %{SOURCE2010}") end}}
%package root-UI
Summary: UI Related Packages