summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-13 07:28:55 -0800
committerChanho Park <chanho61.park@samsung.com>2014-08-22 20:38:27 +0900
commit6289195a55f0a20991003dde415f75172735e021 (patch)
tree33f2f9e3544cbb9519eaf277042cd78d34b80df0
parent8251496f4b0efb1e84508e3c2f251281dd67be54 (diff)
downloadltrace-6289195a55f0a20991003dde415f75172735e021.tar.gz
ltrace-6289195a55f0a20991003dde415f75172735e021.tar.bz2
ltrace-6289195a55f0a20991003dde415f75172735e021.zip
add packaging
-rw-r--r--packaging/baselibs.conf2
-rw-r--r--packaging/ltrace.demangle-lib.cstdlib.patch12
-rw-r--r--packaging/ltrace.spec111
3 files changed, 125 insertions, 0 deletions
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
new file mode 100644
index 0000000..7422443
--- /dev/null
+++ b/packaging/baselibs.conf
@@ -0,0 +1,2 @@
+ltrace
+ +/usr/bin/ltrace -> /usr/bin/ltrace<extension>
diff --git a/packaging/ltrace.demangle-lib.cstdlib.patch b/packaging/ltrace.demangle-lib.cstdlib.patch
new file mode 100644
index 0000000..f000eff
--- /dev/null
+++ b/packaging/ltrace.demangle-lib.cstdlib.patch
@@ -0,0 +1,12 @@
+---
+ testsuite/ltrace.minor/demangle-lib.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/testsuite/ltrace.minor/demangle-lib.cpp
++++ b/testsuite/ltrace.minor/demangle-lib.cpp
+@@ -1,4 +1,5 @@
+ #include<stddef.h>
++#include<cstdlib>
+ #include<iostream>
+
+ #include"demangle.h"
diff --git a/packaging/ltrace.spec b/packaging/ltrace.spec
new file mode 100644
index 0000000..6afc204
--- /dev/null
+++ b/packaging/ltrace.spec
@@ -0,0 +1,111 @@
+#
+# spec file for package ltrace
+#
+# Copyright (c) 2012 SUSE LINUX Products 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 http://bugs.opensuse.org/
+#
+
+
+Name: ltrace
+BuildRequires: binutils-devel
+BuildRequires: dejagnu
+BuildRequires: gcc-c++
+BuildRequires: libelf-devel
+Url: http://ltrace.org/
+# bug437293
+%ifarch ppc64
+Obsoletes: ltrace-64bit
+%endif
+#
+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
+ExclusiveArch: %ix86 s390 s390x ppc ppc64 armv4l x86_64 alpha ia64
+Prefix: /usr
+Source: ltrace-%{version}.tar.bz2
+Source2: baselibs.conf
+Patch1: ltrace.s390-more-arguments.patch
+Patch2: ltrace.demangle-lib.cstdlib.patch
+Patch3: ltrace.ppc.patch
+
+%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.
+
+
+
+Authors:
+--------
+ Juan Cespedes
+
+%prep
+%setup -q
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+%build
+export CFLAGS="%{optflags} -W -Wall"
+./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=%{_mandir} \
+%ifarch armv4l
+ --build=arm-suse-linux
+%else
+ --build=%{_target_cpu}-suse-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