summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 931f6dd7d44c94138cbe18661dc82eeb46e8b291 (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
55
56
57
58
# Maintainer: Cain Atkinson <yellowsink@protonmail.com>

_pkgname="osu-tunes"
pkgname="${_pkgname}-git"
pkgver=r5.9c18074
pkgrel=1
pkgdesc="An audio player using osu! beatmaps"
arch=('x86_64')
url="https://github.com/cainy-a/osu-tunes"
license=('BSD')
groups=()
depends=('csfml')
makedepends=('git' 'nim' 'nimble' 'clang')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
backup=("usr/share/${_pkgname}/data")
source=("${_pkgname}-source::git+${url}#commit=9c18074b50e78f5977e34c20863b9fe602fd56ae")
md5sums=('SKIP')

# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
# a description of each element in the source array.

prepare() {
	cd "$srcdir/${pkgname%-VCS}"
	patch -p1 -i "$srcdir/${pkgname%-VCS}.patch"
}

pkgver() {
	cd "${_pkgname}-source"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	# install deps
	nimble install csfml zip
}

build() {
	cd "${_pkgname}-source"

	# build with nim
	nim c -d:ssl OsuTunes.nim
}

#check() {
#	cd "$srcdir/${pkgname%-VCS}"
#	make -k check
#}

package() {
	cd "${_pkgname}-source"

	# install license
	install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE"
	
	# install built binary
	install -Dm 755 "OsuTunes" "${pkgdir}/usr/bin/${_pkgname}"
}