summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fe0e37fc7ee4260866b861b43ea15033498c2a76 (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
# Maintainer: Toby Jones <quoth.the.server@gmail.com>

pkgname=etterna-git
pkgver=0.65.1
pkgrel=1
pkgdesc="Etterna: an advanced cross-platform rhythm game focused on keyboard play"
arch=('i686' 'x86_64')
url="https://etternaonline.com"
license=('MIT')
provides_i686=('etterna')
conflicts_i686=('etterna')
provides_x86_64=('etterna')
conflicts_x86_64=('etterna')
depends_i686=(libmad gtk2 glu glew curl libpulse cmake)
depends_x86_64=(libmad gtk2 glu glew curl libpulse cmake)
optdepends_i686=('jack: Audio server')
optdepends_x86_64=('jack: Audio server')
source_i686=('git+https://github.com/etternagame/etterna')
source_x86_64=('git+https://github.com/etternagame/etterna')
sha512sums_i686=('SKIP')
sha512sums_x86_64=('SKIP')
install=etterna-git.install

pkgver() {
    curl --silent https://api.github.com/repos/etternagame/etterna/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's/^v\(.*\)/\1/'
}

build() {
    cd "etterna"

    git checkout v$(pkgver)
    git submodule update --init

    mkdir "build"
    cd "build"
    cmake -G 'Unix Makefiles' ..

    make
}

package() {
    mkdir -p "$pkgdir/usr/share/applications"
    mkdir -p "$pkgdir/opt/etterna-git/Cache"
    mkdir -p "$pkgdir/usr/share/licenses/etterna-git"

    cp "$srcdir/etterna/etterna" "$pkgdir/opt/etterna-git/"
    cp "$srcdir/etterna/GtkModule.so" "$pkgdir/opt/etterna-git"

    mkdir "$pkgdir/opt/etterna-git/Songs"
    
    cp -R "$srcdir/etterna/Assets/" "$pkgdir/opt/etterna-git"
    cp -R "$srcdir/etterna/BackgroundEffects/" "$pkgdir/opt/etterna-git"
    cp -R "$srcdir/etterna/Characters/" "$pkgdir/opt/etterna-git"
    cp -R "$srcdir/etterna/Data/" "$pkgdir/opt/etterna-git"
    cp -R "$srcdir/etterna/NoteSkins/" "$pkgdir/opt/etterna-git"
    cp -R "$srcdir/etterna/Scripts/" "$pkgdir/opt/etterna-git"
    cp -R "$srcdir/etterna/Songs/" "$pkgdir/opt/etterna-git"
    cp -R "$srcdir/etterna/Themes/" "$pkgdir/opt/etterna-git"

    cp "../etterna.desktop" "$pkgdir/usr/share/applications"
    cp "../LICENSE" "$pkgdir/usr/share/licenses/etterna-git"

    cp "$srcdir/etterna/Installer/Install.ico" "$pkgdir/opt/etterna-git/icon.ico"
}