summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e23080916964b71faa29ed1a17e3734a1474700d (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
# Maintainer: Lucki <Lucki at holarse-linuxgaming dot de>
# Contributor in comments: Misc <https://aur.archlinux.org/account/misc/>
# Contributor in comments: SajeOne <https://aur.archlinux.org/account/SajeOne/>
# Contributor in email: tpenguinltg <https://aur.archlinux.org/account/tpenguinltg/>

pkgname=opsu
pkgver=0.15.0
pkgrel=1
pkgdesc="An open source osu!-client written in Java."
arch=('any')
url="https://itdelatrisu.github.io/opsu/"
license=('GPL3')
changelog=.CHANGELOG
install=opsu.install
depends=('java-runtime' 'bash' 'xorg-xrandr')
optdepends=('ffmpeg: Background video playback')
makedepends=('java-environment' 'java-web-start' 'gradle' 'gendesk' 'git')
provides=('opsu-git')
conflicts=('opsu-git')
source=( ${pkgname}::git://github.com/itdelatrisu/opsu.git#tag=${pkgver}
         opsu.sh )
sha512sums=('SKIP'
            '4b065052fef55e1860a51dfa5af080930b1001e4c82cd8b3b0383bd68b239d382d788408235a7cb4fb4a1d04123a6049188a2e2c2d0e5fd08a3deb69da25fc2d')

pkgver()
{
	cd "${srcdir}/${pkgname}"
	git describe --tags | sed 's/-.*//'
}

prepare()
{
	# generate .desktop-file
	gendesk -n -f --pkgname "${pkgname}" --pkgdesc "$pkgdesc" --name "opsu!" --exec "${pkgname}" --categories "Game"
}

build()
{
	cd "${srcdir}/${pkgname}"
	gradle jar -PXDG=true -PexcludeFFmpeg
}

package()
{
	install -Dm644 "${srcdir}/${pkgname}/build/libs/${pkgname}-${pkgver}.jar" "${pkgdir}/usr/share/java/${pkgname}/${pkgname}.jar"
	install -Dm644 "${srcdir}/${pkgname}/res/logo.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
	install -Dm644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
	install -Dm755 "${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
}