summaryrefslogtreecommitdiff
path: root/system/scanmem/scanmem.SlackBuild
diff options
context:
space:
mode:
authorchinarulezzz <s.alex08@mail.ru>2012-06-25 22:22:31 -0400
committerdsomero <xgizzmo@slackbuilds.org>2012-06-25 22:22:31 -0400
commitd085a14879b0b272a2fffa28856e52f1e1ed7043 (patch)
treee9bd9d83ea8ee1c8d9ea995809af7c4ed4980ed3 /system/scanmem/scanmem.SlackBuild
parentc009cbedc10aff9b73b2e1a1099ef5e78bb4c8c6 (diff)
downloadslackbuilds-d085a14879b0b272a2fffa28856e52f1e1ed7043.tar.gz
system/scanmem: Added (simple interactive debugging utility)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'system/scanmem/scanmem.SlackBuild')
-rw-r--r--system/scanmem/scanmem.SlackBuild91
1 files changed, 91 insertions, 0 deletions
diff --git a/system/scanmem/scanmem.SlackBuild b/system/scanmem/scanmem.SlackBuild
new file mode 100644
index 0000000000..f1aa9183f5
--- /dev/null
+++ b/system/scanmem/scanmem.SlackBuild
@@ -0,0 +1,91 @@
+#!/bin/sh
+
+# Slackware build script scanmem
+# written by chinarulezzz s.alex08@mail.ru
+
+
+PRGNAM=scanmem
+VERSION=${VERSION:-0.12}
+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
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+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 OS_CFLAGS="$SLKCFLAGS"
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+# move any generated man pages to their proper location
+#if [ -d $PKG/usr/share/man ]; then
+# mv $PKG/usr/share/man $PKG/usr
+# gzip -9 $PKG/usr/man/man?/*.?
+#fi
+
+# Add docs, and if present, built documentation to the proper location
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a TODO README COPYING NEWS gpl-2.0.txt gpl-3.0.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+#if [ -d $PKG/usr/share/doc ]; then
+# mv $PKG/usr/share/doc/scanmem/* $PKG/usr/doc/$PRGNAM-$VERSION/
+# rm -rf $PKG/usr/share/doc
+#fi
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}