]> git.pld-linux.org Git - packages/exmap.git/blob - exmap.spec
- thizing
[packages/exmap.git] / exmap.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_without  userspace       # don't build userspace programs
6 %bcond_with     verbose         # verbose build (V=1)
7
8 %if %{without kernel}
9 %undefine       with_dist_kernel
10 %endif
11
12 %define         _rel    1
13 Summary:        Determine how much physical memory and swap is used by individual processes
14 Summary(pl.UTF-8):      Narzędzie do analizowania zużycia pamięci fizycznej i wymiany przez poszczególne procesy
15 Name:           exmap
16 Version:        0.10
17 Release:        %{_rel}
18 Epoch:          0
19 License:        GPL v2
20 Group:          Applications/System
21 Source0:        http://www.berthels.co.uk/exmap/download/%{name}-%{version}.tgz
22 # Source0-md5:  b4f87fa02f6a218416b77ad4b9f48d74
23 Patch0:         %{name}-Makefile.patch
24 Patch1:         %{name}-vserver.patch
25 URL:            http://www.berthels.co.uk/exmap/
26 %if %{with kernel}
27 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.14}
28 BuildRequires:  rpmbuild(macros) >= 1.330
29 %endif
30 %if %{with userspace}
31 BuildRequires:  boost-devel
32 BuildRequires:  gtkmm-devel
33 BuildRequires:  libstdc++-devel >= 4.1.1
34 BuildRequires:  pcre-devel
35 %endif
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 Exmap is a tool which allows the real memory usage of a collection of
40 processes to be examined. A linux kernel loadable module is used to
41 export information to userspace, which is examined by a GTK+
42 application to build a picture of how pages are shared amongst
43 processes and their shared libraries.
44
45 %description -l pl.UTF-8
46 Exmap jest narzędziem pozwalającym badać realne użycie pamięci przez
47 zbiór procesów. Moduł kernela jest używany do eksportowania
48 informacji do przestrzeni użytkownika, które są analizowane przez
49 aplikację GTK+ do zobrazowania jak wiele stron jest współdzielonych
50 między procesami i ich bibliotekami dzielonymi.
51
52 # kernel subpackages.
53
54 %package -n kernel%{_alt_kernel}-misc-exmap
55 Summary:        Linux driver for exmap
56 Summary(pl.UTF-8):      Sterownik dla Linuksa do exmap
57 Release:        %{_rel}@%{_kernel_ver_str}
58 Group:          Base/Kernel
59 Requires(post,postun):  /sbin/depmod
60 %if %{with dist_kernel}
61 %requires_releq_kernel
62 Requires(postun):       %releq_kernel
63 %endif
64
65 %description -n kernel%{_alt_kernel}-misc-exmap
66 This is driver for exmap for Linux.
67
68 This package contains Linux module.
69
70 %description -n kernel%{_alt_kernel}-misc-exmap -l pl.UTF-8
71 Sterownik dla Linuksa do exmap.
72
73 Ten pakiet zawiera moduł jądra Linuksa.
74
75 %prep
76 %setup -q
77 %patch0 -p1
78 %patch1 -p1
79 # remove binaries packed in src tarball
80 rm -f src/{*.so,munged-ls-threeloads,prelinked-amule}
81
82 # prepare makefile:
83 cat > kernel/Makefile << EOF
84 obj-m += exmap.o
85 CFLAGS += -DCONFIG_exmap_SOME_OPTION=1
86 %{?debug:CFLAGS += -DCONFIG_exmap_DEBUG=1}
87 EOF
88
89 %build
90 %if %{with userspace}
91 %{__make} \
92         CXX="%{__cxx}" CXXFLAGS="%{rpmcxxflags}" CFLAGS="%{rpmcflags}"
93
94 %endif
95
96 %if %{with kernel}
97 %build_kernel_modules -C kernel -m exmap
98 %endif
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with userspace}
104 install -d $RPM_BUILD_ROOT%{_bindir}
105 install src/gexmap $RPM_BUILD_ROOT%{_bindir}
106 %endif
107
108 %if %{with kernel}
109 %install_kernel_modules -m kernel/exmap -d misc
110
111 # to avoid conflict with in-kernel modules, and prepare modprobe config:
112 #%%install_kernel_modules -s current -n NAME -m exmap -d misc
113 %endif
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %post   -n kernel%{_alt_kernel}-misc-exmap
119 %depmod %{_kernel_ver}
120
121 %postun -n kernel%{_alt_kernel}-misc-exmap
122 %depmod %{_kernel_ver}
123
124 %if %{with kernel}
125 %files -n kernel%{_alt_kernel}-misc-exmap
126 %defattr(644,root,root,755)
127 /lib/modules/%{_kernel_ver}/misc/*.ko*
128 %endif
129
130
131 %if %{with userspace}
132 %files
133 %defattr(644,root,root,755)
134 %doc README TODO
135 %attr(755,root,root) %{_bindir}/*
136 %endif
This page took 0.101362 seconds and 3 git commands to generate.