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)
9 %undefine with_dist_kernel
11 %if "%{_alt_kernel}" != "%{nil}"
12 %undefine with_userspace
14 %if %{without userspace}
15 # nothing to be placed to debuginfo package
16 %define _enable_debug_packages 0
23 %define pname acpi_call
25 Summary: A linux kernel module that enables calls to ACPI methods through /proc/acpi/call
26 Name: acpi_call%{_alt_kernel}
28 Release: 0.%{snap}.%{rel}
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
36 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
37 BuildRequires: rpmbuild(macros) >= 1.379
39 ExclusiveArch: %{ix86} %{x8664}
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 A linux kernel module that enables calls to ACPI methods through
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}
50 Requires(post,postun): /sbin/depmod
51 %if %{with dist_kernel}
52 %requires_releq_kernel
53 Requires(postun): %releq_kernel
56 %description -n kernel%{_alt_kernel}-misc-acpi_call
57 A linux kernel module that enables calls to ACPI methods through
61 %setup -q -n acpi_call
65 %build_kernel_modules -m acpi_call
69 rm -rf $RPM_BUILD_ROOT
70 %install_kernel_modules -m acpi_call -d misc
73 rm -rf $RPM_BUILD_ROOT
75 %post -n kernel%{_alt_kernel}-misc-acpi_call
76 %depmod %{_kernel_ver}
78 %postun -n kernel%{_alt_kernel}-misc-acpi_call
79 %depmod %{_kernel_ver}
82 %files -n kernel%{_alt_kernel}-misc-acpi_call
83 %defattr(644,root,root,755)
85 /lib/modules/%{_kernel_ver}/misc/*.ko*