summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 00c1727796eefecfde656bc4e43d59b96e550d23 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Maintainer: Your Name <youremail@domain.com>

pkgname=('atoms-git' 'atoms-cli-git' 'atoms-core-git')
pkgbase='atoms-git'
_pkgname=Atoms
pkgver=r282.db7b25d
pkgrel=2
pkgdesc="Easily manage Linux chroot(s)"
arch=('any')
url="https://github.com/AtomsDevs/Atoms"
license=('GPL3')
depends=('libadwaita' 'podman' 'proot' 'python-certifi' 'python-chardet' 'python-idna' 'python-orjson' 'python-requests' 'python-tabulate' 'python-uproot' 'python-urllib3' 'talloc' 'vte4' 'servicectl')
makedepends=('git' 'meson' 'python-setuptools')
checkdepends=('appstream-glib' 'python-pytest')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=(
  "git+$url.git"
  "git+https://github.com/AtomsDevs/atoms-cli.git"
  "git+https://github.com/AtomsDevs/atoms-core.git"
  "git+https://github.com/AtomsDevs/servicectl.git"
)
b2sums=('SKIP'
        'SKIP'
        'SKIP'
        'SKIP')

prepare() {
  cd "${_pkgname%-git}"
  git submodule init
  git config submodule."atoms-cli".url "${srcdir}"/atoms-cli
  git config submodule."atoms-core".url "${srcdir}"/atoms-core
  git config submodule."servicectl".url "${srcdir}"/servicectl
  git submodule update --init --recursive
}

pkgver() {
  cd "${_pkgname%-git}"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  arch-meson "${_pkgname%-git}" build
  meson compile -C build
}

check() {
  meson test -C build || :
}

check_atoms-cli-git(){
  cd "${pkgbase%-git}-cli"
  python setup.py pytest || :
}

check_atoms-core-git(){
  cd "${pkgbase%-git}-core"
  python setup.py pytest || :
}

package_atoms-git() {
  depends=('atoms-cli' 'atoms-core' 'servicectl')
  meson install -C build --destdir "$pkgdir"
}

package_atoms-cli-git() {
  pkgdesc='Atoms CLI allows you to create and manage your atoms via the command line.'
  depends=('python-tabulate' 'atoms-core')
  provides=("${pkgname%-git}")
  conflicts=("${pkgname%-git}")

  cd "${pkgbase%-git}-cli"
  python setup.py install --root="$pkgdir" --optimize=1
}

package_atoms-core-git() {
  pkgdesc='Atoms Core allows you to create and manage your own chroots and podman containers.'
  depends=('python-orjson')
  provides=("${pkgname%-git}")
  conflicts=("${pkgname%-git}")

  cd "${pkgbase%-git}-core"
  python setup.py install --root="$pkgdir" --optimize=1
}