diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..049eb33 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Jasur Sadikov +pkgname=mud +pkgver=v1.0.2 +pkgrel=1 +pkgdesc="Multi repository git utility. Manage multiple git-repositories simultaneously." +arch=('any') +url="https://github.com/jasursadikov/mud" +license=('MIT') +depends=('python' 'python-prettytable') +makedepends=('python-build' 'python-installer' 'git') +source=("${_pkgname}::git+https://github.com/jasursadikov/mud.git") +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/$_pkgname" + _ver=$(grep '^version =' pyproject.toml | cut -d '"' -f2) + _rev=$(git rev-list --count HEAD) + _commit=$(git rev-parse --short HEAD) + echo "${_ver}.r${_rev}.g${_commit}" +} + +build() { + cd "$srcdir/$_pkgname" + python -m build --wheel --no-isolation +} + +package() { + cd "$srcdir/$_pkgname" + python -m installer --destdir="$pkgdir" dist/*.whl + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +}