2007-02-05 15:40:30 +01:00
|
|
|
#
|
2011-11-02 23:55:52 +01:00
|
|
|
# spec file for package makedumpfile
|
2007-02-05 15:40:30 +01:00
|
|
|
#
|
2014-02-17 20:12:02 +01:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-02-05 15:40:30 +01:00
|
|
|
#
|
2008-08-16 01:01:39 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-02-05 15:40:30 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-03-28 16:58:26 +01:00
|
|
|
|
2014-03-21 11:38:26 +01:00
|
|
|
%if 0%{!?have_snappy:1}
|
|
|
|
%if 0%{?suse_version} >= 1310
|
|
|
|
%define have_snappy 1
|
|
|
|
%else
|
|
|
|
%define have_snappy 0
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2007-02-05 15:40:30 +01:00
|
|
|
Name: makedumpfile
|
2012-06-18 19:10:04 +02:00
|
|
|
BuildRequires: libdw-devel
|
|
|
|
BuildRequires: libebl-devel
|
|
|
|
BuildRequires: libelf-devel
|
|
|
|
BuildRequires: zlib-devel
|
2011-11-02 23:55:52 +01:00
|
|
|
%if 0%{?suse_version} >= 1140 || 0%{?sles_version} >= 11
|
2012-06-18 19:10:04 +02:00
|
|
|
BuildRequires: libbz2-devel
|
2012-12-07 16:47:19 +01:00
|
|
|
%else
|
|
|
|
BuildRequires: bzip2
|
2008-11-17 17:22:43 +01:00
|
|
|
%endif
|
2012-06-18 19:10:04 +02:00
|
|
|
BuildRequires: lzo-devel
|
2014-03-21 11:38:26 +01:00
|
|
|
%if %{have_snappy}
|
|
|
|
BuildRequires: snappy-devel
|
|
|
|
%endif
|
|
|
|
BuildRequires: xz-devel
|
2014-02-17 20:12:02 +01:00
|
|
|
Version: 1.5.5
|
2012-06-18 19:10:04 +02:00
|
|
|
Release: 0
|
2007-02-05 15:40:30 +01:00
|
|
|
Summary: Partial kernel dump
|
2012-06-18 19:10:04 +02:00
|
|
|
License: GPL-2.0
|
2007-02-05 15:40:30 +01:00
|
|
|
Group: System/Kernel
|
2007-10-10 11:33:02 +02:00
|
|
|
Url: https://sourceforge.net/projects/makedumpfile/
|
2008-11-17 17:22:43 +01:00
|
|
|
Source: %{name}-%{version}.tar.bz2
|
2011-11-09 18:36:07 +01:00
|
|
|
Source1: README.static
|
2008-11-17 17:22:43 +01:00
|
|
|
Patch0: %{name}-coptflags.diff
|
2014-02-25 17:03:52 +01:00
|
|
|
Patch1: %{name}-fix-sprintf-append.patch
|
|
|
|
Patch2: %{name}-kernel-3.12-supported.patch
|
2007-02-05 15:40:30 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2013-12-11 10:04:02 +01:00
|
|
|
ExclusiveArch: %ix86 x86_64 ia64 ppc ppc64 ppc64le s390x %arm
|
2007-02-05 15:40:30 +01:00
|
|
|
|
|
|
|
%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
|
2008-09-09 22:14:10 +02:00
|
|
|
%setup -q
|
2009-08-05 00:04:05 +02:00
|
|
|
%patch0 -p1
|
2014-02-25 17:03:52 +01:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
2007-02-05 15:40:30 +01:00
|
|
|
|
|
|
|
%build
|
2011-11-02 23:55:52 +01:00
|
|
|
LIBS_STATIC=
|
|
|
|
LIBS_DYNAMIC=
|
|
|
|
if nm -u -f posix %{_libdir}/libdw.a | grep '^BZ2_bzDecompress U'; then
|
|
|
|
if [ -e %{_libdir}/libbz2.a ]; then
|
|
|
|
LIBS_STATIC="$LIBS_STATIC -lbz2"
|
|
|
|
else
|
|
|
|
LIBS_DYNAMIC="$LIBS_DYNAMIC -lbz2"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if nm -u -f posix %{_libdir}/libdw.a | grep '^lzma_code U'; then
|
|
|
|
if [ -e %{_libdir}/liblzma.a ]; then
|
|
|
|
LIBS_STATIC="$LIBS_STATIC -llzma"
|
|
|
|
else
|
|
|
|
LIBS_DYNAMIC="$LIBS_DYNAMIC -llzma"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
export LIBS_STATIC LIBS_DYNAMIC
|
2014-03-21 11:38:26 +01:00
|
|
|
%if %{have_snappy}
|
|
|
|
export USESNAPPY=on
|
|
|
|
%endif
|
2012-06-18 19:10:04 +02:00
|
|
|
make COPTFLAGS="$RPM_OPT_FLAGS" USELZO=on
|
2007-02-05 15:40:30 +01:00
|
|
|
|
|
|
|
%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
|
2007-03-11 00:02:29 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
|
2012-10-26 10:52:56 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5
|
2007-03-11 00:02:29 +01:00
|
|
|
install -c -m 0644 makedumpfile.8 $RPM_BUILD_ROOT%{_mandir}/man8
|
2012-10-26 10:52:56 +02:00
|
|
|
install -c -m 0644 makedumpfile.conf.5 $RPM_BUILD_ROOT%{_mandir}/man5
|
2007-02-05 15:40:30 +01:00
|
|
|
|
|
|
|
%clean
|
2009-08-05 00:04:05 +02:00
|
|
|
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
2007-02-05 15:40:30 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2008-08-16 01:01:39 +02:00
|
|
|
%doc README COPYING IMPLEMENTATION
|
2007-03-11 00:02:29 +01:00
|
|
|
%doc %{_mandir}/man?/*
|
2007-02-05 15:40:30 +01:00
|
|
|
/bin/*
|
2007-11-29 18:24:38 +01:00
|
|
|
|
2007-03-11 00:02:29 +01:00
|
|
|
%changelog
|