summaryrefslogtreecommitdiff
path: root/packaging/ltrace.spec
blob: 3a2922468a33906ef141b9b1fdb687fd86db2024 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Name:           ltrace
BuildRequires:  binutils-devel
BuildRequires:  dejagnu
BuildRequires:  gcc-c++
BuildRequires:  libelf-devel
Url:            http://ltrace.org/
Summary:        Trace the Library and System Calls a Program Makes
License:        GPL-2.0+
Group:          Development/Tools/Debuggers
Version:        0.5.3
Release:        0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         ltrace-%{version}.tar.bz2
Source2:        baselibs.conf

%description
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.


%prep
%setup -q

%build
export CFLAGS="%{optflags} -W -Wall"
./configure --prefix=/usr \
	    --sysconfdir=/etc \
	    --mandir=%{_mandir} \
%ifarch armv4l
	    --build=arm-tizen-linux
%else
	    --build=%{_target_cpu}-tizen-linux
%endif
make
%if 1
if make check
then
	echo 'no make check errors' > testresults.txt
else
	for file in `find testsuite -name "*.ltrace"`
	do
		echo
		echo $file
		echo
		cat $file
		echo
	done >> testresults.txt
fi
mv testresults.txt %{_target_cpu}-testresults.txt
ln testsuite/testrun.sum testsuite/%{_target_cpu}-testrun.sum
%else
echo no make check > %{_target_cpu}-testresults.txt
echo no make check > testsuite/%{_target_cpu}-testrun.sum
%endif

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

%files
%defattr(-,root,root)
%doc COPYING README ChangeLog %{_target_cpu}-testresults.txt testsuite/%{_target_cpu}-testrun.sum
%{_bindir}/ltrace
%{_mandir}/man1/ltrace.1.gz
%config /etc/ltrace.conf

%changelog