diff options
author | B. Watson <yalhcru@gmail.com> | 2017-08-27 17:21:18 +0100 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2017-09-02 10:19:44 +0100 |
commit | 2d3140cce7905c21ceae9e5b2cae5ea008b7a77a (patch) | |
tree | ad69d38f43859ae4280a4b8f3bd8b6b92153851b /network/2ping/2ping.SlackBuild | |
parent | 3f1c9977ed71ce604e3879165c9849eb04f7da4f (diff) |
network/2ping: Added (bi-directional ping utility).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network/2ping/2ping.SlackBuild')
-rw-r--r-- | network/2ping/2ping.SlackBuild | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/network/2ping/2ping.SlackBuild b/network/2ping/2ping.SlackBuild new file mode 100644 index 0000000000000..bdb398e8f5fe2 --- /dev/null +++ b/network/2ping/2ping.SlackBuild @@ -0,0 +1,61 @@ +#!/bin/sh + +# Slackware build script for 2ping + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=2ping +VERSION=${VERSION:-4.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# This could be a noarch package, except python libs are installed +# to /usr/lib64 on x86_64 and /usr/lib elsewhere :( +# No C or C++ is compiled so no SLKCFLAGS here. +LIBDIRSUFFIX="" +if [ "$ARCH" = "x86_64" ]; then + LIBDIRSUFFIX="64" +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 . +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 {} \; + +python3 setup.py install --root=$PKG + +mkdir -p $PKG/usr/man/man1 +gzip -9c < doc/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README* COPYING ChangeLog doc/*.py doc/*.md $PKG/usr/doc/$PRGNAM-$VERSION + +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} |