arch: Fixed /usr/include/asm to build 32bit packages on 64bit Linux
This commit is to handle a different attribute of CPU architectures
between kernel-space and user-space. For example, the Tizen platform
6.0 consists the ARM64-based Linux kernel and ARM32-based Tizen
platform packages. When the developer want to compile the user-space
software packages to support a ARM32 bit CPU architecture, they meet
an unexpected issue because the 'linux-glibc-devel' package is installed
based on CPU architecture of the Linux kernel on the real target board.
Therefore, we need to improve the compatibility of the user-space software
packages based on 32bit CPU architecture. Let's replace the criteria from
"uname -m" command to "%_arch" macro.
Let's assume that the Tizen 6.0 platform is based on ARM32,
and the Tizen Linux kernel is based on ARM64 bit (arm64/aarch64).
**Changelog**
* Version 3:
- Removed "BuildArch: noarch" statement to handle correctly different
architecure attribute of /usr/include/asm (symlink)
* Version 2:
- Use '_arch' instead of tizen-release package to avoid a build issue
(Note that this package does not use the Unified repository.)
- Fixed typos
- Added annotation for maintenance
* Version 1:
- Replaced "uname -m" with "/etc/tizen-release"
**Self assessment**
* Checking asm_link variable in the post section
$ rpm -qp --scripts ./linux-glibc-devel-3.10-0.aarch64.rpm | grep asm_link
asm_link=aarch64
$ rpm -qp --scripts ./linux-glibc-devel-3.10-0.armv7l.rpm | grep asm_link
asm_link=arm
* On Tizen 6.0 (32bit) after this commit: It's incorrect.
sh-3.2# ls -al /usr/include/asm
lrwxrwxrwx 1 root root 7 Mar 4 14:26 /usr/include/asm -> asm-arm64
* On Tizen 6.0 (32bit) after this commit: It's correct.
sh-3.2# ls -al /usr/include/asm
lrwxrwxrwx 1 root root 7 Mar 9 19:38 /usr/include/asm -> asm-arm
Change-Id: I8c25d840d7558db16b6a92c728555ed1c6a24891
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>