]> git.pld-linux.org Git - packages/acpi_call.git/blob - acpi_call.spec
trying to avoid distifile error: "undefined macro _alt_kernel"
[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 #
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"
24 Source0:        http://sls.warszawa.pl/%{name}-%{version}.tar.gz
25 # Source0-md5:  f4eb8bb4d4413a5ae65aa7d77f4112c0
26 URL:            https://github.com/mkottman/acpi_call
27 %if %{with kernel}
28 %if %{with dist_kernel}
29 BuildRequires:  kernel%{_alt_kernel}-module-build >= 3:2.6.20.2
30 %endif
31 BuildRequires:  rpmbuild(macros) >= 1.379
32 %endif
33 ExclusiveArch:  %{ix86} %{x8664}
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 A linux kernel module that enables calls to ACPI methods through
38 /proc/acpi/call
39
40 %package -n kernel%{_alt_kernel}-misc-acpi_call
41 Summary:        A linux kernel module that enables calls to ACPI methods through /proc/acpi/call
42 Release:        0.%{snap}.%{rel}@%{_kernel_ver_str}
43 Group:          Base/Kernel
44 Requires(post,postun):  /sbin/depmod
45 %if %{with dist_kernel}
46 %requires_releq_kernel
47 Requires(postun):       %releq_kernel
48 %endif
49
50 %description -n kernel%{_alt_kernel}-misc-acpi_call
51 A linux kernel module that enables calls to ACPI methods through
52 /proc/acpi/call
53
54 %prep
55 %setup -q -n acpi_call
56
57 %build
58 %if %{with kernel}
59 %build_kernel_modules -m acpi_call
60 %endif
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64 %install_kernel_modules -m acpi_call -d misc
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %post   -n kernel%{_alt_kernel}-misc-acpi_call
70 %depmod %{_kernel_ver}
71
72 %postun -n kernel%{_alt_kernel}-misc-acpi_call
73 %depmod %{_kernel_ver}
74
75 %if %{with kernel}
76 %files -n kernel%{_alt_kernel}-misc-acpi_call
77 %defattr(644,root,root,755)
78 %doc README.md
79 /lib/modules/%{_kernel_ver}/misc/*.ko*
80 %endif
This page took 0.070972 seconds and 3 git commands to generate.