summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4971102c0ce243edf8bfca234a6704691b25d6c5 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Maintainer: Neboer <rubinposter@gmail.com>
# Contributor: Neboer <rubinposter@gmail.com>

pkgname=mbctl-git
pkgver=0.8.2
pkgver() {
    cd "$srcdir/Man8S-CTR"
    local v
    v="$(git describe --tags)"
    v="${v#v}"
    printf %s "${v//-/+}"
}

pkgrel=1
pkgdesc='Another container orchestration system. Man8S use yggdrasil as VPN networking, use containerd to maintain containers and images, and use a new kind of config manage various types of dirs of containers.'

arch=('any')
url="https://github.com/Neboer/Man8S-CTR.git"
license=('Apache-2.0')
depends=('yggdrasil' 'python' 'containerd' 'nerdctl' 'python-yaml' 'python-pydantic' 'python-typer' 'python-prettytable')
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
conflicts=('mbctl')
provides=('mbctl')
backup=('etc/mbctl/config.yaml')

source=(
    "git+https://github.com/Neboer/Man8S-CTR.git"
    "mbctl-startup.service"
    "mbctl-config.yaml"
)

b2sums=('SKIP'
        '80a7904057440819aacd89a25eb47fd5e8c9d5997778a7ca1e4a872cd5040880863e3f5f1aec188c60a59f96904340857ebd456e507b407c991356d3be17bc15'
        'f57ed2b5a309c1395a6252adc4613325c123986ba23f2e3de569ea0e445b4395dd4d312d281ebd215aa9638ced5eaa9844bb4f89700b3179bec13a61f3b39d20')

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

package() {
    cd "$srcdir"
    install -vDm644 mbctl-startup.service -t "$pkgdir/usr/lib/systemd/system/"
    install -vDm644 mbctl-config.yaml "$pkgdir/etc/mbctl/config.yaml"

    cd "$srcdir/Man8S-CTR"
    python -m installer --destdir "$pkgdir" dist/*.whl
}