aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Willing <chris.willing@linux.com>2024-10-29 15:51:59 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-10-29 22:40:45 +0700
commit559f09bd469f27ce418944b1e95bc7db29929a39 (patch)
tree4df873f8a618d5cbf851fab5b39c1ff73f96a51f
parent5a408e4c6f24ca8b1aa4823b3338df890080ee22 (diff)
python/python3-paho-mqtt: Added (client side, implementations of MQTT and MQTT-SN).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--python/python3-paho-mqtt/README25
-rw-r--r--python/python3-paho-mqtt/python3-paho-mqtt.SlackBuild82
-rw-r--r--python/python3-paho-mqtt/python3-paho-mqtt.info10
-rw-r--r--python/python3-paho-mqtt/slack-desc19
4 files changed, 136 insertions, 0 deletions
diff --git a/python/python3-paho-mqtt/README b/python/python3-paho-mqtt/README
new file mode 100644
index 000000000000..7adbbb41958a
--- /dev/null
+++ b/python/python3-paho-mqtt/README
@@ -0,0 +1,25 @@
+Warning breaking change - Release 2.0 contains a breaking change;
+see the release notes at:
+https://github.com/eclipse/paho.mqtt.python/releases/tag/v2.0.0
+and migration details at:
+https://eclipse.dev/paho/files/paho.mqtt.python/html/migrations.html
+
+This document describes the source code for the Eclipse Paho MQTT
+Python client library, which implements versions 5.0, 3.1.1, and 3.1
+of the MQTT protocol.
+
+This code provides a client class which enable applications to
+connect to an MQTT broker to publish messages, and to subscribe to
+topics and receive published messages. It also provides some helper
+functions to make publishing one off messages to an MQTT server very
+straightforward.
+
+Python 2 is no longer supported. Minimum required is Python 3.7+.
+
+The MQTT protocol is a machine-to-machine (M2M)/"Internet of
+Things" connectivity protocol. Designed as an extremely lightweight
+publish/subscribe messaging transport, it is useful for connections
+with remote locations where a small code footprint is required and/or
+network bandwidth is at a premium.
+
+Paho is an Eclipse Foundation project.
diff --git a/python/python3-paho-mqtt/python3-paho-mqtt.SlackBuild b/python/python3-paho-mqtt/python3-paho-mqtt.SlackBuild
new file mode 100644
index 000000000000..60ebddc658c1
--- /dev/null
+++ b/python/python3-paho-mqtt/python3-paho-mqtt.SlackBuild
@@ -0,0 +1,82 @@
+#!/bin/bash
+
+# Slackware build script for python3-paho-mqtt
+
+# Copyright 2022-2024 Christoph Willing Sydney, Australia
+# 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-paho-mqtt
+SRCNAM=paho.mqtt.python
+VERSION=${VERSION:-2.1.0}
+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}
+
+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 {} \+
+
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages
+
+python3 -m build --no-isolation --verbose
+python3 -m installer -d "$PKG" dist/*.whl
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ CODE_OF_CONDUCT.* CONTRIBUTING.* LICENSE.* README.* SECURITY.* notice.html \
+ $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-paho-mqtt/python3-paho-mqtt.info b/python/python3-paho-mqtt/python3-paho-mqtt.info
new file mode 100644
index 000000000000..da822a9baaa8
--- /dev/null
+++ b/python/python3-paho-mqtt/python3-paho-mqtt.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-paho-mqtt"
+VERSION="2.1.0"
+HOMEPAGE="http://eclipse.org/paho"
+DOWNLOAD="https://github.com/eclipse/paho.mqtt.python/archive/refs/tags/v2.1.0/paho.mqtt.python-2.1.0.tar.gz"
+MD5SUM="1280561cbdf388e184e93732cf40274c"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="python3-hatchling"
+MAINTAINER="Christoph Willing"
+EMAIL="chris.willing@linux.com"
diff --git a/python/python3-paho-mqtt/slack-desc b/python/python3-paho-mqtt/slack-desc
new file mode 100644
index 000000000000..3e6054bdafae
--- /dev/null
+++ b/python/python3-paho-mqtt/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-paho-mqtt: python3-paho-mqtt (MQTT Python client library)
+python3-paho-mqtt:
+python3-paho-mqtt: This code provides a client class which enable applications to
+python3-paho-mqtt: connect to an MQTT broker to publish messages, and to subscribe to
+python3-paho-mqtt: topics and receive published messages. It supports only Python 3.7+
+python3-paho-mqtt: (no Python2.*)
+python3-paho-mqtt:
+python3-paho-mqtt: Paho is an Eclipse Foundation project.
+python3-paho-mqtt:
+python3-paho-mqtt:
+python3-paho-mqtt: