]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without sysfs # sysfs support | |
4 | %bcond_without procfs # procfs support | |
5 | # | |
6 | Summary: Scales your CPU frequency | |
7 | Summary(pl.UTF-8): Skalowanie częstotliwości procesora | |
8 | Name: cpufrequtils | |
9 | Version: 002 | |
10 | Release: 2 | |
11 | Epoch: 1 | |
12 | License: GPL v2 | |
13 | Group: Applications/System | |
14 | Source0: http://www.kernel.org/pub/linux/utils/kernel/cpufreq/%{name}-%{version}.tar.bz2 | |
15 | # Source0-md5: 93291a0d705ee2e19a6d7491b223c9f2 | |
16 | Patch0: %{name}-libtool.patch | |
17 | URL: http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html | |
18 | BuildRequires: libtool | |
19 | %{?with_sysfs:BuildRequires: sysfsutils-devel >= 1.3.0-3} | |
20 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | Scales your CPU frequency. | |
25 | ||
26 | %description -l pl.UTF-8 | |
27 | Skalowanie częstotliwości procesora. | |
28 | ||
29 | %package libs | |
30 | Summary: cpufrequtils library | |
31 | Summary(pl.UTF-8): Biblioteka skalująca częstotliwość procesora | |
32 | Group: Libraries | |
33 | ||
34 | %description libs | |
35 | cpufrequtils library. | |
36 | ||
37 | %description libs -l pl.UTF-8 | |
38 | Biblioteka skalująca częstotliwość procesora. | |
39 | ||
40 | %package devel | |
41 | Summary: Header file for libcpufreq library | |
42 | Summary(pl.UTF-8): Plik nagłówkowy biblioteki libcpufreq | |
43 | Group: Development/Libraries | |
44 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} | |
45 | %{?with_sysfs:Requires: sysfsutils-devel >= 1.3.0-3} | |
46 | ||
47 | %description devel | |
48 | Header file for libcpufreq library. | |
49 | ||
50 | %description devel -l pl.UTF-8 | |
51 | Plik nagłówkowy biblioteki libcpufreq. | |
52 | ||
53 | %package static | |
54 | Summary: Static libcpufreq library | |
55 | Summary(pl.UTF-8): Statyczna biblioteka libcpufreq | |
56 | Group: Development/Libraries | |
57 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
58 | ||
59 | %description static | |
60 | Static libcpufreq library. | |
61 | ||
62 | %description static -l pl.UTF-8 | |
63 | Statyczna biblioteka libcpufreq. | |
64 | ||
65 | %prep | |
66 | %setup -q | |
67 | %patch0 -p1 | |
68 | ||
69 | %build | |
70 | %{__make} \ | |
71 | CC="%{__cc}" \ | |
72 | OPTIMIZATION="%{rpmcflags}" \ | |
73 | V=true \ | |
74 | %{!?with_sysfs:SYSFS=false} \ | |
75 | %{!?with_procfs:PROC=false} | |
76 | ||
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %{__make} install \ | |
81 | DESTDIR=$RPM_BUILD_ROOT \ | |
82 | libdir=%{_libdir} \ | |
83 | mandir=%{_mandir} | |
84 | ||
85 | %find_lang %{name} | |
86 | ||
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %post libs -p /sbin/ldconfig | |
91 | %postun libs -p /sbin/ldconfig | |
92 | ||
93 | %files -f %{name}.lang | |
94 | %defattr(644,root,root,755) | |
95 | %doc AUTHORS README | |
96 | %attr(755,root,root) %{_bindir}/cpufreq-* | |
97 | %{_mandir}/man1/cpufreq-*.1* | |
98 | ||
99 | %files libs | |
100 | %defattr(644,root,root,755) | |
101 | %attr(755,root,root) %{_libdir}/libcpufreq.so.*.*.* | |
102 | ||
103 | %files devel | |
104 | %defattr(644,root,root,755) | |
105 | %attr(755,root,root) %{_libdir}/libcpufreq.so | |
106 | %{_libdir}/libcpufreq.la | |
107 | %{_includedir}/cpufreq.h | |
108 | ||
109 | %files static | |
110 | %defattr(644,root,root,755) | |
111 | %{_libdir}/libcpufreq.a |