aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c85d31cb84fbc87aea39c219dcdfaa3439cd917c (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
# Maintainer: James Read <contact@jread.com>
pkgname=olivetin
pkgver=2024.03.24
pkgrel=4
pkgdesc="Give safe and simple access to predefined shell commands from a web interface."
arch=('x86_64')
provides=("olivetin")
conflicts=("olivetin-bin")
url="http://www.olivetin.app"
license=('AGPLv3')
makedepends=(
	'go'
	'git'
	'npm'
)
source=("$pkgname-$pkgver::git+https://github.com/OliveTin/OliveTin.git?tag=${pkgver}"
	"systemd-unit-usr-bin.patch")
noextract=()
md5sums=('SKIP'
	'SKIP')
validpgpkeys=()

prepare() {
	cd "$srcdir/${pkgname}-${pkgver}"
	patch OliveTin.service < "$srcdir/systemd-unit-usr-bin.patch"

}

build() {
	cd "$srcdir/${pkgname}-${pkgver}"
	make grpc
	make webui-dist
	make
}

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

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

	mkdir -p $pkgdir/usr/bin/
	cp OliveTin $pkgdir/usr/bin/

	mkdir -p $pkgdir/etc/OliveTin/
	cp config.yaml $pkgdir/etc/OliveTin/

	mkdir -p $pkgdir/usr/lib/systemd/system/
	cp OliveTin.service $pkgdir/usr/lib/systemd/system/

	mkdir -p $pkgdir/var/www/olivetin/
	cp -r webui/* $pkgdir/var/www/olivetin/
}