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