packaging: Remove unused packages about TM1/TW3
[platform/kernel/swap-modules.git] / packaging / swap-modules.spec
1 %bcond_with emulator
2
3 Name: swap-modules
4 Version: 3.0
5 Release: 1
6 License: GPL-2.0+
7 Summary: Linux profiler
8 Group: System Environment/Kernel
9 Vendor: Samsung
10 Source: swap-modules-3.0.tar.gz
11 Provides: swap-modules
12
13 %description
14 Kernel modules for SWAP
15
16
17 # Setup build config.
18 #   0 - disable
19 #   1 - enable
20 %define BUILD_PACKAGE_EMULATOR32 1
21
22
23 # Validate build config.
24 #   If current architecture does not support configuration, it disables.
25 %ifnarch %ix86
26  %define BUILD_PACKAGE_EMULATOR32 0
27 %endif
28 %if ! %{with emulator}
29  %define BUILD_PACKAGE_EMULATOR32 0
30 %endif
31
32
33 %prep
34 %setup -q
35
36
37 %build
38 cd modules
39
40 %if %{BUILD_PACKAGE_EMULATOR32}
41  ./build.sh --kernel /usr/src/linux-headers --arch i386 clean
42  ./build.sh --kernel /usr/src/linux-headers --arch i386 compile
43  ./pack.sh /tmp/modules/emulator32
44 %endif
45
46
47 %install
48 mkdir -p %{buildroot}/opt/swap/modules/
49
50 %if %{BUILD_PACKAGE_EMULATOR32}
51  mv /tmp/modules/emulator32 %{buildroot}/opt/swap/modules/
52 %endif
53
54 %if %{BUILD_PACKAGE_EMULATOR32}
55 %package emulator32
56 Summary: SWAP modules for Emulator x86
57 Provides: swap-modules
58 Provides: swap-modules = %{version}-%{release}
59 BuildRequires: emulator-kernel-devel
60
61 %description emulator32
62 This package provides SWAP modules for Emulator x86
63
64 %post emulator32
65 ln -s /opt/swap/modules/emulator32 /opt/swap/sdk
66
67 %preun emulator32
68 rm /opt/swap/sdk
69
70 %files emulator32
71 %license LICENSE.GPL-2.0+
72 /opt/swap/modules/emulator32/
73 %endif # BUILD_PACKAGE_EMULATOR32