summaryrefslogtreecommitdiffstats
path: root/python/python3-pybluez
diff options
context:
space:
mode:
author Heinz Wiesinger <pprkut@slackbuilds.org>2022-01-23 11:39:00 +0100
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2022-01-25 14:44:38 +0700
commitb1117f6da63d78603043050445a3fcb4c8db52fb (patch)
tree106ce3b1a71cc37d1d4f0400e324f86c428c2e2d /python/python3-pybluez
parentc55c421677c4ebc481b47b9024df42a32ee6fd9e (diff)
downloadslackbuilds-b1117f6da63d78603043050445a3fcb4c8db52fb.tar.gz
slackbuilds-b1117f6da63d78603043050445a3fcb4c8db52fb.tar.xz
python/python3-pybluez: Added (Python BlueZ bindings)
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python3-pybluez')
-rw-r--r--python/python3-pybluez/README1
-rw-r--r--python/python3-pybluez/pybluez-2to3.patch21
-rw-r--r--python/python3-pybluez/python3-pybluez.SlackBuild96
-rw-r--r--python/python3-pybluez/python3-pybluez.info10
-rw-r--r--python/python3-pybluez/slack-desc19
5 files changed, 147 insertions, 0 deletions
diff --git a/python/python3-pybluez/README b/python/python3-pybluez/README
new file mode 100644
index 0000000000..90f6019f56
--- /dev/null
+++ b/python/python3-pybluez/README
@@ -0,0 +1 @@
+Python extension module allowing access to system Bluetooth resources.
diff --git a/python/python3-pybluez/pybluez-2to3.patch b/python/python3-pybluez/pybluez-2to3.patch
new file mode 100644
index 0000000000..e15309db44
--- /dev/null
+++ b/python/python3-pybluez/pybluez-2to3.patch
@@ -0,0 +1,21 @@
+From 64ca3fd1568e56f2d0e1fe992f3a0f5ba57ea694 Mon Sep 17 00:00:00 2001
+From: Stephen Abraham <stephenabraham@tophatorbotics.com>
+Date: Mon, 13 Sep 2021 16:22:46 -0400
+Subject: [PATCH] Removed 2to3 command
+
+---
+ setup.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index c9de5c9..6a80b4e 100755
+--- a/setup.py
++++ b/setup.py
+@@ -127,7 +127,6 @@ def finalize_options(self):
+ license='GPL',
+ extras_require={'ble': ['gattlib']},
+ package_dir=package_dir,
+- use_2to3=True,
+ install_requires=install_requires,
+ package_data=package_data,
+ eager_resources=eager_resources,
diff --git a/python/python3-pybluez/python3-pybluez.SlackBuild b/python/python3-pybluez/python3-pybluez.SlackBuild
new file mode 100644
index 0000000000..06394d8ae3
--- /dev/null
+++ b/python/python3-pybluez/python3-pybluez.SlackBuild
@@ -0,0 +1,96 @@
+#!/bin/bash
+
+# Slackware build script for python3-pybluez
+
+# Copyright 2009-2022 Heinz Wiesinger, Amsterdam, The Netherlands
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=python3-pybluez
+SRCNAM=PyBluez
+VERSION=${VERSION:-0.23}
+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 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}
+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=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$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 {} \;
+
+# Don't use 2to3 support anymore
+patch -p1 -i $CWD/pybluez-2to3.patch
+
+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 CHANGELOG COPYING README.md PKG-INFO $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-pybluez/python3-pybluez.info b/python/python3-pybluez/python3-pybluez.info
new file mode 100644
index 0000000000..b69290d282
--- /dev/null
+++ b/python/python3-pybluez/python3-pybluez.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-pybluez"
+VERSION="0.23"
+HOMEPAGE="https://pybluez.github.io/"
+DOWNLOAD="https://files.pythonhosted.org/packages/08/9f/e9d93b266d2d1ea988780a52a696073ba0a65df65a532165fdf6ff90d0ed/PyBluez-0.23.tar.gz"
+MD5SUM="afbe8429bb82d2c46a3d0f5f4f898f9d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="python3-gattlib"
+MAINTAINER="Heinz Wiesinger"
+EMAIL="pprkut@slackbuilds.org"
diff --git a/python/python3-pybluez/slack-desc b/python/python3-pybluez/slack-desc
new file mode 100644
index 0000000000..9b464d427a
--- /dev/null
+++ b/python/python3-pybluez/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-pybluez: python3-pybluez (Python BlueZ bindings)
+python3-pybluez:
+python3-pybluez: Python extension module allowing access to system Bluetooth
+python3-pybluez: resources.
+python3-pybluez:
+python3-pybluez: Homepage: https://pybluez.github.io/
+python3-pybluez:
+python3-pybluez:
+python3-pybluez:
+python3-pybluez:
+python3-pybluez: