From 83787ff80582edf1dd6459a1d9676a9a99fe814c Mon Sep 17 00:00:00 2001 From: Christian Schendel Date: Thu, 25 Dec 2025 16:54:54 +0100 Subject: [PATCH] upgpkg: python-inputs-1:0.5-1: initial upload --- .SRCINFO | 19 ++++++++ .gitignore | 17 +++++++ .nvchecker.toml | 4 ++ ...c9e25f1e14c4316d85d59c536b4e407f569f.patch | 22 +++++++++ LICENSE | 12 +++++ LICENSES/0BSD.txt | 1 + LICENSES/BSD-3-Clause.txt | 11 +++++ PKGBUILD | 48 +++++++++++++++++++ REUSE.toml | 30 ++++++++++++ 9 files changed, 164 insertions(+) create mode 100644 .SRCINFO create mode 100644 .gitignore create mode 100644 .nvchecker.toml create mode 100644 3203c9e25f1e14c4316d85d59c536b4e407f569f.patch create mode 100644 LICENSE create mode 120000 LICENSES/0BSD.txt create mode 100644 LICENSES/BSD-3-Clause.txt create mode 100644 PKGBUILD create mode 100644 REUSE.toml diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..c386d38 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = python-inputs + pkgdesc = Cross-platform Python support for keyboards, mice and gamepads + pkgver = 0.5 + pkgrel = 1 + epoch = 1 + url = https://github.com/zeth/inputs + arch = any + license = BSD-3-Clause + makedepends = python-build + makedepends = python-installer + makedepends = python-setuptools + makedepends = python-wheel + depends = python + source = inputs-0.5.tar.gz::https://github.com/zeth/inputs/archive/refs/tags/v0.5.tar.gz + source = 3203c9e25f1e14c4316d85d59c536b4e407f569f.patch + b2sums = 64e36aee9ce576924c77cc5b0bd89b3bc657fbd9a89ac0407db143c05066828c5a09b6c0e6c3bfb457b5fc4f9cefd81d4b0bf949ac06b69314997b444050d5ab + b2sums = 337cf613a41876e4d1ce38ec14befdfe739db171238a318de8a0a42cba96baeaee888e405754a2432792f82f6f341a0a315be3a0f375cbe4c4a735e48e9f5534 + +pkgname = python-inputs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a8267d1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# Ignore everything +* + +# But not these files... +!.gitignore +!PKGBUILD +!.SRCINFO +!LICENSE +!chroot-build +!.nvchecker.toml +!/keys +!/keys/pgp +!/keys/pgp/*.asc +!/LICENSES +!/LICENSES/*.txt +!REUSE.toml +!*.patch diff --git a/.nvchecker.toml b/.nvchecker.toml new file mode 100644 index 0000000..5561e30 --- /dev/null +++ b/.nvchecker.toml @@ -0,0 +1,4 @@ +[python-inputs] +source = "git" +git = "https://github.com/zeth/inputs.git" +prefix = "v" diff --git a/3203c9e25f1e14c4316d85d59c536b4e407f569f.patch b/3203c9e25f1e14c4316d85d59c536b4e407f569f.patch new file mode 100644 index 0000000..1274ede --- /dev/null +++ b/3203c9e25f1e14c4316d85d59c536b4e407f569f.patch @@ -0,0 +1,22 @@ +From 3203c9e25f1e14c4316d85d59c536b4e407f569f Mon Sep 17 00:00:00 2001 +From: Jonathan spyreas +Date: Thu, 16 Apr 2020 11:43:36 -0400 +Subject: [PATCH] fix for dumb bug around leds and docker + +--- + inputs.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/inputs.py b/inputs.py +index b1f8fb1..36cc3e1 100644 +--- a/inputs.py ++++ b/inputs.py +@@ -3134,7 +3134,7 @@ def __init__(self, manager, path, name): + + def _post_init(self): + self._match_device() +- self._character_device_path = self.gamepad.get_char_device_path() ++ self._character_device_path = self.gamepad.get_char_device_path() if self.gamepad else None + + def _match_device(self): + number = int(self.name.split('xpad')[1]) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b87c5e4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,12 @@ +Copyright Arch Linux Contributors + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE +FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/LICENSES/0BSD.txt b/LICENSES/0BSD.txt new file mode 120000 index 0000000..ea5b606 --- /dev/null +++ b/LICENSES/0BSD.txt @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt new file mode 100644 index 0000000..ea890af --- /dev/null +++ b/LICENSES/BSD-3-Clause.txt @@ -0,0 +1,11 @@ +Copyright (c) . + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT HOLDER OR CONTRIBUTORS 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. diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..08fcd5e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Mark Wagie +# Contributor: Major +pkgname=python-inputs +_name=${pkgname#python-} +pkgver=0.5 +epoch=1 +pkgrel=1 +pkgdesc="Cross-platform Python support for keyboards, mice and gamepads" +arch=('any') +url="https://github.com/zeth/inputs" +license=( + BSD-3-Clause +) +depends=( + python +) +makedepends=( + python-build + python-installer + python-setuptools + python-wheel +) +source=( + "${_name}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz" + '3203c9e25f1e14c4316d85d59c536b4e407f569f.patch' +) +b2sums=('64e36aee9ce576924c77cc5b0bd89b3bc657fbd9a89ac0407db143c05066828c5a09b6c0e6c3bfb457b5fc4f9cefd81d4b0bf949ac06b69314997b444050d5ab' + '337cf613a41876e4d1ce38ec14befdfe739db171238a318de8a0a42cba96baeaee888e405754a2432792f82f6f341a0a315be3a0f375cbe4c4a735e48e9f5534') + +prepare() { + cd "${_name}-${pkgver}" + + # https://github.com/zeth/inputs/issues/72 + # https://github.com/zeth/inputs/pull/90 + patch -Np1 -i ../3203c9e25f1e14c4316d85d59c536b4e407f569f.patch +} + +build() { + cd "${_name}-${pkgver}" + python -m build --wheel --no-isolation +} + +package() { + cd "${_name}-${pkgver}" + python -m installer --destdir="${pkgdir}" dist/*.whl + + install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/" +} diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 0000000..f198af0 --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,30 @@ +version = 1 + +[[annotations]] +path = [ + "PKGBUILD", + "README.md", + "keys/**", + ".SRCINFO", + ".nvchecker.toml", + ".gitignore", + "*.install", + "*.sysusers", + "*.tmpfiles", + "*.logrotate", + "*.pam", + "*.service", + "*.socket", + "*.timer", + "*.desktop", + "*.hook", +] +SPDX-FileCopyrightText = "Arch Linux contributors" +SPDX-License-Identifier = "0BSD" + +[[annotations]] +path = [ + "*.patch", +] +SPDX-FileCopyrightText = "python-inputs contributors" +SPDX-License-Identifier = "BSD-3-Clause"