mirror of
				https://github.com/arcan1s/ahriman.git
				synced 2025-11-04 07:43:42 +00:00 
			
		
		
		
	* move argument parsers to handlers themselves
* use hatchling instead of flit
* Revert "use hatchling instead of flit"
This reverts commit d18d146d79.
* add package-splitt script
* replace simplify walk method
* split packages
* explicitly install packages
* separate support triggers from main package
* add docs examples
* sort actions
* docs update
* add metapackage
* review fixes
		
	
		
			
				
	
	
		
			88 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			88 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
# Maintainer: Evgeniy Alekseev
 | 
						|
 | 
						|
pkgbase='ahriman'
 | 
						|
pkgname=('ahriman' 'ahriman-core' 'ahriman-triggers' 'ahriman-web')
 | 
						|
pkgver=2.15.2
 | 
						|
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'
 | 
						|
                '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/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/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-apispec>=3.0.0' 'python-aiohttp-cors' 'python-aiohttp-jinja2')
 | 
						|
    optdepends=('python-aioauth-client: OAuth2 authorization 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"
 | 
						|
}
 |