Add the swap-modules-emulator32 package build 53/183353/2 accepted/tizen/unified/20180706.140655 submit/tizen/20180705.155444
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 4 Jul 2018 18:25:23 +0000 (21:25 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Thu, 5 Jul 2018 13:54:47 +0000 (16:54 +0300)
For enabling/disabling build of the swap-modules-emulator32 package
set BUILD_PACKAGE_EMULATOR32 to 1/0.

Change-Id: Ie9ba14a981fce8396198eea875c7d865a61eb65c
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
packaging/swap-modules.spec

index 0144d78740ccc808cb21f2f1288caeab8b226871..76ec71e9fb316b815fd80fbc130e3301835761f8 100755 (executable)
@@ -18,10 +18,14 @@ Source: swap-modules-3.0.tar.gz
 %define BUILD_PACKAGE_TW2 1
 %define BUILD_PACKAGE_RPI3 1
 %define BUILD_PACKAGE_ODROIDXU3 1
+%define BUILD_PACKAGE_EMULATOR32 1
 
 
 # Validate build config.
 #   If current architecture does not support configuration, it disables.
+%ifnarch %ix86
+ %define BUILD_PACKAGE_EMULATOR32 0
+%endif
 %ifnarch %arm
  %define BUILD_PACKAGE_TM1 0
  %define BUILD_PACKAGE_ODROIDXU3 0
@@ -140,6 +144,10 @@ mkdir -p %{buildroot}/opt/swap/modules/
  cp -r /tmp/odroid_swap_modules %{buildroot}/opt/swap/modules/odroidxu3
 %endif
 
+%if %{BUILD_PACKAGE_EMULATOR32}
+ cp -r /tmp/emul_swap_modules %{buildroot}/opt/swap/modules/emulator32
+%endif
+
 mkdir -p %{buildroot}/opt/swap/sdk/
 %ifarch armv7l
 mv /tmp/tm1_swap_modules %{buildroot}/opt/swap/sdk/
@@ -285,3 +293,23 @@ rm /opt/swap/sdk
 %license LICENSE.GPL-2.0+
 /opt/swap/modules/odroidxu3/
 %endif # BUILD_PACKAGE_ODROIDXU3
+
+%if %{BUILD_PACKAGE_EMULATOR32}
+%package emulator32
+Summary: SWAP modules for Emulator x86
+Provides: swap-modules
+Provides: swap-modules = %{version}-%{release}
+
+%description emulator32
+This package provides SWAP modules for Emulator x86
+
+%post emulator32
+ln -s /opt/swap/modules/emulator32 /opt/swap/sdk
+
+%preun emulator32
+rm /opt/swap/sdk
+
+%files emulator32
+%license LICENSE.GPL-2.0+
+/opt/swap/modules/emulator32/
+%endif # BUILD_PACKAGE_EMULATOR32