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

pkgname=qmidiplayer-git
pkgver=r237.07ee50b
pkgrel=1
pkgdesc='A cross-platform midi file player based on libfluidsynth and Qt.'
arch=('x86_64')
url='https://chrisoft.org/QMidiPlayer/'
license=('GPLv3')
conflicts=('qmidiplayer')
depends=(
    'qt5-base' 'qt5-quickcontrols'
    'rtmidi' 'fluidsynth'
    'freetype2' 'zlib' 'libjpeg-turbo' 'libpng'
    'glfw' 'glew' 'openal' 'devil'
)
makedepends=(
    'git'
    'cmake'
)
source=(
    'git+https://git.chrisoft.org/git/QMidiPlayer.git'
    'git+https://git.chrisoft.org/git/SMELT.git'
)
md5sums=(
    'SKIP'
    'SKIP'
)

pkgver() {
    cd ${srcdir}/QMidiPlayer

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

prepare() {
    cd ${srcdir}/QMidiPlayer
    git submodule init
    git config submodule.SMELT.url ${srcdir}/SMELT
    git submodule update
}

build () {
    cd ${srcdir}/QMidiPlayer
    cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib .
    cmake --build . -j
}

package() {
    make -C ${srcdir}/QMidiPlayer DESTDIR="$pkgdir" install
}