mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-03-04 09:19:47 +00:00
This was initally generated by ai, but later has been heavily edited. The reason why it has been implemented is that there are plans to implement more features to ui, but it becomes hard to add new features to plain js, so I decided to rewrite it in typescript. Yet because it is still ai slop, it is still possible to enable old interface via configuration, even though new interface is turned on by default to get feedback
97 lines
3.9 KiB
Bash
97 lines
3.9 KiB
Bash
# Maintainer: Evgeniy Alekseev
|
|
|
|
pkgbase='ahriman'
|
|
pkgname=('ahriman' 'ahriman-core' 'ahriman-triggers' 'ahriman-web')
|
|
pkgver=2.20.0rc4
|
|
pkgrel=1
|
|
pkgdesc="ArcH linux ReposItory MANager"
|
|
arch=('any')
|
|
url="https://ahriman.readthedocs.io/"
|
|
license=('GPL-3.0-or-later')
|
|
depends=('devtools>=1:1.0.0' 'git' 'pyalpm' 'python-bcrypt' 'python-filelock' 'python-inflection' 'python-pyelftools' 'python-requests')
|
|
makedepends=('npm' 'python-build' 'python-flit' 'python-installer' 'python-wheel')
|
|
source=("https://github.com/arcan1s/ahriman/releases/download/$pkgver/$pkgbase-$pkgver.tar.gz"
|
|
"$pkgbase.sysusers"
|
|
"$pkgbase.tmpfiles")
|
|
|
|
build() {
|
|
cd "$pkgbase-$pkgver"
|
|
|
|
python -m build --wheel --no-isolation
|
|
|
|
cd "frontend"
|
|
npm install --cache "$srcdir/npm-cache"
|
|
npm run build
|
|
}
|
|
|
|
package_ahriman() {
|
|
pkgname='ahriman'
|
|
pkgdesc="ArcH linux ReposItory MANager (meta package)"
|
|
depends=("$pkgbase-core=$pkgver" "$pkgbase-triggers=$pkgver" "$pkgbase-web=$pkgver")
|
|
}
|
|
|
|
package_ahriman-core() {
|
|
pkgname='ahriman-core'
|
|
optdepends=('ahriman-triggers: additional extensions for the application'
|
|
'ahriman-web: web server'
|
|
'ipython: an enhanced shell interpreter'
|
|
'python-boto3: sync to s3'
|
|
'python-cerberus: configuration validator'
|
|
'python-matplotlib: usage statistics chart'
|
|
'python-requests-unixsocket2: client report to web server by unix socket'
|
|
'python-jinja: html report generation'
|
|
'python-systemd: journal support'
|
|
'rsync: sync by using rsync')
|
|
install="$pkgbase.install"
|
|
backup=('etc/ahriman.ini'
|
|
'etc/ahriman.ini.d/00-housekeeping.ini'
|
|
'etc/ahriman.ini.d/logging.ini')
|
|
|
|
cd "$pkgbase-$pkgver"
|
|
|
|
python -m installer --destdir="$pkgdir" "dist/$pkgbase-$pkgver-py3-none-any.whl"
|
|
python subpackages.py "$pkgdir" "$pkgname"
|
|
|
|
# keep usr/share configs as reference and copy them to /etc
|
|
install -Dm644 "$pkgdir/usr/share/$pkgbase/settings/ahriman.ini" "$pkgdir/etc/ahriman.ini"
|
|
install -Dm644 "$pkgdir/usr/share/$pkgbase/settings/ahriman.ini.d/00-housekeeping.ini" "$pkgdir/etc/ahriman.ini.d/00-housekeeping.ini"
|
|
install -Dm644 "$pkgdir/usr/share/$pkgbase/settings/ahriman.ini.d/logging.ini" "$pkgdir/etc/ahriman.ini.d/logging.ini"
|
|
|
|
install -Dm644 "$srcdir/$pkgbase.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgbase.conf"
|
|
install -Dm644 "$srcdir/$pkgbase.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgbase.conf"
|
|
}
|
|
|
|
package_ahriman-triggers() {
|
|
pkgname='ahriman-triggers'
|
|
pkgdesc="ArcH linux ReposItory MANager, additional extensions"
|
|
depends=("$pkgbase-core=$pkgver")
|
|
backup=('etc/ahriman.ini.d/00-triggers.ini')
|
|
|
|
cd "$pkgbase-$pkgver"
|
|
|
|
python -m installer --destdir="$pkgdir" "dist/$pkgbase-$pkgver-py3-none-any.whl"
|
|
python subpackages.py "$pkgdir" "$pkgname"
|
|
|
|
install -Dm644 "$pkgdir/usr/share/$pkgbase/settings/ahriman.ini.d/00-triggers.ini" "$pkgdir/etc/ahriman.ini.d/00-triggers.ini"
|
|
}
|
|
|
|
package_ahriman-web() {
|
|
pkgname='ahriman-web'
|
|
pkgdesc="ArcH linux ReposItory MANager, web server"
|
|
depends=("$pkgbase-core=$pkgver" 'python-aiohttp-cors' 'python-aiohttp-jinja2')
|
|
optdepends=('python-aioauth-client: OAuth2 authorization support'
|
|
'python-aiohttp-apispec>=3.0.0: autogenerated API documentation'
|
|
'python-aiohttp-openmetrics: HTTP metrics support'
|
|
'python-aiohttp-security: authorization support'
|
|
'python-aiohttp-session: authorization support'
|
|
'python-cryptography: authorization support')
|
|
backup=('etc/ahriman.ini.d/00-web.ini')
|
|
|
|
cd "$pkgbase-$pkgver"
|
|
|
|
python -m installer --destdir="$pkgdir" "dist/$pkgbase-$pkgver-py3-none-any.whl"
|
|
python subpackages.py "$pkgdir" "$pkgname"
|
|
|
|
install -Dm644 "$pkgdir/usr/share/$pkgbase/settings/ahriman.ini.d/00-web.ini" "$pkgdir/etc/ahriman.ini.d/00-web.ini"
|
|
}
|