summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0f8cac6d6ccbfc8559bdc8e3a8b93760484dc36e (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
# Maintainer: éclairevoyant

_pkgname=happyx
pkgname="$_pkgname-git"
pkgver=1.12.0.r36.7cdbd2d
pkgrel=1
pkgdesc="Macro-oriented asynchronous full-stack web-framework, written in Nim"
arch=(x86_64)
url="https://github.com/HapticX/$_pkgname"
license=(GPL3)
depends=(gcc-libs glibc)
makedepends=(choosenim git)
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("git+$url.git")
b2sums=('SKIP')

_setup() {
	_nimble_dir="$srcdir/nimbleDir"
	_path="$_nimble_dir/bin:$PATH"
	cd $_pkgname
}

prepare() {
	_setup

	CHOOSENIM_NO_ANALYTICS=1 choosenim stable --nimbleDir="$_nimble_dir"
	PATH="$_path" nimble refresh -l
	PATH="$_path" nimble install -d -l
}

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

build() {
	_setup

	PATH="$_path" nimble install -l --verbose --passNim:--passC:"\"$CFLAGS\"" --passNim:--passL:"\"$LDFLAGS\""
}

package() {
	install -Dm755 $_pkgname/happyx/hpx -t "$pkgdir/usr/bin/"
}