summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cc0f160765f5d11fdfbf16d2f5afb5dea2306aa7 (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
64
65
# Maintainer: Lucki <https://aur.archlinux.org/account/Lucki>
# 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-git
pkgver=0.16.1.r4.ge9676f81
pkgrel=1
install=${pkgname%-git}.install
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname%-git}::git://github.com/itdelatrisu/opsu.git"
        "${pkgname%-git}.sh"
        "${pkgname%-git}.desktop")
sha512sums=('SKIP'
            '4b065052fef55e1860a51dfa5af080930b1001e4c82cd8b3b0383bd68b239d382d788408235a7cb4fb4a1d04123a6049188a2e2c2d0e5fd08a3deb69da25fc2d'
            '94f6f2f2a7f5f104e1002869099daf2bc033764373c8f51b204152d6821070e4be25a0001bfdb8b5b2ef25046b0be214f640de5ff994eda9126a48495104e745')

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

_pkgname=${pkgname%-git}
# template start; name=opsu; version=0.4;
pkgdesc="An open source osu!-client written in Java."
arch=('any')
url="https://itdelatrisu.github.io/opsu/"
license=('GPL3')
depends=('java-runtime' 'bash' 'hicolor-icon-theme'
         'xorg-xrandr'  # "[…] is a dependency for LWJGL. Had to search around for the fix after the
                        # application was throwing an unhandled exception because it couldn't
                        # detect monitors. Any chance this could be added to the dep list?"
                        # https://aur.archlinux.org/account/SajeOne
         )
optdepends=('ffmpeg: Background video playback')
makedepends=('java-environment' 'java-web-start' 'gradle' 'git')

build()
{
    cd "$srcdir/$_pkgname" || exit

    # keep dependencies outside users home by setting GRADLE_USER_HOME
    GRADLE_USER_HOME="$srcdir/gradle" gradle jar -PXDG=true -PexcludeFFmpeg
}

package()
{
    # cut pkgver
    _pkgver=$(git -C "$srcdir/$_pkgname" describe --tags | sed 's/-.*//')

    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/icons/hicolor/scalable/apps/$_pkgname.png"

    install -Dm644  "$_pkgname.desktop" \
                    "$pkgdir/usr/share/applications/$_pkgname.desktop"

    install -Dm755  "$_pkgname.sh" \
                    "$pkgdir/usr/bin/$_pkgname"
}
# template end;