File ltrace.spec of Package ltrace

# spec file for package ltrace
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# 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.

# Please submit bugfixes or comments via

Name:           ltrace
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  binutils-devel
BuildRequires:  dejagnu
BuildRequires:  gcc-c++
BuildRequires:  libdw-devel
BuildRequires:  libelf-devel
BuildRequires:  libtool
# bug437293
%ifarch ppc64
Obsoletes:      ltrace-64bit
Summary:        Trace the Library and System Calls a Program Makes
License:        GPL-2.0+
Group:          Development/Tools/Debuggers
Version:        0.7.91
Release:        0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 s390 s390x ppc ppc64 ppc64le %arm x86_64 alpha ia64 m68k aarch64
Prefix:         /usr
%define git_id g6c6bcc3
Source:         ltrace-%{version}-%{git_id}.tar.bz2
Source2:        baselibs.conf

Ltrace is a program that runs the specified command until it exits. It
intercepts and records the dynamic library calls that are called by the
executed process and the signals that are received by that process. It
can also intercept and print the system calls executed by the program.

The program to trace need not be recompiled for this, so you can use
ltrace on binaries for which you do not have access to the source.

This is still a work in progress, so, for example, the tracking to
child processes may fail or some things may not work as expected.

%setup -q

export CFLAGS="%{optflags} -Wall -Wno-unused-local-typedefs"
%configure --disable-shared
make %{?_smp_mflags}
%if 1
if make check
	echo 'no make check errors' > testresults.txt
	for file in `find testsuite -name "*.ltrace"`
		echo $file
		cat $file
	done >> testresults.txt
mv testresults.txt %{_target_cpu}-testresults.txt
ln testsuite/testrun.sum testsuite/%{_target_cpu}-testrun.sum
echo no make check > %{_target_cpu}-testresults.txt
echo no make check > testsuite/%{_target_cpu}-testrun.sum

make install DESTDIR=%{buildroot}
rm -rf %{buildroot}/usr/share/doc/ltrace

%doc COPYING README %{_target_cpu}-testresults.txt testsuite/%{_target_cpu}-testrun.sum

openSUSE Build Service is sponsored by