summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bdfedd15904c6d02b3852478e8da3d8e310f05fa (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>

pkgname=mission-center-git
_pkgname=${pkgname%-git}
pkgver=1.2.0.r19.g648cb5f
pkgrel=1
pkgdesc="Monitor your CPU, Memory, Disk, Network and GPU usage"
arch=('x86_64' 'aarch64')
url="https://gitlab.com/${_pkgname}-devs/${_pkgname}"
license=('GPL-3.0-or-later')
depends=('dmidecode' 'libadwaita' 'nvtop' 'protobuf')
makedepends=('git' 'blueprint-compiler' 'cargo' 'meson' 'cmake')
checkdepends=('appstream-glib')
conflicts=("${_pkgname}")
provides=("${_pkgname}")
source=("git+${url}.git"
	"git+https://gitlab.com/${_pkgname}-devs/gng.git"
	"git+https://gitlab.com/${_pkgname}-devs/graph-widget.git"
	"git+https://gitlab.com/${_pkgname}-devs/app-detection.git")
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP')
options=('!lto')

pkgver() {
	cd "${_pkgname}/"
	git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//'
}

prepare() {
	cd "${_pkgname}/"
	git submodule init
	git config submodule.subprojects/magpie.url "${srcdir}/gng"
	git config submodule.subprojects/graph-widget.url "${srcdir}/graph-widget"
	git -c protocol.file.allow=always submodule update

	cd subprojects/magpie
	git submodule init
	git config submodule.platform-linux/crates/app-rummage.url "${srcdir}/app-detection"
	git -c protocol.file.allow=always submodule update

	cargo fetch --locked --target host-tuple
}

build() {
	meson setup --prefix=/usr --buildtype=release "${_pkgname}" build
	meson compile -C build
}

check() {
	meson test -C build --print-errorlogs
}

package() {
	meson install -C build --no-rebuild --destdir "${pkgdir}"
}