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