summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: eb9c0f161510fd1ad7412d15f209a86c383367e5 (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
59
60
61
62
63
# Maintainer: Ammon Smith <ammon.i.smith@gmail.com>

pkgname=osu-lazer-git
pkgver=2017.329.0_215_gcbb669ad
pkgrel=1
pkgdesc='Freeware rhythm video game - lazer development version'
arch=('x86_64' 'i686')
url='http://osu.ppy.sh'
license=('MIT')
makedepends=('nuget'
             'git')
depends=('ffmpeg'
         'libglvnd'
         'mono')
optdepends=()
provides=('osu-lazer')
conflicts=('osu-lazer')
source=('git+https://github.com/ppy/osu.git'
        'osu-launcher')
sha256sums=('SKIP'
            'c499dbff1d9a8f382e7b3cf4a95b58b9f02fb98e66e50cddb5d7d6c8a5223d2d')

if [[ $CARCH == x86_64 ]]; then
	readonly _arch=x64
elif [[ $CARCH == i686 ]]; then
	readonly _arch=x86
fi

pkgver() {
	cd "$srcdir/osu"
	git describe --always --tags | sed 's/-/_/g' | cut -c 2-
}

build() {
	cd "$srcdir/osu"

	# Initialize submodules
	git submodule init
	git submodule update --recursive

	# Download dependencies
	nuget restore

	# Build
	export MONO_IOMAP='case'
	xbuild || xbuild
}

package() {
	cd "$srcdir"
	mkdir -p "$pkgdir/usr/bin"
	install -m755 'osu-launcher' "$pkgdir/usr/bin/osu-lazer"

	cd "$srcdir/osu/osu.Desktop/bin/Debug"
	mkdir -p "$pkgdir/usr/lib/${pkgname%-git}"
	install -m755 *.exe *.dll "$pkgdir/usr/lib/${pkgname%-git}"

	# Install native libraries
	install -m755 "libbass.$_arch.so" "$pkgdir/usr/lib/${pkgname%-git}/libbass.so"
	install -m755 "libbass_fx.$_arch.so" "$pkgdir/usr/lib/${pkgname%-git}/libbass_fx.so"
}

# vim: set sw=4 ts=4 noet: