myaur/decode-config/PKGBUILD
2024-11-11 17:51:04 -05:00

50 lines
1.1 KiB
Bash

# Maintainer: Michael Erdely <mike@erdelynet.com>
## links
# https://pypi.org/project/decode-config/
# https://github.com/tasmota/decode-config
_module="decode-config"
_pkgname="python-${_module//_/-}"
pkgname="$_pkgname"
pkgrel=1
pkgver=14.3.0
pkgdesc="Backup/restore and decode configuration tool for Tasmota"
url="https://github.com/tasmota/decode-config"
arch=('any')
license=("LGPL-3.0")
depends=(
'python'
'python-rich'
'python-configargparse'
'python-paho-mqtt'
'python-requests'
)
makedepends=(
'python-build'
'python-installer'
'python-setuptools'
'python-wheel'
)
optdepends=(
'python-setuptools: used on import error'
)
_pkgsrc="$_module-$pkgver"
_pkgext="tar.gz"
source=("$_pkgsrc.$_pkgext"::"$url/archive/refs/tags/v$pkgver.$_pkgext")
sha256sums=('f2ee716017ea11afaf50e5f26569ef6816d9b9ab8fb75b623abbc228d86481af')
build() {
cd "$_pkgsrc"
python -m build --wheel --no-isolation
}
package() {
cd "$_pkgsrc"
echo "$_pkgsrc"
python -m installer --destdir="$pkgdir" dist/*.whl
mv $pkgdir/usr/bin/decode-config.py $pkgdir/usr/bin/decode-config
}