summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 40a58eb95a929dc5298e204c444fe92cec94fe3e (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
# Maintainer: Iván Zaera Avellón <ivan.zaera@posteo.net>
pkgname=bautista
pkgver=0.0.16
pkgrel=1
pkgdesc='A domotic butler bot'
arch=('pentium4' 'x86_64')
url='https://codeberg.com/ivan.zaera/bautista'
license=('GPL-3.0-or-later')
depends=(
	'nodejs'
)
makedepends=(
	'coreutils'
	'npm'
	'pkgconf'
	'rust'
	'shadow'
)
backup=(
	'etc/bautista/config.toml'
)
install='install.sh'

source=(
	"$pkgname-$pkgver.tar.gz::https://codeberg.org/ivan.zaera/$pkgname/archive/$pkgver.tar.gz"
)
sha256sums=("992d924478ab0693a030df0801d3db92defa9d499d89d13bb6a6d2d2072718bd")

build() {
	cd $srcdir/$pkgname
	make MODE=release build
}

check() {
	cd $srcdir/$pkgname
	make lint
	make test
}

package() {
	cd $srcdir/$pkgname

	cp -arv arch/root/* $pkgdir

	mkdir -p $pkgdir/usr/lib/bautista
	cp -arv rust/target/release/bautista-bot $pkgdir/usr/lib/bautista

	mkdir -p $pkgdir/usr/lib/bautista/node/meross-bridge
	cp -arv node/meross-bridge/*.js $pkgdir/usr/lib/bautista/node/meross-bridge
	cp -ar node/node_modules $pkgdir/usr/lib/bautista/node
}