summaryrefslogtreecommitdiffstats
path: root/network/scapy/scapy.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/scapy/scapy.SlackBuild')
-rw-r--r--network/scapy/scapy.SlackBuild29
1 files changed, 22 insertions, 7 deletions
diff --git a/network/scapy/scapy.SlackBuild b/network/scapy/scapy.SlackBuild
index 61888c7449..44a2db956e 100644
--- a/network/scapy/scapy.SlackBuild
+++ b/network/scapy/scapy.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
#
# Slackware build script for scapy (http://www.secdev.org/projects/scapy/)
#
-# Copyright 2008-2019 Corrado Franco (http://conraid.net)
+# Copyright 2008-2023 Corrado Franco (http://conraid.net)
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
@@ -23,10 +23,13 @@
# with this program (most likely, a file named COPYING). If not, see
# <http://www.gnu.org/licenses/>.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=scapy
-VERSION=${VERSION:-2.4.3}
+VERSION=${VERSION:-2.5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +39,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
OUTPUT=${OUTPUT:-/tmp}
PKG=$TMP/package-$PRGNAM
@@ -58,8 +68,13 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
sed "s|share/man/man1|man/man1|g" -i setup.py
-python setup.py build
-python setup.py install --root=$PKG
+python2 setup.py build
+python2 setup.py install --root=$PKG
+
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -type f -exec chmod 644 {} \; -exec gzip -9 {} \;
+ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -68,4 +83,4 @@ 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}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE