summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bc004cea2098fbbfedab452bcea54a0a6e6d9ce0 (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
pkgname=highly-quixotic-git
pkgver=r31.423c661
pkgrel=2
pkgdesc="Highly Quixotic Capcom QSound (QSF) emulator library"
arch=(i686 x86_64)
url='https://bitbucket.org/losnoco/highly_quixotic'
license=(GPL3)
depends=(glibc)
makedepends=('git' 'qt5-base')
source=("${pkgname}::git+https://bitbucket.org/losnoco/highly_quixotic.git")
sha256sums=('SKIP')

pkgver() {
   cd "$srcdir/$pkgname"
   printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
   cd "$srcdir/$pkgname"/Core

   # Don't request a static lib, it prevents a dynamic one from being built.
   sed -i '/^CONFIG /s/ staticlib//' Core.pro

   # Add qsound_ctr.c to the sources, it's required.
   sed -i '/^SOURCES /aqsound_ctr.c \\' Core.pro

   # Install the header files too.
   cat >> Core.pro <<EOF
headers.path = /usr/include/QSound/Core
headers.files += qsound.h emuconfig.h kabuki.h qmix.h z80.h
INSTALLS += headers
EOF
}

build() {
   cd "$srcdir/$pkgname"/Core
   qmake Core.pro
   make
}

package() {
   cd "$srcdir/$pkgname"/Core
   make INSTALL_ROOT="$pkgdir" install
}