summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2014-12-21 09:44:11 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-12-21 09:44:11 +0700
commit3279ab2b7019f7a6fef52acab4fc6fffcc73e3fe (patch)
tree1c9414fa4a18181c647ac220731abfd8d5451c55
parent62b476dae607d3537201615b9f3f370fd8447384 (diff)
downloadslackbuilds-3279ab2b7019f7a6fef52acab4fc6fffcc73e3fe.tar.gz
development/ltrace: Added (library call trace utility).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--development/ltrace/README5
-rw-r--r--development/ltrace/doinst.sh11
-rw-r--r--development/ltrace/ltrace.SlackBuild97
-rw-r--r--development/ltrace/ltrace.info12
-rw-r--r--development/ltrace/slack-desc19
5 files changed, 144 insertions, 0 deletions
diff --git a/development/ltrace/README b/development/ltrace/README
new file mode 100644
index 0000000000..f6465f381c
--- /dev/null
+++ b/development/ltrace/README
@@ -0,0 +1,5 @@
+ltrace (library call trace utility)
+
+ltrace intercepts and records dynamic library calls which are called
+by an executed process and the signals received by that process. It can
+also intercept and print the system calls executed by the program.
diff --git a/development/ltrace/doinst.sh b/development/ltrace/doinst.sh
new file mode 100644
index 0000000000..8ae1b913ce
--- /dev/null
+++ b/development/ltrace/doinst.sh
@@ -0,0 +1,11 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+config etc/ltrace.conf.new
diff --git a/development/ltrace/ltrace.SlackBuild b/development/ltrace/ltrace.SlackBuild
new file mode 100644
index 0000000000..5210240181
--- /dev/null
+++ b/development/ltrace/ltrace.SlackBuild
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+# Slackware build script for ltrace
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=ltrace
+VERSION=${VERSION:-0.7.3_4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+# VERSION is upstream's plus Debian's (since we use their patchset)
+SRCVER=$( echo $VERSION | cut -d_ -f1 )
+DEBVER=$( echo $VERSION | cut -d_ -f2 )
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/${PRGNAM}_$SRCVER.orig.tar.bz2
+cd $PRGNAM-$SRCVER
+tar xvf $CWD/${PRGNAM}_$SRCVER-$DEBVER.debian.tar.gz debian/patches
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# apply Debian's patches, which fix a few bugs.
+for i in $( cat debian/patches/series ); do
+ patch -p1 < debian/patches/$i
+done
+
+# Slackware's gelf.h lives in /usr/include/libelf. Normally not a problem,
+# but ltrace is old enough that it doesn't use pkg-config.
+SLKCFLAGS="$SLKCFLAGS -I/usr/include/libelf"
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install-strip DESTDIR=$PKG
+
+gzip $PKG/usr/man/man?/*
+mv $PKG/etc/$PRGNAM.conf $PKG/etc/$PRGNAM.conf.new
+
+# docs already installed in right place, we don't need this one:
+rm -f $PKG/usr/doc/$PRGNAM-$VERSION/INSTALL
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/ltrace/ltrace.info b/development/ltrace/ltrace.info
new file mode 100644
index 0000000000..8a019b28a1
--- /dev/null
+++ b/development/ltrace/ltrace.info
@@ -0,0 +1,12 @@
+PRGNAM="ltrace"
+VERSION="0.7.3_4"
+HOMEPAGE="http://ltrace.org/"
+DOWNLOAD="http://ltrace.org/ltrace_0.7.3.orig.tar.bz2 \
+ http://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.7.3-4.debian.tar.gz"
+MD5SUM="b3dd199af8f18637f7d4ef97fdfb9d14 \
+ ad5dde61fa4eabf4d774cf519cd743a7"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/development/ltrace/slack-desc b/development/ltrace/slack-desc
new file mode 100644
index 0000000000..341bd66418
--- /dev/null
+++ b/development/ltrace/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+ltrace: ltrace (library call trace utility)
+ltrace:
+ltrace: ltrace intercepts and records dynamic library calls which are called
+ltrace: by an executed process and the signals received by that process. It
+ltrace: can also intercept and print the system calls executed by the program.
+ltrace:
+ltrace:
+ltrace:
+ltrace:
+ltrace:
+ltrace: