clean up spec
[platform/upstream/ltrace.git] / packaging / ltrace.spec
1 Name:           ltrace
2 BuildRequires:  binutils-devel
3 BuildRequires:  dejagnu
4 BuildRequires:  gcc-c++
5 BuildRequires:  libelf-devel
6 Url:            http://ltrace.org/
7 Summary:        Trace the Library and System Calls a Program Makes
8 License:        GPL-2.0+
9 Group:          Development/Tools/Debuggers
10 Version:        0.5.3
11 Release:        0
12 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
13 Source:         ltrace-%{version}.tar.bz2
14 Source2:        baselibs.conf
15
16 %description
17 Ltrace is a program that runs the specified command until it exits. It
18 intercepts and records the dynamic library calls that are called by the
19 executed process and the signals that are received by that process. It
20 can also intercept and print the system calls executed by the program.
21
22 The program to trace need not be recompiled for this, so you can use
23 ltrace on binaries for which you do not have access to the source.
24
25 This is still a work in progress, so, for example, the tracking to
26 child processes may fail or some things may not work as expected.
27
28
29 %prep
30 %setup -q
31
32 %build
33 export CFLAGS="%{optflags} -W -Wall"
34 ./configure --prefix=/usr \
35             --sysconfdir=/etc \
36             --mandir=%{_mandir} \
37 %ifarch armv4l
38             --build=arm-tizen-linux
39 %else
40             --build=%{_target_cpu}-tizen-linux
41 %endif
42 make
43 %if 1
44 if make check
45 then
46         echo 'no make check errors' > testresults.txt
47 else
48         for file in `find testsuite -name "*.ltrace"`
49         do
50                 echo
51                 echo $file
52                 echo
53                 cat $file
54                 echo
55         done >> testresults.txt
56 fi
57 mv testresults.txt %{_target_cpu}-testresults.txt
58 ln testsuite/testrun.sum testsuite/%{_target_cpu}-testrun.sum
59 %else
60 echo no make check > %{_target_cpu}-testresults.txt
61 echo no make check > testsuite/%{_target_cpu}-testrun.sum
62 %endif
63
64 %install
65 make install DESTDIR=%{buildroot}
66 rm -rf %{buildroot}/usr/share/doc/ltrace
67
68 %files
69 %defattr(-,root,root)
70 %doc COPYING README ChangeLog %{_target_cpu}-testresults.txt testsuite/%{_target_cpu}-testrun.sum
71 %{_bindir}/ltrace
72 %{_mandir}/man1/ltrace.1.gz
73 %config /etc/ltrace.conf
74
75 %changelog