mirror of
				https://github.com/arcan1s/ahriman.git
				synced 2025-10-31 13:53:41 +00:00 
			
		
		
		
	Previous solution, well, worked kinda fine-ish, though we have much better mechanisms to do so
		
			
				
	
	
		
			93 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			93 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
| # Maintainer: Evgeniy Alekseev
 | |
| 
 | |
| pkgbase='ahriman'
 | |
| pkgname=('ahriman' 'ahriman-core' 'ahriman-triggers' 'ahriman-web')
 | |
| pkgver=2.19.0
 | |
| 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-inflection' 'python-pyelftools' 'python-requests')
 | |
| makedepends=('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
 | |
| }
 | |
| 
 | |
| 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"
 | |
| }
 |