From 858f0b3da32818ff5737a834865128124a6634ee Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 10 Jan 2023 14:16:39 -0500 Subject: [PATCH] user/calibre-web: match to MR --- user/calibre-web/APKBUILD | 77 ++++++++++++++++-------------- user/calibre-web/calibre-web.conf | 6 +++ user/calibre-web/calibre-web.initd | 49 +++++++------------ user/py3-goodreads/APKBUILD | 22 +++++---- user/py3-iso639/APKBUILD | 23 ++++----- user/py3-rauth/APKBUILD | 20 ++++---- user/py3-wand/APKBUILD | 14 +++--- 7 files changed, 106 insertions(+), 105 deletions(-) create mode 100644 user/calibre-web/calibre-web.conf diff --git a/user/calibre-web/APKBUILD b/user/calibre-web/APKBUILD index e958965..2859b17 100644 --- a/user/calibre-web/APKBUILD +++ b/user/calibre-web/APKBUILD @@ -1,53 +1,58 @@ -# Maintainer: Spencer Muise +# Maintainer: Antoine Martin (ayakael) +# Contributor: Antoine Martin (ayakael) pkgname=calibre-web -pkgver=0.6.14 +pkgver=0.6.19 pkgrel=0 pkgdesc="Web app for browsing, reading and downloading eBooks stored in a Calibre database" arch='noarch' url="https://github.com/janeczku/calibre-web" -license='GPL3' -depends=' - python3 - py3-babel - py3-flask-babel - py3-flask-login - py3-flask-principal - py3-flask - py3-pypdf2 - py3-tz - py3-requests - py3-sqlalchemy - py3-tornado - py3-wand - py3-unidecode - py3-blinker - py3-goodreads - py3-levenshtein - py3-iso639' - +license='GPL-3.0-only' +depends=" + python3 + py3-babel + py3-flask-babel + py3-flask-login + py3-flask-principal + py3-flask + py3-pypdf2 + py3-tz + py3-requests + py3-sqlalchemy + py3-tornado + py3-wand + py3-unidecode + py3-blinker + py3-goodreads + py3-levenshtein + py3-iso639 + " source=" - $pkgname-$pkgver.tar.gz::https://github.com/janeczku/calibre-web/archive/${pkgver}.tar.gz - calibre-web.initd" - -options=!check + $pkgname-$pkgver.tar.gz::https://github.com/janeczku/calibre-web/archive/$pkgver.tar.gz + calibre-web.conf + calibre-web.initd + " +options="!check" # No testsuite subpackages="$pkgname-openrc" +pkgusers="calibre-web" +pkggroups="www-data" prepare() { - cd $srcdir/$pkgname-$pkgver - sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' cps.py - + default_prepare + sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' cps.py } package() { - cd $srcdir/$pkgname-$pkgver - install -d -m 755 "${pkgdir}/usr/share/webapps/calibre-web" - cp -a "${srcdir}/$pkgname-$pkgver"/* "${pkgdir}/usr/share/webapps/calibre-web/" - rm -rf "${pkgdir}/usr/lib/calibre-web/.git" + local wwwdir="/usr/share/webapps/$pkgname" - install -D -m 644 "${srcdir}/calibre-web.initd" "${pkgdir}/etc/init.d/calibre-web" + install -d -m 755 "$pkgdir"/$wwwdir + cp -a "$srcdir"/$pkgname-$pkgver "$pkgdir"/$wwwdir + + install -D -m 755 "$srcdir"/calibre-web.initd "$pkgdir"/etc/init.d/calibre-web + install -D -m 644 "$srcdir"/calibre-web.conf "$pkgdir"/etc/conf.d/calibre-web } sha512sums=" -d7dbadea007c9cc92416aa94a04b5ff80abfbbb44cb683daa69581ec1cad5867cb452c90512281651b0667bb929b6f306db365733d9f6157f0a207c93591d8c3 calibre-web-0.6.14.tar.gz -3daa5b02e3731ec9d57ab372d31499e4cfd5d91583a4c28a373fc2e9a4d60b5d6a6a0c83bd94e05f6b80cc2419e34f9cc4d452481d3fafb590eb223dff4835ee calibre-web.initd +a69706c7615576f2ddc94dc1e5b30808dfe84d7d79558e018fa65daef34a6294afb27170d97536e2a350fb664719b3f1ad3d1cefc07297a371d18dce4e43e6be calibre-web-0.6.19.tar.gz +4aba825eb12f44eb0912cc6981b46bec9b77ad114627564c9c7585862a099c7d1ff8deec5f15d047319805e2b9a3e2d128b2d1292dd92293a7e72359009a480f calibre-web.conf +62859a8a304216dc0dbfb7f2e8144a50d348c6621f5b292c08aa97a872ada67b52d36b567546fd0f4c439dbefe0bbe0e4fb1e1affbe507278b4a8d36ed3fa2a9 calibre-web.initd " diff --git a/user/calibre-web/calibre-web.conf b/user/calibre-web/calibre-web.conf new file mode 100644 index 0000000..384b3de --- /dev/null +++ b/user/calibre-web/calibre-web.conf @@ -0,0 +1,6 @@ +CALIBREWEB_USER=calibre-web +CALIBREWEB_GROUP=www-data +CALIBREWEB_PORT=443 +CALIBREWEB_DB="/var/lib/calibre-web/app.db" +CALIBREWEB_HOME=/var/lib/calibre-web + diff --git a/user/calibre-web/calibre-web.initd b/user/calibre-web/calibre-web.initd index 77cd4c5..5578315 100644 --- a/user/calibre-web/calibre-web.initd +++ b/user/calibre-web/calibre-web.initd @@ -1,36 +1,21 @@ #!/sbin/openrc-run -# Distributed under the terms of the GNU General Public License, v2 or later + +name=$RC_SVCNAME +cfgfile="/etc/conf.d/$RC_SVCNAME" +pidfile="/var/run/$RC_SVCNAME/$RC_SVCNAME.pid" +command="/usr/share/webapps/$RC_SVCNAME/cps.py" +command_args="-p $CALIBREWEB_DB" +command_user="$CALIBREWEB_USER" +command_group="$CALIBREWEB_GROUP" +start_stop_daemon_args="" +command_background="yes" +output_log="/var/log/$RC_SVCNAME/$RC_SVCNAME.log" +error_log="/var/log/$RC_SVCNAME/$RC_SVCNAME.err" -CALIBREWEB_HOME=${CALIBREWEB_HOME:-/var/lib/${SVCNAME}} -CALIBREWEB_USER=${CALIBREWEB_USER:-${SVCNAME}} -NICELEVEL=1 -PIDFILE=/run/calibre-web/calibre-web.pid +start_pre() { + checkpath --directory --owner $command_user:$command_group --mode 0775 \ + /var/run/$RC_SVCNAME /var/log/$RC_SVCNAME -depend() { - after net + export CALIBREPORT=$CALIBREWEB_PORT + export CALIBRE_DBPATH=$CALIBREWEB_HOME } - -start() { - checkpath -dq -o ${CALIBREWEB_USER}:${CALIBREWEB_USER} -m 755 /run/calibre-web/ - ebegin "Starting ${SVCNAME}" - start-stop-daemon \ - --start --user "${CALIBREWEB_USER}" --name calibre-web \ - --env CALIBRE_DBPATH="${CALIBREWEB_HOME}" \ - --env CALIBRE_PORT=443 \ - --exec /usr/share/webapps/calibre-web/cps.py \ - --pidfile="${PIDFILE}" \ - --nicelevel "${NICELEVEL}" \ - -- \ - -p /var/lib/calibre-web/app.db & - eend $? -} - -stop() { - ebegin "Stopping ${SVCNAME}" - start-stop-daemon --stop --user "${CALIBREWEB_USER}" \ - --pidfile "${PIDFILE}" \ - --wait 15000 \ - --progress - eend $? -} - diff --git a/user/py3-goodreads/APKBUILD b/user/py3-goodreads/APKBUILD index e3bbf56..20bfe0d 100644 --- a/user/py3-goodreads/APKBUILD +++ b/user/py3-goodreads/APKBUILD @@ -1,25 +1,27 @@ -# Maintainer: Antoine Martin +# Maintainer: Antoine Martin (ayakael) +# Contributor: Antoine Martin (ayakael) -_pkgbase=goodreads pkgname=py3-goodreads +_pkgname=goodreads pkgver=0.3.2 pkgrel=0 pkgdesc="Python extension for computing string edit distances and similarities" url="https://pypi.python.org/pypi/Goodreads" -license='GPL' +license='MIT' arch='noarch' depends='python3' makedepends='py3-setuptools python3-dev py3-xmltodict py3-requests py3-rauth' -source="$_pkgbase-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/g/$_pkgbase/$_pkgbase-$pkgver.tar.gz" -options=!check +source="$_pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/g/$_pkgname/$_pkgname-$pkgver.tar.gz" +options="!check" # No testsuite +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd $srcdir/$_pkgbase-$pkgver - python3 setup.py build + python3 setup.py build } package() { - cd $srcdir/$_pkgbase-$pkgver - python3 setup.py install -O1 --prefix=/usr --root="$pkgdir" + python3 setup.py install -O1 --prefix=/usr --root="$pkgdir" } -sha512sums="2c1f7be226bbbac3d60247a5dddc06c48ad1d72790e4ce61c8c369100358965926422958563f153661b91b561414e4b573b95098808cc25ac5c7e6edfc46e344 goodreads-0.3.2.tar.gz" +sha512sums=" +2c1f7be226bbbac3d60247a5dddc06c48ad1d72790e4ce61c8c369100358965926422958563f153661b91b561414e4b573b95098808cc25ac5c7e6edfc46e344 goodreads-0.3.2.tar.gz +" diff --git a/user/py3-iso639/APKBUILD b/user/py3-iso639/APKBUILD index ad9e0ef..7f18a40 100644 --- a/user/py3-iso639/APKBUILD +++ b/user/py3-iso639/APKBUILD @@ -1,30 +1,31 @@ -# Maintainer: Josip Ponjavic +# Maintainer: Antoine Martin (ayakael) +# Contributor: Antoine Martin (ayakael) pkgname=py3-iso639 -_libname=iso639 +_pkgname=iso639 pkgver=0.4.5 pkgrel=0 pkgdesc="Python library for ISO 639 standard" arch='noarch' url="https://github.com/noumar/iso639" -license='AGPL3' +license='AGPL-3.0-only' depends="python3" makedepends='py3-setuptools' -source="$_libname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz" +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "$srcdir/$_libname-$pkgver" - python3 setup.py build + python3 setup.py build } check() { - cd "$srcdir/$_libname-$pkgver" - python3 setup.py test || warning "Tests failed" + python3 setup.py test || warning "Tests failed" } package() { - cd "$srcdir/$_libname-$pkgver" - python3 setup.py install --skip-build -O1 --root="$pkgdir" + python3 setup.py install --skip-build -O1 --root="$pkgdir" } -sha512sums="6201535804d7d1af77f1f2961d8eb1c2fae323dc5d4361b44e23caa834de1dcb9abd257cda4068f12a1a2984000edfa49cb852ecef5baee2d78d9c9e587202e4 iso639-0.4.5.tar.gz" +sha512sums=" +6201535804d7d1af77f1f2961d8eb1c2fae323dc5d4361b44e23caa834de1dcb9abd257cda4068f12a1a2984000edfa49cb852ecef5baee2d78d9c9e587202e4 py3-iso639-0.4.5.tar.gz +" diff --git a/user/py3-rauth/APKBUILD b/user/py3-rauth/APKBUILD index 416cea7..f9adf47 100644 --- a/user/py3-rauth/APKBUILD +++ b/user/py3-rauth/APKBUILD @@ -1,7 +1,8 @@ -# Maintainer: Antoine Martin +# Maintainer: Antoine Martin (ayakael) +# Contributor: Antoine Martin (ayakael) -_pkgbase=rauth pkgname=py3-rauth +_pkgname=rauth pkgver=0.7.3 pkgrel=0 pkgdesc="A Python library for OAuth 1.0/a, 2.0, and Ofly" @@ -10,17 +11,18 @@ url="https://github.com/maxcountryman/rauth" license="MIT" depends="py3-requests" makedepends="py3-setuptools" -source="$_pkgbase-$pkgver.tar.gz::https://pypi.python.org/packages/source/r/${_pkgbase}/${_pkgbase}-${pkgver}.tar.gz" -options=!check +source="$_pkgname-$pkgver.tar.gz::https://pypi.python.org/packages/source/r/$_pkgname/$_pkgname-$pkgver.tar.gz" +options="!check" # No testsuite +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "${srcdir}/${_pkgbase}-${pkgver}" - python3 setup.py build + python3 setup.py build } package() { - cd "${srcdir}/${_pkgbase}-${pkgver}" - python3 setup.py install --skip-build --root="${pkgdir}" --optimize=1 + python3 setup.py install --skip-build --root="$pkgdir" --optimize=1 } -sha512sums="8bb6d10e5d4ddb583c45e3bf166051b8edde8193cd10da8c1a623908d2cc5a3a2cbc9065d5fa397188414e72fa66166051893e4ba956369b3f0f850ae823837e rauth-0.7.3.tar.gz" +sha512sums=" +8bb6d10e5d4ddb583c45e3bf166051b8edde8193cd10da8c1a623908d2cc5a3a2cbc9065d5fa397188414e72fa66166051893e4ba956369b3f0f850ae823837e rauth-0.7.3.tar.gz +" diff --git a/user/py3-wand/APKBUILD b/user/py3-wand/APKBUILD index 787f0bc..8c2f6e5 100644 --- a/user/py3-wand/APKBUILD +++ b/user/py3-wand/APKBUILD @@ -1,6 +1,8 @@ -# Maintainer: Felix Yan +# Maintainer: Antoine Martin (ayakael) +# Contributor: Antoine Martin (ayakael) pkgname=py3-wand +_pkgname=wand pkgver=0.6.5 pkgrel=0 pkgdesc="Ctypes-based simple MagickWand API binding for Python" @@ -10,16 +12,14 @@ arch='noarch' depends='imagemagick libxml2 python3' makedepends='py3-setuptools' source="$pkgname-$pkgver.tar.gz::https://github.com/emcconville/wand/archive/$pkgver.tar.gz" -options=!check +options="!check" # No testsuite +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd $srcdir/wand-$pkgver - python3 setup.py build + python3 setup.py build } package() { - cd $srcdir/wand-$pkgver - python3 setup.py install --root="$pkgdir" --optimize=1 - install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + python3 setup.py install --root="$pkgdir" --optimize=1 } sha512sums="453f611fe33b0e5490ea2d3a472dc3f90bae8f123c3dc801ab80c74a12744ee58bf995eb34c0b1233dadb7d6eba864a107f10177d2b1dff325ed94115973b815 py3-wand-0.6.5.tar.gz"