summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ddd70d082a02891896cb30899adfcad02705dccd (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: JP Cimalando <jp-dev inbox.ru>
pkgname=libopnmidi-git
_pkgname=libOPNMIDI
pkgver=v1.4.0.r105.gb5c8ee9
pkgrel=1
epoch=
pkgdesc="A MIDI play library with OPN2 (YM2612) emulator"
arch=('x86_64')
url="https://github.com/Wohlstand/libOPNMIDI"
license=('LGPL3')
groups=()
depends=('sdl2')
makedepends=('git' 'cmake')
checkdepends=()
optdepends=()
provides=('libopnmidi')
conflicts=('libopnmidi')
replaces=()
backup=()
options=('staticlibs')
install=
changelog=
source=("git+https://github.com/Wohlstand/libOPNMIDI.git")
noextract=()
md5sums=('SKIP')
validpgpkeys=()

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

build() {
  cd "$_pkgname"
  mkdir -p build
  cd build
  cmake -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=/usr/lib \
        -DlibOPNMIDI_STATIC=ON \
        -DlibOPNMIDI_SHARED=ON \
        -DWITH_MIDIPLAY=ON \
        -DWITH_EMBEDDED_BANKS=ON \
        -DWITH_CPP_EXTRAS=ON \
        ..
  make
}

package() {
  cd "$_pkgname/build"
  make DESTDIR="$pkgdir/" install
}