A sr.ht/lists.sr.ht/APKBUILD => sr.ht/lists.sr.ht/APKBUILD +42 -0
@@ 0,0 1,42 @@
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=lists.sr.ht
+pkgver=0.14.1
+pkgrel=0
+pkgdesc="sr.ht mailing list service"
+url="https://git.sr.ht/~sircmpwn/lists.sr.ht"
+arch="noarch"
+license="AGPLv3"
+depends="
+ py3-srht
+ py3-celery
+ py3-aiosmtpd
+ py3-asyncpg
+ py3-redis
+ py3-unidiff
+ py3-gunicorn
+"
+makedepends="py-setuptools nodejs sassc"
+subpackages="${pkgname}-openrc"
+source="
+ $pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/$pkgname/archive/$pkgver.tar.gz
+ lists.sr.ht.init
+"
+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
+ mkdir -p "$pkgdir"/etc/init.d
+ install -Dm755 "$srcdir"/lists.sr.ht.init "$pkgdir"/etc/init.d/lists.sr.ht
+}
+
+sha512sums="80132b5b6af35902ac40be9202916a94257e62b348d5a60bf79fc6faeda319d7ed1639e486ab21c5906818c0b7176dc5658f995114343bf647ef46e803350116 lists.sr.ht-0.14.1.tar.gz
+12d18641115a9f78e25f19a45686192d4f1123a58bfd8f5cd0a0e6e5b360af422309e405eedb46805a0f57913d7f2b0b99550895fa0e44654ed467a934a10fc6 lists.sr.ht.init"
A sr.ht/lists.sr.ht/lists.sr.ht.init => sr.ht/lists.sr.ht/lists.sr.ht.init +37 -0
@@ 0,0 1,37 @@
+#!/sbin/openrc-run
+name="lists.sr.ht"
+description="lists.sr.ht service"
+
+# Override these with /etc/conf.d/lists.sr.ht
+LISTS_USER=${LISTS_USER:-listssrht}
+LISTS_BIND=${LISTS_BIND:-127.0.0.1:5001}
+LOCAL_PG=${LOCAL_PG:-yes}
+LOGS=/var/log/lists.sr.ht.log
+
+depend() {
+ need net
+ need redis
+ [ "$LOCAL_PG" == "yes" ] && need postgresql
+}
+
+start() {
+ ebegin "Starting $name"
+ touch "$LOGS"
+ chown ${LISTS_USER} "$LOGS"
+ start-stop-daemon \
+ -u ${LISTS_USER} \
+ -1 "$LOGS" \
+ -2 "$LOGS" \
+ --background \
+ --make-pidfile \
+ --pidfile /run/$name.pid \
+ --exec /usr/bin/gunicorn -- \
+ listssrht.app:app -b ${LISTS_BIND}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $name"
+ start-stop-daemon --stop --exec /usr/bin/gunicorn --pidfile /run/$name.pid
+ eend $?
+}
A sr.ht/lists.sr.ht/lists.sr.ht.post-install => sr.ht/lists.sr.ht/lists.sr.ht.post-install +3 -0
@@ 0,0 1,3 @@
+#!/bin/sh
+addgroup -S listssrht || true
+adduser -SDH -s /sbin/nologin -g listssrht listssrht || true
A sr.ht/lists.sr.ht/lists.sr.ht.post-upgrade => sr.ht/lists.sr.ht/lists.sr.ht.post-upgrade +2 -0
@@ 0,0 1,2 @@
+#!/bin/sh
+listssrht-migrate -a upgrade head
A sr.ht/py-aiosmtpd/APKBUILD => sr.ht/py-aiosmtpd/APKBUILD +44 -0
@@ 0,0 1,44 @@
+# Contributor: Drew DeVault <sir@cmpwn.com>
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=py-aiosmtpd
+_pkgname=aiosmtpd
+pkgver=1.1
+pkgrel=0
+pkgdesc="A reimplementation of the Python stdlib smtpd.py based on asyncio"
+url="https://github.com/aio-libs/aiosmtpd"
+arch="noarch"
+license="Apache-2.0"
+depends="py-atpublic"
+subpackages="py3-${pkgname#py-}:_py3"
+makedepends="python3-dev py-setuptools pytest"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ pytest-3
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py3() {
+ cd "$builddir"
+ _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="b61df616f2e14d1da67ac05149543bf48b14a31d44437d9a1dd11b166b98b56220c00e7c55e18d4fd99872d724e23f272922dd3548150632a189d9cb9b652883 aiosmtpd-1.1.tar.gz"
A sr.ht/py-asyncpg/APKBUILD => sr.ht/py-asyncpg/APKBUILD +39 -0
@@ 0,0 1,39 @@
+# Contributor: Drew DeVault <sir@cmpwn.com>
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=py-asyncpg
+_pkgname=asyncpg
+pkgver=0.18.2
+pkgrel=0
+pkgdesc="An asyncio PostgreSQL driver"
+url="https://github.com/MagicStack/asyncpg"
+arch="noarch"
+license="Apache-2.0"
+subpackages="py3-${pkgname#py-}:_py3:all"
+makedepends="python3-dev py-setuptools cython cython-dev"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
+options="!check" # requires crazy postgres shit
+
+build() {
+ cd "$builddir"
+ python3 setup.py build
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py3() {
+ cd "$builddir"
+ _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="58c2b2c8147743dad756278cb6e808711b4710d2859cea73c040b7864981bb36e20d096022f3e690f62bdf70f28f54c8856b5195809234097575af2061f39d8f asyncpg-0.18.2.tar.gz"
A sr.ht/py-atpublic/APKBUILD => sr.ht/py-atpublic/APKBUILD +43 -0
@@ 0,0 1,43 @@
+# Contributor: Drew DeVault <sir@cmpwn.com>
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=py-atpublic
+_pkgname=atpublic
+pkgver=0.5
+pkgrel=0
+pkgdesc="@public for populating __all__"
+url="https://gitlab.com/warsaw/public"
+arch="noarch"
+license="Apache-2.0"
+subpackages="py3-${pkgname#py-}:_py3"
+makedepends="python3-dev py-setuptools pytest"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ pytest-3
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py3() {
+ cd "$builddir"
+ _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="6e6fab92d6cf47428b4e2f2617598275a8c61d9d922f6a29c02ce5e9c48e63d1ba6225dd31a23f3c008047d1a9fe11ad8d81e155b76dd09ccd389701c083d16c atpublic-0.5.tar.gz"
A sr.ht/py-unidiff/APKBUILD => sr.ht/py-unidiff/APKBUILD +58 -0
@@ 0,0 1,58 @@
+# Contributor: Drew DeVault <sir@cmpwn.com>
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=py-unidiff
+_pkgname=unidiff
+pkgver=0.5.5
+pkgrel=0
+pkgdesc="Unified diff python parsing/metadata extraction library"
+url="https://pypi.org/project/unidiff/"
+arch="noarch"
+license="MIT"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+makedepends="
+ python2 python3 py-setuptools pytest
+"
+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
+}
+
+build() {
+ cd "$builddir"
+ python2 setup.py build
+ cd "$builddir"-py3
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ python2 setup.py test
+ cd "$builddir"-py3
+ python3 setup.py test
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ cd "$builddir"
+ _py python2
+}
+
+_py3() {
+ cd "$builddir"
+ _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="eaa71dfb6c449f18dd23204070c8afa8185bc64151519e8b85a82978ab51984aafd2e26b948657352f8b0277e7fbfe68c71e0b7cb3fb56cd3e789a77296f5c9e unidiff-0.5.5.tar.gz"