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