summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 336030f72192131c6363be126abccce165f63948 (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
# Maintaner: Evan Overman <evanrileyoverman@gmail.com>

pkgname=webby-git
_pkgname=webby
pkgver=3.3.0.r0.gd3818df
pkgrel=3
pkgdesc='A very simple HTTP/HTTPS server and service.'
url='https://github.com/an-prata/webby'
makedepends=('git' 'go')
license=('MIT')
arch=('any')
source=("${_pkgname}::git+${url}.git")
sha256sums=('SKIP')

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

build() {
	cd "${srcdir}/${_pkgname}"
	go build
}

package() {
	cd "${srcdir}/${_pkgname}"

	mkdir -p ${pkgdir}/usr/bin/
	mkdir -p ${pkgdir}/etc/webby/
	mkdir -p ${pkgdir}/srv/webby/website/
	mkdir -p ${pkgdir}/usr/lib/systemd/system/

	mv webby ${pkgdir}/usr/bin/
	cp webby.service ${pkgdir}/usr/lib/systemd/system/

	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}