diff options
author | Heinz Wiesinger <pprkut@slackbuilds.org> | 2021-09-26 18:08:49 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-02 16:50:37 +0700 |
commit | 06e212e5393c8fa91836755f6546ab51576d7c96 (patch) | |
tree | bb811f8bcb35587a306687d4acdcd701f81bbccd /python/python3-gattlib | |
parent | 683429feac1d178ce48849a588d56201d360bfdc (diff) |
python/python3-gattlib: Added
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python3-gattlib')
-rw-r--r-- | python/python3-gattlib/README | 3 | ||||
-rw-r--r-- | python/python3-gattlib/python3-gattlib.SlackBuild | 83 | ||||
-rw-r--r-- | python/python3-gattlib/python3-gattlib.info | 10 | ||||
-rw-r--r-- | python/python3-gattlib/slack-desc | 19 |
4 files changed, 115 insertions, 0 deletions
diff --git a/python/python3-gattlib/README b/python/python3-gattlib/README new file mode 100644 index 0000000000000..ab2b73dfa0947 --- /dev/null +++ b/python/python3-gattlib/README @@ -0,0 +1,3 @@ +This is a Python library to use the GATT Protocol for Bluetooth LE +devices. It is a wrapper around the implementation used by gatttool +in bluez package. diff --git a/python/python3-gattlib/python3-gattlib.SlackBuild b/python/python3-gattlib/python3-gattlib.SlackBuild new file mode 100644 index 0000000000000..2a466c18bc6b0 --- /dev/null +++ b/python/python3-gattlib/python3-gattlib.SlackBuild @@ -0,0 +1,83 @@ +#!/bin/bash + +# Slackware build script for python-gattlib + +# Copyright 2017-2021 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-gattlib +VERSION=${VERSION:-0.20201113} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +SRCNAM=gattlib + +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} + +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 -o -perm 770 \) -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 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-gattlib/python3-gattlib.info b/python/python3-gattlib/python3-gattlib.info new file mode 100644 index 0000000000000..e4dd3d5fe10f7 --- /dev/null +++ b/python/python3-gattlib/python3-gattlib.info @@ -0,0 +1,10 @@ +PRGNAM="python3-gattlib" +VERSION="0.20201113" +HOMEPAGE="https://github.com/oscaracena/pygattlib" +DOWNLOAD="https://files.pythonhosted.org/packages/fe/8d/72d539dd6be2d9677864a1604b8db80696c2d5f018cf8093bf442311162f/gattlib-0.20201113.tar.gz" +MD5SUM="433581aba2b9d3b621094fb62d20dfd5" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Heinz Wiesinger" +EMAIL="pprkut@slackbuilds.org" diff --git a/python/python3-gattlib/slack-desc b/python/python3-gattlib/slack-desc new file mode 100644 index 0000000000000..36cae5e94ccca --- /dev/null +++ b/python/python3-gattlib/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-gattlib: python3-gattlib (Bluetooth LE protocol library) +python3-gattlib: +python3-gattlib: This is a Python library to use the GATT Protocol for Bluetooth LE +python3-gattlib: devices. It is a wrapper around the implementation used by gatttool +python3-gattlib: in bluez package. +python3-gattlib: +python3-gattlib: Homepage: https://github.com/oscaracena/pygattlib +python3-gattlib: +python3-gattlib: +python3-gattlib: +python3-gattlib: |