A sr.ht/meta.sr.ht/APKBUILD => sr.ht/meta.sr.ht/APKBUILD +46 -0
@@ 0,0 1,46 @@
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=meta.sr.ht
+pkgver=0.6.2
+pkgrel=0
+pkgdesc="sr.ht account service"
+url="https://git.sr.ht/~sircmpwn/meta.sr.ht"
+arch="noarch"
+license="AGPLv3"
+depends="
+ py3-srht
+ py3-pgpy
+ py3-sshpubkeys
+ py3-pystache
+ py3-pyotp
+ py3-qrcode
+ py3-gunicorn
+ py3-alembic
+ py3-redis
+ redis
+"
+makedepends="py-setuptools nodejs sassc"
+source="
+ http://git.sr.ht/~sircmpwn/$pkgname/snapshot/$pkgname-$pkgver.tar.xz
+ meta.sr.ht.initrd
+"
+builddir="$srcdir/$pkgname-$pkgver"
+export PKGVER=$pkgver
+options="$options !check"
+install="$pkgname.post-install $pkgname.post-upgrade"
+
+build() {
+ cd "$builddir"
+ python3 setup.py build
+}
+
+package() {
+ cd "$builddir"
+ python3 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm755 "$srcdir"/meta.sr.ht.initrd "$pkgdir"/etc/init.d/meta.sr.ht
+ mkdir -p "$pkgdir"/etc/sr.ht "$pkgdir"/etc/sr.ht/alembic/
+ install -Dm644 config.ini.example "$pkgdir"/etc/sr.ht/meta.ini
+ install -Dm644 alembic.ini.example "$pkgdir"/etc/sr.ht/alembic/meta.ini
+}
+
+sha512sums="2954be059b33e89923fa8a758d3672f97a2d119c1add92b5ca21f06818c06a1cc4dc2e008ff07f2feee53631ae4fb62dae2e4b4c7f27218cb85c80422db103e3 meta.sr.ht-0.6.2.tar.xz
+c149ba165ce153a13f55ce4b46427e6a7f7dc97ce7bbd776e6d56255b90edb52cc02f80c83e59dd11a67efd1ef0fe9e2a2812ca171d215df15513a1ca60ba597 meta.sr.ht.initrd"
A sr.ht/meta.sr.ht/meta.sr.ht.initrd => sr.ht/meta.sr.ht/meta.sr.ht.initrd +32 -0
@@ 0,0 1,32 @@
+#!/sbin/openrc-run
+name="meta.sr.ht"
+description="meta.sr.ht service"
+
+# Override these with /etc/conf.d/meta.sr.ht
+META_USER=${META_USER:-metasrht}
+META_BIND=${META_BIND:-127.0.0.1:5000}
+LOCAL_PG=${LOCAL_PG:-yes}
+
+depend() {
+ need net
+ need redis
+ [ "$LOCAL_PG" == "yes" ] && need postgresql
+}
+
+start() {
+ ebegin "Starting $name"
+ start-stop-daemon \
+ -u ${META_USER} \
+ --background \
+ --make-pidfile \
+ --pidfile /run/$name.pid \
+ --exec /usr/bin/gunicorn -- \
+ metasrht.app:app -b ${META_BIND}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $name"
+ start-stop-daemon --stop --exec /usr/bin/gunicorn --pidfile /run/$name.pid
+ eend $?
+}
A sr.ht/meta.sr.ht/meta.sr.ht.post-install => sr.ht/meta.sr.ht/meta.sr.ht.post-install +3 -0
@@ 0,0 1,3 @@
+#!/bin/sh
+addgroup -S metasrht || true
+adduser -SDH -s /sbin/nologin -g metasrht metasrht || true
A sr.ht/meta.sr.ht/meta.sr.ht.post-upgrade => sr.ht/meta.sr.ht/meta.sr.ht.post-upgrade +2 -0
@@ 0,0 1,2 @@
+#!/bin/sh
+alembic-3 -c /etc/sr.ht/alembic/meta.ini upgrade head
A sr.ht/py-alembic/APKBUILD => sr.ht/py-alembic/APKBUILD +52 -0
@@ 0,0 1,52 @@
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+
+pkgname=py-alembic
+_pkgname=alembic
+pkgver=0.9.6
+pkgrel=0
+pkgdesc="Lightweight database migration tool for usage with SQLAlchemy"
+url="https://bitbucket.org/zzzeek/alembic"
+arch="noarch"
+license="MIT"
+depends="py-mako py-dateutil py-sqlalchemy py-editor"
+makedepends="python2-dev python3-dev py-setuptools py-mock pytest"
+subpackages="py2-${_pkgname}:_py2 py3-${_pkgname}:_py3"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/${_pkgname}-${pkgver}"
+
+prepare() {
+ cp -r "$builddir" "$builddir"-py3
+}
+
+check() {
+ cd "$builddir"
+ python2 setup.py check
+ cd "$builddir"-py3
+ python3 setup.py check
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ cd "$builddir"
+ _py
+}
+
+_py3() {
+ cd "$builddir"-py3
+ _py
+}
+
+_py() {
+ local pyver="${subpkgname:2:1}"
+ local python="python$pyver"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$python ${depends//py-/py$pyver-}"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+ mv "$subpkgdir"/usr/bin/alembic "$subpkgdir"/usr/bin/alembic-$pyver
+}
+
+sha512sums="f7bc6fa2888056d66b1d3640387b933b4accea6e6062ec089e5ce1353cbaa89ad3c1afac6c06aa52ddd497bdd41f9fdf5d4d860244ed8f339c69c16eb5494c46 alembic-0.9.6.tar.gz"
A sr.ht/py-editor/APKBUILD => sr.ht/py-editor/APKBUILD +50 -0
@@ 0,0 1,50 @@
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=py-editor
+_pkgname=editor
+pkgver=1.0.3
+pkgrel=0
+pkgdesc="Programmatically open an editor, capture the result"
+url="https://github.com/fmoo/python-editor"
+arch="noarch"
+license="Apache"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="${_pkgname}-${pkgver}.tar.gz::https://github.com/fmoo/python-editor/archive/${pkgver}.tar.gz"
+builddir="$srcdir/python-${_pkgname}-${pkgver}"
+# This dead-simple module has no tests
+options="$options !check"
+
+prepare() {
+ cp -r "$builddir" "$builddir"-py3
+}
+
+check() {
+ cd "$builddir"
+ python2 setup.py check
+ cd "$builddir"-py3
+ python3 setup.py check
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ cd "$builddir"
+ _py python2
+}
+
+_py3() {
+ cd "$builddir"-py3
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="0b14462099f8c5a3a7517f0f0cb744470284c34d164483bc58b15ecf4c5484090149d5dcb923b932a41857cfa34d4f10e4238ccc20089804a14631a459b63a39 editor-1.0.3.tar.gz"
A sr.ht/py-qrcode/APKBUILD => sr.ht/py-qrcode/APKBUILD +52 -0
@@ 0,0 1,52 @@
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=py-qrcode
+_pkgname=qrcode
+pkgver=5.3
+pkgrel=0
+pkgdesc="QR Code image generator"
+url="https://github.com/lincolnloop/python-qrcode"
+arch="noarch"
+license="MIT"
+depends="py-pillow py-six"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/${_pkgname}-${pkgver}"
+
+prepare() {
+ cp -r "$builddir" "$builddir"-py3
+}
+
+check() {
+ cd "$builddir"
+ python2 setup.py check
+ cd "$builddir"-py3
+ python3 setup.py check
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ cd "$builddir"
+ _py python2
+}
+
+_py3() {
+ cd "$builddir"-py3
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+ # Who cares
+ rm -rf "$subpkgdir"/usr/bin
+ rm -rf "$subpkgdir"/usr/share
+}
+
+sha512sums="325ffb3285a4f01f59b1c708a879d6465ad4c8d066b53a15545f381dbc8de7f0b28b3d7b925bac5367de436ababf1c25c75ddbf37066e17b02d68292edd0ef5e qrcode-5.3.tar.gz"
A sr.ht/py3-pyotp/APKBUILD => sr.ht/py3-pyotp/APKBUILD +27 -0
@@ 0,0 1,27 @@
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=py3-pyotp
+_pkgname=pyotp
+pkgver=2.1.1
+pkgrel=0
+pkgdesc="Python library for generating & verifying one-time passwords"
+url="https://pyotp.readthedocs.io"
+arch="noarch"
+license="MIT"
+depends="python3 py3-future"
+makedepends="py-setuptools"
+source="
+ $pkgname-$pkgver.zip::https://github.com/pyotp/${_pkgname}/archive/v${pkgver}.zip
+"
+builddir="$srcdir/${_pkgname}-${pkgver}"
+
+check() {
+ cd "$builddir"
+ python3 setup.py check
+}
+
+package() {
+ cd "$builddir"
+ python3 setup.py install --root="$pkgdir" --optimize=1
+}
+
+sha512sums="e8fb2de02a1af0e84598cf54b8a3e8b24f20516adc44340a6812c3ab93cdcc289ae951ae2360c52a922811e7ebe6c2697bbf5f8f196db8ee8a17f7fe54946f1b py3-pyotp-2.1.1.zip"
M sr.ht/py3-srht/APKBUILD => sr.ht/py3-srht/APKBUILD +6 -4
@@ 1,11 1,11 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgbase=srht
pkgname=py3-srht
-pkgver=0.10.2
+pkgver=0.11.3
pkgrel=0
pkgdesc="sr.ht shared code"
url="https://git.sr.ht/~sircmpwn/srht"
-arch="all"
+arch="noarch"
license="BSD"
depends="
py3-flask
@@ 24,11 24,13 @@ makedepends="
"
source="http://git.sr.ht/~sircmpwn/$pkgbase/snapshot/$pkgbase-$pkgver.tar.xz"
builddir="$srcdir/$pkgbase-$pkgver"
+options="$options !check"
prepare() {
default_prepare
cd "$builddir"
- git clone -b v4.0.0-alpha.6 git://github.com/twbs/bootstrap
+ git clone --depth=1 -b v4.0.0-alpha.6 \
+ git://github.com/twbs/bootstrap srht/scss/bootstrap
}
build() {
@@ 43,4 45,4 @@ package() {
python3 setup.py install --root="$pkgdir" --optimize=1
}
-sha512sums="9128a378264980aca13b11c20a6a884658f574dd26beebbe5b6a3cf135e10f407f27374c633d0a6f5cec067061351a6e808590e68255bae69f365edb91c71bab srht-0.10.2.tar.xz"
+sha512sums="85372540e058544612b52775c41647ebf7158bb2eca2e14012038746719bc9313110d3f9599a5dccf5235d95bdfdc86a68877305f4dc6b120ec3a20b1148972d srht-0.11.3.tar.xz"
A sr.ht/py3-sshpubkeys/APKBUILD => sr.ht/py3-sshpubkeys/APKBUILD +27 -0
@@ 0,0 1,27 @@
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=py3-sshpubkeys
+_pkgname=sshpubkeys
+pkgver=2.2.0
+pkgrel=0
+pkgdesc="OpenSSH public key parser for Python"
+url="https://github.com/ojarva/python-sshpubkeys"
+arch="noarch"
+license="BSD"
+depends="python3 py3-ecdsa py3-crypto"
+makedepends="py-setuptools"
+source="
+ $pkgname-$pkgver.tar.gz::https://github.com/ojarva/python-sshpubkeys/archive/v${pkgver}.tar.gz
+"
+builddir="$srcdir/python-${_pkgname}-${pkgver}"
+
+check() {
+ cd "$builddir"
+ python3 setup.py check
+}
+
+package() {
+ cd "$builddir"
+ python3 setup.py install --root="$pkgdir" --optimize=1
+}
+
+sha512sums="b1bfe62ed6a269b574671a54c83e51dbb4f002776505c861d7ebf395a581ff765901b2c2eb85dd1526d9026d196e688810eef15abdeef778a37d2890f9261a1f py3-sshpubkeys-2.2.0.tar.gz"