summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-02-12 12:55:53 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-13 09:17:49 +0700
commit0315938fc3ba71b08385a638261d8ecdd8bc68b2 (patch)
treed6b75a5c6ca95ed788531853c9228223eeabb2ff /system
parent68bf9e588e039be71ddc5866ede841c2cfdcb1c4 (diff)
downloadslackbuilds-0315938fc3ba71b08385a638261d8ecdd8bc68b2.tar.gz
system/ptop: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/ptop/README10
-rw-r--r--system/ptop/ptop.SlackBuild43
-rw-r--r--system/ptop/ptop.info8
-rw-r--r--system/ptop/slack-desc6
4 files changed, 40 insertions, 27 deletions
diff --git a/system/ptop/README b/system/ptop/README
index 0c77c64933..0a5d74e0fa 100644
--- a/system/ptop/README
+++ b/system/ptop/README
@@ -1,5 +1,7 @@
-An awesome task manager written in python. A more awesome top like
-thing in your terminal !
+ptop (top-like system monitor)
-NOTE:
-This package conflict with fpc as both install ptop binary in /usr/bin/.
+An awesome task manager written in python. A more awesome top-like
+thing in your terminal!
+
+The executable is called "ptop.py", because there's already a "ptop"
+in the fpc package. This way there's no conflict.
diff --git a/system/ptop/ptop.SlackBuild b/system/ptop/ptop.SlackBuild
index ae3f987962..6733429556 100644
--- a/system/ptop/ptop.SlackBuild
+++ b/system/ptop/ptop.SlackBuild
@@ -22,10 +22,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220212 bkw: Modified by SlackBuilds.org for Slackware 15.0:
+# - resolve conflict with fpc.
+# - add missing huepy dependency.
+# - stop installing documentation directly to $PKG/usr.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=ptop
-VERSION=${VERSION:-1.0.0}
+VERSION=${VERSION:-1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +43,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -70,26 +72,35 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz
+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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-# Delete argparse standard Python library from requires.
-# ptop work with argparse minimal version.
-sed -i "19d" setup.py
+# apparently we don't need argparse as a dependency.
+sed -i '/argparse/d' setup.py
python setup.py install --root=$PKG
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# 20220212 bkw: the plan was to rename the script to ptop.py, to
+# avoid conflicting with fpc. unfortunately it refuses to run under
+# another name (ImportError: No module named main), so this elaborate
+# circumlocution is required. it results in a shell script that has
+# a .py filename (confusing I supppose), but works fine.
+mkdir -p $PKG/usr/libexec/$PRGNAM
+mv $PKG/usr/bin/$PRGNAM $PKG/usr/libexec/$PRGNAM
+
+cat <<EOF > $PKG/usr/bin/$PRGNAM.py
+#!/bin/sh
+exec /usr/libexec/$PRGNAM/$PRGNAM "\$@"
+EOF
+
+chmod +x $PKG/usr/bin/$PRGNAM.py
+# 20220212 bkw: what a mess. the docs are installed directly to $PKG/usr.
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README.md LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/[A-Z]* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/system/ptop/ptop.info b/system/ptop/ptop.info
index 3508b75450..62cbfef656 100644
--- a/system/ptop/ptop.info
+++ b/system/ptop/ptop.info
@@ -1,10 +1,10 @@
PRGNAM="ptop"
-VERSION="1.0.0"
+VERSION="1.0"
HOMEPAGE="https://github.com/darxtrix/ptop"
-DOWNLOAD="https://github.com/darxtrix/ptop/archive/v1.0.0.tar.gz"
-MD5SUM="16a12031e6bc5191f389755e475b82a8"
+DOWNLOAD="https://github.com/darxtrix/ptop/archive/v1.0/ptop-1.0.tar.gz"
+MD5SUM="2a4eee636aea33aad88872aa296514f9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="npyscreen psutil drawille"
+REQUIRES="npyscreen psutil drawille huepy"
MAINTAINER="Dimitris Zlatanidis"
EMAIL="d.zlatanidis@gmail.com"
diff --git a/system/ptop/slack-desc b/system/ptop/slack-desc
index 13b940e7c0..845d2044a4 100644
--- a/system/ptop/slack-desc
+++ b/system/ptop/slack-desc
@@ -6,10 +6,10 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-ptop: ptop (task manager)
+ptop: ptop (top-like system monitor)
ptop:
-ptop: An awesome task manager written in python. A more awesome top like
-ptop: thing in your terminal !
+ptop: An awesome task manager written in python. A more awesome top-like
+ptop: thing in your terminal!
ptop:
ptop: Homepage: https://github.com/darxtrix/ptop
ptop: