106 lines
2.4 KiB
Plaintext

# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
pkgname=octoprint
pkgver=1.9.3
pkgrel=0
pkgdesc="Snappy web interface for your 3D printer"
url="https://octoprint.org/"
arch="noarch"
license="AGPL-3.0-only"
depends="
py3-argon2-cffi
py3-babel
py3-blinker
py3-cachelib
py3-class-doc
py3-click
py3-colorlog
py3-emoji
py3-feedparser
py3-filetype
py3-flask
py3-flask-assets
py3-flask-babel
py3-flask-limiter
py3-flask-login
py3-frozendict
py3-future
py3-markdown
py3-netaddr
py3-netifaces
py3-passlib
py3-pathvalidate
py3-pkginfo
py3-psutil
py3-pydantic
py3-pylru
py3-pyserial
py3-regex
py3-requests
py3-sarge
py3-semantic-version
py3-sentry-sdk
py3-tornado
py3-unidecode
py3-watchdog
py3-websocket-client
py3-werkzeug
py3-wrapt
py3-yaml
py3-zeroconf
py3-zipstream-ng
"
makedepends="
py3-gpep517
py3-setuptools
py3-wheel
"
checkdepends="
py3-ddt
py3-pytest
"
pkgusers="octoprint"
pkggroups="octoprint"
install="$pkgname.pre-install"
subpackages="
$pkgname-openrc
$pkgname-pyc
"
source="
https://github.com/OctoPrint/OctoPrint/archive/refs/tags/$pkgver/OctoPrint-$pkgver.tar.gz
config.yaml
octoprint.initd
fix-tests.patch
"
builddir="$srcdir/OctoPrint-$pkgver"
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages testenv
testenv/bin/python3 -m installer .dist/*.whl
testenv/bin/python3 -m pytest -k 'not pip'
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
install -Dm640 -o octoprint -g octoprint "$srcdir"/config.yaml "$pkgdir"/etc/octoprint/config.yaml
install -Dm755 "$srcdir"/octoprint.initd "$pkgdir"/etc/init.d/octoprint
install -d -o octoprint -g octoprint "$pkgdir"/var/log/octoprint/ "$pkgdir"/var/lib/octoprint/
}
sha512sums="
ec2cc8e73c3ff4855c3e389259d87d196aadf4a55f35ccef87b1ef59a0d832a29c52c4ab28db833b5ec275c5270fefb35e4c4769d692e004828b58aa6241c044 OctoPrint-1.9.3.tar.gz
b56a37d1225d37caff1288b9c943ee86ed1f36653bbb311c835031e53e5f68e95be3ad9b53d333aad65508ba2a3ba786f80601bd74fef8efb1c3364a8fd85010 config.yaml
3edd9971cc59fb66126f063ecac50a77792c5a3f5b718e03b7cbff74ff9f842c7784e7de2a56fb2e847a2bcb8e1c4fcfc52f8d236cdf3ecd511b230eea001162 octoprint.initd
d678b87aaee4529b4d96f496862e5bec86df98491330328848ac06fec8d1f4571cfac995b2e9de26dcd2efc43b9dc24578d7f50cae1893fefc76470aee074f14 fix-tests.patch
"