makedumpfile/makedumpfile.spec

104 lines
2.9 KiB
RPMSpec

#
# spec file for package makedumpfile (Version 1.1.0)
#
# Copyright (c) 2007 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/
#
# norootforbuild
Name: makedumpfile
BuildRequires: gcc-c++
%define elfutils_version 0.124
License: GNU General Public License (GPL)
Version: 1.1.0
Release: 1
Summary: Partial kernel dump
Group: System/Kernel
URL: https://sourceforge.net/projects/makedumpfile/
Source: makedumpfile-%{version}.tar.bz2
Source1: elfutils-%{elfutils_version}-no-osl.tar.bz2
Source2: README
Patch: makedumpfile-static-elfutils.diff
Patch1: makedumpfile-coptflags.diff
Patch2: elfutils-portability.patch
Patch3: elfutils-0.124-compile-fix.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
makedumpfile is a dump program to shorten the size of dump file. It
copies only the necessary pages for analysis with various dump levels,
and can compress the page data. The obtained dump file can by analyzed
via gdb or crash utility.
Authors:
--------
NEC Corporation
%prep
%setup -n makedumpfile -q -a1
%patch
%patch1
cp %{SOURCE2} .
cd elfutils-%{elfutils_version}
ls -l backends
if [ `wc -l < "backends/sparc_retval.c"` -gt 2 ]; then
echo "backends/sparc_retval.c is not distributable for legal reasons."
echo "Please replace it with a dummy implementation in your elfutils package:"
echo "echo -e '#include <stdlib.h>\nint sparc_return_value_location () { abort(); return 0; }' > backends/sparc_retval.c"
exit 1
fi
%patch2 -p1
%patch3
autoreconf -fi
cd ..
%build
MKDUMP_ROOT=`pwd`/installed
cd elfutils-%{elfutils_version}
CFLAGS="$RPM_OPT_FLAGS" \
./configure --prefix=/usr
make
make install DESTDIR=$MKDUMP_ROOT
rm -f $MKDUMP_ROOT/usr/lib/*.so*
cd ..
make COPTFLAGS="$RPM_OPT_FLAGS"
%install
mkdir -p $RPM_BUILD_ROOT/bin
install -c -m 0755 makedumpfile $RPM_BUILD_ROOT/bin
install -c -m 0755 makedumpfile-R.pl $RPM_BUILD_ROOT/bin
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README
%doc elfutils-*/COPYING
/bin/*
%changelog -n makedumpfile
* Mon Feb 05 2007 - tiwai@suse.de
- updated to version 1.1.0:
* support SSH transfer
* Thu Jan 18 2007 - tiwai@suse.de
- updated to version 1.0.9:
* fix the calculation of page size.
* Tue Jan 09 2007 - tiwai@suse.de
- remove codes with problematic license from elfutils-0.124
(#232894)
* Tue Jan 09 2007 - tiwai@suse.de
- added COPYING file (from elfutils)
- fixed optimization flags to use $RPM_OPT_FLAGS
- fix a minor compile error with C99 standard.
* Mon Jan 08 2007 - tiwai@suse.de
- initial version: 1.0.8
- build statically with elfutils-1.2.4 since elfutils conflicts
with the existing libelf.