diff options
author | klaatu <klaatu@member.fsf.org> | 2022-03-09 19:26:41 +1300 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-03-09 17:17:52 +0700 |
commit | 604f8c4db2c1d4d6c781ab3d37e072f6a981787b (patch) | |
tree | 259217f449f6d5afd95321f342e4f105ac7bcacc /python/python3-pyusb | |
parent | faf41159f3d91f7720b86b0d2d22d1e70182523f (diff) |
python/python3-pyusb: Added (Python Module)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python3-pyusb')
-rw-r--r-- | python/python3-pyusb/README | 3 | ||||
-rw-r--r-- | python/python3-pyusb/python3-pyusb.SlackBuild | 87 | ||||
-rw-r--r-- | python/python3-pyusb/python3-pyusb.info | 10 | ||||
-rw-r--r-- | python/python3-pyusb/slack-desc | 19 |
4 files changed, 119 insertions, 0 deletions
diff --git a/python/python3-pyusb/README b/python/python3-pyusb/README new file mode 100644 index 000000000000..01669f3e2140 --- /dev/null +++ b/python/python3-pyusb/README @@ -0,0 +1,3 @@ +PyUSB is a native Python module providing easy USB access to Python3. + +The module contains classes and methods to support most USB operations. diff --git a/python/python3-pyusb/python3-pyusb.SlackBuild b/python/python3-pyusb/python3-pyusb.SlackBuild new file mode 100644 index 000000000000..2063b3baa942 --- /dev/null +++ b/python/python3-pyusb/python3-pyusb.SlackBuild @@ -0,0 +1,87 @@ +#!/bin/bash + +# Slackware build script for python3-pyusb +# Copyright 2022 klaatu <klaatu@member.fsf.org> +# All rights reserved. + +# GNU All-Permissive License +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=python3-pyusb +SRCNAM=pyusb +VERSION=${VERSION:-1.2.1} +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 PRINT_PACKAGE_NAME is set, print name of the package +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 +mkdir $PRGNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz \ + --strip-components=1 -C $PRGNAM-$VERSION +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 + +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 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + ACKNOWLEDGEMENTS LICENSE \ + ChangeLog README.rst \ + $PKG/usr/doc/$PRGNAM-$VERSION +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 diff --git a/python/python3-pyusb/python3-pyusb.info b/python/python3-pyusb/python3-pyusb.info new file mode 100644 index 000000000000..efd7fb5889f0 --- /dev/null +++ b/python/python3-pyusb/python3-pyusb.info @@ -0,0 +1,10 @@ +PRGNAM="python3-pyusb" +VERSION="1.2.1" +HOMEPAGE="https://pyusb.github.io/pyusb/" +DOWNLOAD="https://github.com/pyusb/pyusb/releases/download/v1.2.1/pyusb-1.2.1.tar.gz" +MD5SUM="880008dff32dac8f58076b4e534492d9" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Klaatu" +EMAIL="klaatu@member.fsf.org" diff --git a/python/python3-pyusb/slack-desc b/python/python3-pyusb/slack-desc new file mode 100644 index 000000000000..8fc6d5943559 --- /dev/null +++ b/python/python3-pyusb/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------------------------------------------------------| +python3-pyusb: python3-pyusb (USB module for Python3) +python3-pyusb: +python3-pyusb: PyUSB is a native Python module providing easy USB access to Python3. +python3-pyusb: The module contains classes and methods to support most USB operations. +python3-pyusb: +python3-pyusb: https://pyusb.github.io/pyusb +python3-pyusb: +python3-pyusb: +python3-pyusb: +python3-pyusb: +python3-pyusb: |