summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 65f4912c5fce5206e4fdf0b6174d88f317f5fe57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Maintainer: Richard Neumann aka. schard <mail at richard dash neumann period de>

pkgname='mollyguardctl'
pkgver=1.3.10
pkgrel=1
pkgdesc='Guards your system from accidental reboots and shutdowns'
arch=('any')
url="https://github.com/coNQP/${pkgname}"
license=('GPLv3')
depends=('python' 'python-setuptools')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools-scm' 'python-wheel')
source=("git+${url}.git#tag=${pkgver}")
md5sums=('SKIP')

build() {
    cd "${srcdir}/${pkgname}"
    python -m build --wheel --no-isolation
}

package() {
    cd "${srcdir}/${pkgname}"
    python -m installer --destdir="$pkgdir" dist/*.whl

    install -dm 755 "${pkgdir}/usr/lib/systemd/system"

    for UNIT in *.service; do
        install -m 644 "${UNIT}" "${pkgdir}/usr/lib/systemd/system/"
    done
}