summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6e05beec957eddd89f4af29ba126feb350db91ed (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
30
31
# Maintainer: Richard Neumann aka. schard <mail at richard dash neumann period de>

pkgname='speculum'
pkgver=1.7.10
pkgrel=1
pkgdesc='Yet another mirror list optimization tool'
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=("${pkgname}::git+${url}.git#tag=${pkgver}")
sha256sums=('SKIP')
backup=('etc/speculum.conf')

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

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

    install -Dm 644 "files/speculum.conf" "${pkgdir}/etc/speculum.conf"
    install -dm 755 "${pkgdir}/usr/lib/systemd/system/"

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