summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAndrew Whatson2018-12-09 22:49:46 +1000
committerAndrew Whatson2018-12-09 22:49:46 +1000
commit4ec0929b0a8a67801b3647c2cfb040fbf3e84c74 (patch)
tree235fc6952e22d97a54d57fe9cfb5f27ca7286996 /PKGBUILD
parent777dfebb6a19398b4864afe0d3d75262b45f9d13 (diff)
downloadaur-4ec0929b0a8a67801b3647c2cfb040fbf3e84c74.tar.gz
Update for CMake build
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
1 files changed, 24 insertions, 13 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8e9e862c23d..968d847a378 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,15 +3,15 @@
_pkgname=faudio
_gitname=FAudio
pkgname=${_pkgname}-git
-pkgver=r949.acc1aaa
-pkgrel=2
+pkgver=r979.a98be73
+pkgrel=1
pkgdesc="Accuracy-focused XAudio reimplementation for open platforms"
arch=('i686' 'x86_64')
url='https://github.com/FNA-XNA/FAudio'
license=('custom')
provides=("${_pkgname}")
depends=('sdl2' 'ffmpeg')
-makedepends=('git')
+makedepends=('git' 'cmake')
source=('git+https://github.com/FNA-XNA/FAudio'
'faudio.pc')
sha256sums=('SKIP'
@@ -23,17 +23,28 @@ pkgver() {
}
build() {
- cd "$srcdir/${_gitname}"
- FAUDIO_RELEASE=1 FAUDIO_FFMPEG=1 make
+ mkdir -p "$srcdir/${_gitname}/build"
+ cd "$srcdir/${_gitname}/build"
+
+ cmake .. \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX="${pkgdir}/usr" \
+ -DFFMPEG=ON
+
+ make
}
package() {
- cd "$srcdir/${_gitname}"
- _tmpdir="${pkgdir}/temp"
- FAUDIO_RELEASE=1 FAUDIO_FFMPEG=1 INSTALL_PREFIX="${_tmpdir}" make install
- install -D -t "${pkgdir}/usr/lib" "${_tmpdir}/lib"/*
- install -D -m644 -t "${pkgdir}/usr/include/${_gitname}" "${_tmpdir}/include"/*
- install -D -m644 -t "${pkgdir}/usr/share/licenses/${_pkgname}" LICENSE
- install -D -m644 -t "${pkgdir}/usr/lib/pkgconfig" ../faudio.pc
- rm -rf "${_tmpdir}"
+ cd "$srcdir/${_gitname}/build"
+
+ make install
+
+ mkdir "${pkgdir}/usr/include/FAudio"
+ mv "${pkgdir}/usr/include"/*.h "${pkgdir}/usr/include/FAudio"
+
+ sed -i 's!"${_IMPORT_PREFIX}/include"!"${_IMPORT_PREFIX}/include/FAudio"!' \
+ "${pkgdir}/usr/lib/cmake/FAudio/FAudio-targets.cmake"
+
+ install -D -m644 -t "${pkgdir}/usr/share/licenses/${_pkgname}" ../LICENSE
+ install -D -m644 -t "${pkgdir}/usr/lib/pkgconfig" ../../faudio.pc
}