diff options
author | Chan Lee <chan45.lee@samsung.com> | 2016-08-19 12:45:11 +0900 |
---|---|---|
committer | Chan Lee <chan45.lee@samsung.com> | 2016-08-22 11:15:33 +0900 |
commit | d3f5748f084e0e2eb9634f6972678535bee65943 (patch) | |
tree | 0b31729ec57c1a741447c489ee31302356d462c2 /Build | |
parent | e36ddbe18a4cb3ffa0a7e8156951df9185d157bd (diff) | |
download | build-d3f5748f084e0e2eb9634f6972678535bee65943.tar.gz build-d3f5748f084e0e2eb9634f6972678535bee65943.tar.bz2 build-d3f5748f084e0e2eb9634f6972678535bee65943.zip |
Add hostarch information for build configuration
In a few cases, hostarch information is needed as below,
1. There are some packages to be installed according to host archtecture
2. Some config need to be defined each host archtecture
Change-Id: I3409a1c51069ee60f81b46f06d3f99a74e6df452
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
Diffstat (limited to 'Build')
-rw-r--r-- | Build/Rpm.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Build/Rpm.pm b/Build/Rpm.pm index d9c6028..47cb9e7 100644 --- a/Build/Rpm.pm +++ b/Build/Rpm.pm @@ -436,6 +436,20 @@ reexpand: $hasif = 1; next; } + if ($line =~ /^\s*%ifhostarch(.*)$/) { + my $hostarch = $macros{'hostarch'} || 'unknown'; + my @hostarchs = grep {$_ eq $hostarch} split(/\s+/, $1); + $skip = 1 if !@hostarchs; + $hasif = 1; + next; + } + if ($line =~ /^\s*%ifnhostarch(.*)$/) { + my $hostarch = $macros{'hostarch'} || 'unknown'; + my @hostarchs = grep {$_ eq $hostarch} split(/\s+/, $1); + $skip = 1 if @hostarchs; + $hasif = 1; + next; + } if ($line =~ /^\s*%ifos(.*)$/) { my $os = $macros{'_target_os'} || 'unknown'; my @oss = grep {$_ eq $os} split(/\s+/, $1); |