summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9282538489b137ce1f528e18a8dad830f12c9555 (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
# Maintainer: Rafael Dominiquini <rafaeldominiquini at gmail dot com>

pkgauthor=jhuckaby
pkgname=performa
pkgver=1.1.4
pkgrel=1
pkgdesc="A multi-server monitoring system"

url="https://github.com/${pkgauthor}/${pkgname}"

arch=('any')
license=('MIT')

depends=('bash' 'zsh' 'nodejs' 'python')
makedepends=('npm')

install="$pkgname.install"

backup=("opt/${pkgname}/conf/config.json"
        "usr/lib/systemd/system/${pkgname}.service")

source=("https://github.com/${pkgauthor}/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz"
        "${pkgname}.service")
sha256sums=('4028bf67371e69fe49adb4169c10443942e07d28a40e74234c14f24037fadca0'
            '6d17185565ce6015abf2fb976cf1bfc407ab605f48c3c5280e44cf05159a3f23')

provides=("${pkgname}")

prepare() {
    cd "${srcdir}/${pkgname}-${pkgver}"
}

build() {
    cd "${srcdir}/${pkgname}-${pkgver}"

    npm install
    node bin/build.js dist
}

package() {
    cd "$srcdir/${pkgname}-${pkgver}"

    install -d "${pkgdir}/opt/${pkgname}"
    cp -a ./* "${pkgdir}/opt/${pkgname}/"

    install -Dm0644 -t "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" "LICENSE.md"

    rm -rf "${pkgdir}/opt/${pkgname}/.git"
    install -Dm644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
}