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