File exmap.spec of Package exmap

#
# spec file for package exmap
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:         exmap
Summary:      Tool to examine real memory usage of processes
Version:      0.11
Release:      1
License:      GPL
Group:        Development/Tools/Other
BuildRequires: gtkmm2-devel gcc-c++ pkg-config boost-devel pcre-devel kernel-source kernel-syms module-init-tools
Requires:     exmap-kmp

Source:       exmap-%version.tar.bz2
Patch1:       compile.patch
Patch2:       renamekdeinit.patch
Patch3:       gcc44.patch
Patch4:       kernel.2.6.30.patch
Patch5:       fix64bit.patch
BuildRoot:    %_tmppath/%name-%version-build
Prefix:       /usr
%suse_kernel_module_package

%description
Exmap is a tool which allows the real memory usage of a collection of
processes to be examined. A linux kernel loadable module is used to
export information to userspace, which is examined by a gtk
application to build a picture of how pages are shared amongst
processes and their shared libraries.

Authors:

--------
John Berthels <jjberthels@gmail.com>

%package -n exmap-kmp
Summary:      Kernel module for Exmap
Group:        Development

%description -n exmap-kmp
Exmap is a tool which allows the real memory usage of a collection of
processes to be examined. A linux kernel loadable module is used to
export information to userspace, which is examined by a gtk
application to build a picture of how pages are shared amongst
processes and their shared libraries.

Authors:

--------
John Berthels <jjberthels@gmail.com>


%prep
%setup
#%patch1 -p1
#%patch2 -p1
%patch3 -p1
#%patch4 -p1
#%patch5 -p1

%build
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
make -C jutil
make gexmap -C src
make exmtool -C src
for flavor in %flavors_to_build; do
    echo "*** flavor: $flavor"
    rm -rf $flavor
    cp -r kernel $flavor
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
	M=$PWD/$flavor
done

%install
install -m 755 -D src/gexmap %buildroot/%_bindir/exmap
install -m 755 -D src/exmtool %buildroot/%_bindir/exmtool
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
	 M=$PWD/$flavor
done

%files
%defattr(-, root, root)
%doc README COPYING
%{_bindir}/exmap
%{_bindir}/exmtool

%changelog
openSUSE Build Service is sponsored by