From: Dmitry Kovalenko Date: Fri, 11 Jul 2014 09:47:15 +0000 (+0400) Subject: [IMPROVE] Add different OBS projects handling X-Git-Tag: Tizen_SDK_2.3~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F84%2F24384%2F3;p=kernel%2Fswap-modules.git [IMPROVE] Add different OBS projects handling Change-Id: Ia88a6f303b2dedb49194ae80c53e0fdf0cfbf009 Signed-off-by: Dmitry Kovalenko --- diff --git a/packaging/swap-modules.spec b/packaging/swap-modules.spec index 50c7985..5786145 100755 --- a/packaging/swap-modules.spec +++ b/packaging/swap-modules.spec @@ -10,9 +10,23 @@ Source: swap-modules-3.0.tar.gz BuildRequires: perl BuildRequires: python %ifarch %{arm} +%define build_arch arm +%if "%_project" != "Tizen:2.3" && "%_project" != "Kirana_SWA_OPEN:Build" +BuildRequires: NotSupportedProject +%else +%if "%_project" == "Tizen:2.3" +BuildRequires: linux-kernel-devel +%define kernel_path /usr/src/linux-kernel-build-3.0.15-tizen_defconfig.1 +%endif +%if "%_project" == "Kirana_SWA_OPEN:Build" BuildRequires: kernel-devel-tizen-dev +%define kernel_path /var/tmp/kernel/devel/kernel-devel-tizen_kiran_2g +%endif +%endif %else +%define build_arch i386 BuildRequires: emulator-kernel-devel +%define kernel_path /usr/src/linux-kernel-build-3.12.18 %endif Provides: swap-modules %description @@ -22,12 +36,7 @@ Kernel modules for SWAP %setup -q %build - -%ifarch %{arm} -./build.sh /var/tmp/kernel/devel/kernel-devel-tizen_kiran_2g arm -%else -./build.sh /usr/src/linux-kernel-build-3.12.18 i386 -%endif +./build.sh %kernel_path %build_arch %install mkdir -p %{buildroot}/opt/swap/sdk