aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-04-13 22:33:41 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-15 07:15:26 +0700
commit0ede7f2818608498c0bcbc8a715332529e5d45b2 (patch)
treeb37f6f4d65d674d795b4d1b3262976742de80ad4 /python
parent8d0d802b3fc727d5bf4e2a7edd151356b26bbd74 (diff)
python/pyelftools: Added (python library for examining ELF files)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python')
-rw-r--r--python/pyelftools/README7
-rw-r--r--python/pyelftools/pyelftools.SlackBuild71
-rw-r--r--python/pyelftools/pyelftools.info10
-rw-r--r--python/pyelftools/slack-desc19
4 files changed, 107 insertions, 0 deletions
diff --git a/python/pyelftools/README b/python/pyelftools/README
new file mode 100644
index 000000000000..8be5e4c55932
--- /dev/null
+++ b/python/pyelftools/README
@@ -0,0 +1,7 @@
+pyelftools (python library for examining ELF files)
+
+pyelftools is a pure-Python library for parsing and analyzing ELF
+files and DWARF debugging information. See the User's guide for more
+details:
+
+https://github.com/eliben/pyelftools/wiki/User's-guide
diff --git a/python/pyelftools/pyelftools.SlackBuild b/python/pyelftools/pyelftools.SlackBuild
new file mode 100644
index 000000000000..80c65c47c43a
--- /dev/null
+++ b/python/pyelftools/pyelftools.SlackBuild
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+# Slackware build script for pyelftools
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=pyelftools
+VERSION=${VERSION:-0.29}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -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 .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+python3 setup.py install --root=$PKG
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a CHANGES LICENSE README* $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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
diff --git a/python/pyelftools/pyelftools.info b/python/pyelftools/pyelftools.info
new file mode 100644
index 000000000000..2b60e31b7eb6
--- /dev/null
+++ b/python/pyelftools/pyelftools.info
@@ -0,0 +1,10 @@
+PRGNAM="pyelftools"
+VERSION="0.29"
+HOMEPAGE="https://pypi.org/project/pyelftools/"
+DOWNLOAD="https://files.pythonhosted.org/packages/source/p/pyelftools/pyelftools-0.29.tar.gz"
+MD5SUM="2afc97cd239c0dea0cca97d00d3dcb42"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/python/pyelftools/slack-desc b/python/pyelftools/slack-desc
new file mode 100644
index 000000000000..5832dbee232c
--- /dev/null
+++ b/python/pyelftools/slack-desc
@@ -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------------------------------------------------------|
+pyelftools: pyelftools (python library for examining ELF files)
+pyelftools:
+pyelftools: pyelftools is a pure-Python library for parsing and analyzing ELF
+pyelftools: files and DWARF debugging information. See the User's guide for more
+pyelftools: details:
+pyelftools:
+pyelftools: https://github.com/eliben/pyelftools/wiki/User's-guide
+pyelftools:
+pyelftools:
+pyelftools:
+pyelftools: