]>
Commit | Line | Data |
---|---|---|
b0b4c66b AM |
1 | # Conditional build: |
2 | %bcond_without dist_kernel # without distribution kernel | |
3 | %bcond_without kernel # don't build kernel modules | |
4 | %bcond_without userspace # don't build userspace tools | |
5 | # | |
66e95fb5 | 6 | %define rel 2 |
b0b4c66b AM |
7 | Summary: Sampling CPU profiler for Linux |
8 | Name: sysprof | |
260d1a8f | 9 | Version: 1.0.12 |
b0b4c66b AM |
10 | Release: %{rel} |
11 | License: GPL v2 | |
12 | Group: Applications/System | |
13 | Source0: http://www.daimi.au.dk/~sandmann/sysprof/%{name}-%{version}.tar.gz | |
260d1a8f | 14 | # Source0-md5: 9566040f3175678e75133b1c52a473f8 |
b0b4c66b AM |
15 | URL: http://www.daimi.au.dk/~sandmann/sysprof/ |
16 | BuildRequires: binutils-devel | |
17 | BuildRequires: gtk+2-devel | |
18 | BuildRequires: rpmbuild(macros) >= 1.217 | |
19 | Requires: uname(release) >= 2.6 | |
20 | Conflicts: kernel < 2.6 | |
66e95fb5 | 21 | ExclusiveArch: %{ix86} %{x8664} |
b0b4c66b AM |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %description | |
25 | Sysprof is a sampling CPU profiler for Linux that uses a kernel module | |
26 | to profile the entire system, not just a single application. Sysprof | |
27 | handles shared libraries and applications do not need to be | |
28 | recompiled. In fact they don't even have to be restarted. | |
29 | ||
30 | Just insert the kernel module and start sysprof. | |
31 | ||
32 | %package -n kernel%{_alt_kernel}-sysprof | |
33 | Summary: sysprof kernel driver | |
34 | Release: %{rel}@%{_kernel_ver_str} | |
35 | Group: Base/Kernel | |
36 | Requires(post,postun): /sbin/depmod | |
37 | %if %{with dist_kernel} | |
38 | %requires_releq_kernel | |
39 | Requires(postun): %releq_kernel | |
40 | %endif | |
41 | ||
42 | %description -n kernel%{_alt_kernel}-sysprof | |
43 | sysprof Linux kernel driver. | |
44 | ||
45 | %prep | |
46 | %setup -q | |
47 | ||
48 | %build | |
49 | %configure \ | |
50 | --disable-kernel-module | |
51 | %if %{with userspace} | |
52 | %{__make} | |
53 | %endif | |
54 | ||
55 | %if %{with kernel} | |
56 | cd module | |
57 | %build_kernel_modules SUBDIRS=$PWD -m sysprof-module | |
58 | %endif | |
59 | ||
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %if %{with userspace} | |
64 | %{__make} install \ | |
65 | DESTDIR=$RPM_BUILD_ROOT | |
66 | %endif | |
67 | ||
68 | %if %{with kernel} | |
69 | cd module | |
70 | %install_kernel_modules -m sysprof-module -d misc | |
71 | %endif | |
72 | ||
73 | %clean | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
f8073522 ŁK |
76 | %post -n kernel%{_alt_kernel}-sysprof |
77 | %depmod %{_kernel_ver} | |
78 | ||
79 | %postun -n kernel%{_alt_kernel}-sysprof | |
80 | %depmod %{_kernel_ver} | |
81 | ||
b0b4c66b AM |
82 | %if %{with userspace} |
83 | %files | |
84 | %defattr(644,root,root,755) | |
85 | %doc AUTHORS ChangeLog README TODO | |
86 | %attr(755,root,root) %{_bindir}/* | |
87 | %{_pixmapsdir}/*.png | |
88 | %{_datadir}/%{name} | |
89 | %endif | |
90 | ||
91 | %if %{with kernel} | |
92 | %files -n kernel%{_alt_kernel}-sysprof | |
93 | %defattr(644,root,root,755) | |
94 | /lib/modules/%{_kernel_ver}/misc/*.ko* | |
95 | %endif |