]> git.pld-linux.org Git - packages/acpi_call.git/blob - acpi_call.spec
patch to fix build with recent kernels
[packages/acpi_call.git] / acpi_call.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # allow non-distribution kernel
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_with     verbose         # verbose build (V=1)
6
7 %if %{without kernel}
8 %undefine       with_dist_kernel
9 %endif
10
11 %define         rel     0.3
12 %define         pname   acpi_call
13 Summary:        A linux kernel module that enables calls to ACPI methods through /proc/acpi/call
14 Name:           %{pname}%{_alt_kernel}
15 Version:        1.1.0
16 Release:        %{rel}
17 License:        GPL v2
18 Group:          Base/Kernel
19 Source0:        https://github.com/mkottman/acpi_call/archive/v%{version}/%{pname}-%{version}.tar.gz
20 # Source0-md5:  f69d40e130b0e5ed17ce8adb19e6dda1
21 Patch0:         %{pname}-build.patch
22 URL:            https://github.com/mkottman/acpi_call
23 %if %{with kernel}
24 %if %{with dist_kernel}
25 BuildRequires:  kernel%{_alt_kernel}-module-build >= 3:2.6.20.2
26 %endif
27 BuildRequires:  rpmbuild(macros) >= 1.379
28 %endif
29 ExclusiveArch:  %{ix86} %{x8664}
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 A linux kernel module that enables calls to ACPI methods through
34 /proc/acpi/call
35
36 %package -n kernel%{_alt_kernel}-misc-acpi_call
37 Summary:        A linux kernel module that enables calls to ACPI methods through /proc/acpi/call
38 Release:        %{rel}@%{_kernel_ver_str}
39 Group:          Base/Kernel
40 Requires(post,postun):  /sbin/depmod
41 %if %{with dist_kernel}
42 %requires_releq_kernel
43 Requires(postun):       %releq_kernel
44 %endif
45
46 %description -n kernel%{_alt_kernel}-misc-acpi_call
47 A linux kernel module that enables calls to ACPI methods through
48 /proc/acpi/call
49
50 %prep
51 %setup -q
52 %patch0 -p1
53
54 %build
55 %if %{with kernel}
56 %build_kernel_modules -m acpi_call
57 %endif
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 %install_kernel_modules -m acpi_call -d misc
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %post   -n kernel%{_alt_kernel}-misc-acpi_call
67 %depmod %{_kernel_ver}
68
69 %postun -n kernel%{_alt_kernel}-misc-acpi_call
70 %depmod %{_kernel_ver}
71
72 %if %{with kernel}
73 %files -n kernel%{_alt_kernel}-misc-acpi_call
74 %defattr(644,root,root,755)
75 %doc README.md
76 /lib/modules/%{_kernel_ver}/misc/*.ko*
77 %endif
This page took 0.060953 seconds and 4 git commands to generate.