summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 393fa12288649229b55a5f47e365a4a22005d8e6 (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
# Maintainer: Gary Wang <wzc782970009@gmail.com>

pkgname=thplayer-git
pkgver=r53.cf74d30
pkgrel=1
pkgdesc='TouHou BGM player for all platform.'
arch=('x86_64')
url='https://github.com/BearKidsTeam/thplayer'
license=('BSD')
depends=(
    'qt5-multimedia'
)
makedepends=(
    'git'
    'qt5-tools'
)
source=(
    'git+https://github.com/BearKidsTeam/thplayer.git'
    'git+https://github.com/thpatch/thtk.git'
)
md5sums=(
    'SKIP'
    'SKIP'
)

pkgver() {
    cd ${srcdir}/thplayer

    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd ${srcdir}/thplayer
    git submodule init
    git config submodule.thtk.url ${srcdir}/thtk
    git -c protocol.file.allow=always submodule update
}

build () {
    cd ${srcdir}/thplayer
    qmake-qt5 PREFIX=/usr
    make
}

package() {
    cd ${srcdir}/thplayer
    make INSTALL_ROOT="$pkgdir" install
    install -D ./COPYING ${pkgdir}/usr/share/licenses/thplayer-git/LICENSE
    install -D ./assets/thplayer.desktop ${pkgdir}/usr/share/applications/thplayer.desktop
    install -D ./assets/thplayer.svg ${pkgdir}/usr/share/icons/hicolor/scalable/apps/thplayer.svg
    install -D ./assets/256-thplayer.png ${pkgdir}/usr/share/icons/hicolor/256x256/apps/thplayer.png
}