summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Teibes2018-07-25 21:46:06 +0200
committerCarsten Teibes2018-07-25 21:46:06 +0200
commit8a061a04c4c73d98b348c6ec6a5583483f7e435e (patch)
tree8d1afde6d8a26038cf1a0fadc9fef26672f57beb
downloadaur-8a061a04c4c73d98b348c6ec6a5583483f7e435e.tar.gz
[new] sdl2_sound-hg
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD51
2 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..dcf00f90d4b8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = sdl2_sound-hg
+ pkgdesc = A library to decode several popular sound file formats (Version 2, development version)
+ pkgver = 1.0.3.r105.9262f9205898
+ pkgrel = 1
+ url = http://icculus.org/SDL_sound/
+ arch = i686
+ arch = x86_64
+ license = zlib
+ makedepends = mercurial
+ depends = sdl2
+ provides = sdl2_sound
+ conflicts = sdl2_sound
+ source = sdl2_sound::hg+http://hg.icculus.org/icculus/SDL_sound
+ md5sums = SKIP
+
+pkgname = sdl2_sound-hg
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..90bdf26cb555
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
+
+pkgname=sdl2_sound-hg
+pkgver=1.0.3.r105.9262f9205898
+pkgrel=1
+pkgdesc="A library to decode several popular sound file formats (Version 2, development version)"
+arch=('i686' 'x86_64')
+url="http://icculus.org/SDL_sound/"
+license=('zlib')
+depends=('sdl2')
+makedepends=('mercurial')
+conflicts=("${pkgname%-*}")
+provides=("${pkgname%-*}")
+source=(${pkgname%-*}::"hg+http://hg.icculus.org/icculus/SDL_sound")
+md5sums=('SKIP')
+
+pkgver() {
+ cd ${pkgname%-*}
+
+ _lasttag=$(hg tags -q | sort -r | grep release- | head -n1)
+ _commits=$(hg log --template "{node}\n" -r $_lasttag:tip | wc -l)
+ _hash=$(hg identify -i | tr -cd [:alnum:])
+ printf "%s.r%s.%s" "${_lasttag/release-}" "$_commits" "$_hash"
+}
+
+prepare() {
+ rm -rf build
+ mkdir build
+
+ # fixup an oversight (wrong path)
+ sed 's|FILES SDL_sound.h|FILES src/SDL_sound.h|' -i ${pkgname%-*}/CMakeLists.txt
+}
+
+build() {
+ cd build
+
+ cmake ../${pkgname%-*} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSDL2_INCLUDE_DIRS=/usr/include/SDL2 -DSDL2_LIBRARIES=/usr/lib/libSDL2.so
+ make
+}
+
+package() {
+ make -C build DESTDIR="$pkgdir/" install
+
+ # docs
+ install -d "$pkgdir"/usr/share/doc/${pkgname%-*}
+ install -Dm0644 ${pkgname%-*}/docs/* "$pkgdir"/usr/share/doc/${pkgname%-*}/
+
+ # license
+ install -Dm0644 ${pkgname%-*}/LICENSE.txt "$pkgdir"/usr/share/licenses/${pkgname%-*}/LICENSE.txt
+}