mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
development/ltrace: Added (library call trace utility).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
62b476dae6
commit
3279ab2b70
5 changed files with 144 additions and 0 deletions
5
development/ltrace/README
Normal file
5
development/ltrace/README
Normal file
|
@ -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.
|
11
development/ltrace/doinst.sh
Normal file
11
development/ltrace/doinst.sh
Normal file
|
@ -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
|
97
development/ltrace/ltrace.SlackBuild
Normal file
97
development/ltrace/ltrace.SlackBuild
Normal file
|
@ -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}
|
12
development/ltrace/ltrace.info
Normal file
12
development/ltrace/ltrace.info
Normal file
|
@ -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"
|
19
development/ltrace/slack-desc
Normal file
19
development/ltrace/slack-desc
Normal file
|
@ -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:
|
Loading…
Reference in a new issue