]>
Commit | Line | Data |
---|---|---|
3d28cc10 SS |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without dist_kernel # allow non-distribution kernel | |
4 | %bcond_without kernel # don't build kernel modules | |
5 | %bcond_without userspace # don't build userspace programs | |
6 | %bcond_with verbose # verbose build (V=1) | |
7 | ||
8 | %if %{without kernel} | |
9 | %undefine with_dist_kernel | |
10 | %endif | |
11 | %if "%{_alt_kernel}" != "%{nil}" | |
12 | %undefine with_userspace | |
13 | %endif | |
14 | %if %{without userspace} | |
15 | # nothing to be placed to debuginfo package | |
16 | %define _enable_debug_packages 0 | |
17 | %endif | |
18 | ||
19 | # | |
20 | # main package. | |
21 | # | |
22 | %define rel 0.3 | |
23 | %define pname acpi_call | |
24 | %define snap 20130705 | |
25 | Summary: A linux kernel module that enables calls to ACPI methods through /proc/acpi/call | |
26 | Name: acpi_call%{_alt_kernel} | |
27 | Version: %{snap} | |
28 | Release: 0.%{snap}.%{rel} | |
29 | License: GPL v2 | |
30 | Group: Base/Kernel | |
31 | # snap from "git clone https://github.com/mkottman/acpi_call.git" | |
32 | Source0: %{name}-%{version}.tar.gz | |
33 | # Source0-md5: f4eb8bb4d4413a5ae65aa7d77f4112c0 | |
34 | URL: https://github.com/mkottman/acpi_call | |
35 | %if %{with kernel} | |
36 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} | |
37 | BuildRequires: rpmbuild(macros) >= 1.379 | |
38 | %endif | |
39 | ExclusiveArch: %{ix86} %{x8664} | |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %description | |
43 | A linux kernel module that enables calls to ACPI methods through | |
44 | /proc/acpi/call | |
45 | ||
46 | %package -n kernel%{_alt_kernel}-misc-acpi_call | |
47 | Summary: A linux kernel module that enables calls to ACPI methods through /proc/acpi/call | |
48 | Release: 0.%{snap}.%{rel}@%{_kernel_ver_str} | |
49 | Group: Base/Kernel | |
50 | Requires(post,postun): /sbin/depmod | |
51 | %if %{with dist_kernel} | |
52 | %requires_releq_kernel | |
53 | Requires(postun): %releq_kernel | |
54 | %endif | |
55 | ||
56 | %description -n kernel%{_alt_kernel}-misc-acpi_call | |
57 | A linux kernel module that enables calls to ACPI methods through | |
58 | /proc/acpi/call | |
59 | ||
60 | %prep | |
61 | %setup -q -n acpi_call | |
62 | ||
63 | %build | |
64 | %if %{with kernel} | |
65 | %build_kernel_modules -m acpi_call | |
66 | %endif | |
67 | ||
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | %install_kernel_modules -m acpi_call -d misc | |
71 | ||
72 | %clean | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %post -n kernel%{_alt_kernel}-misc-acpi_call | |
76 | %depmod %{_kernel_ver} | |
77 | ||
78 | %postun -n kernel%{_alt_kernel}-misc-acpi_call | |
79 | %depmod %{_kernel_ver} | |
80 | ||
81 | %if %{with kernel} | |
82 | %files -n kernel%{_alt_kernel}-misc-acpi_call | |
83 | %defattr(644,root,root,755) | |
84 | %doc README.md | |
85 | /lib/modules/%{_kernel_ver}/misc/*.ko* | |
86 | %endif |