summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatti Niemenmaa2015-05-08 21:51:36 +0300
committerMatti Niemenmaa2015-07-14 15:56:48 +0300
commit5d1f94f1f03d2eed9b8809fb39b0d63206841e39 (patch)
tree4db275cc8259e1f10b6f7ad0f5b7f5bd25213af1
downloadaur-5d1f94f1f03d2eed9b8809fb39b0d63206841e39.tar.gz
Initial commit: seems okay, though inefficient
We build both the standard and the dynamic library from scratch. Notably, since people often have !staticlibs in options, half of that work is often wasted.
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD58
2 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4e0fb2081695
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = game_music_emu-kode54-git
+ pkgdesc = Multi-purpose console music emulator and player library (a.k.a. libgme) (kode54's fork)
+ pkgver = r185.54e3a42
+ pkgrel = 1
+ url = https://github.com/kode54/game_music_emu
+ arch = i686
+ arch = x86_64
+ license = LGPL2.1
+ makedepends = git
+ makedepends = qtchooser
+ depends = gcc-libs
+ depends = glibc
+ provides = libgme
+ conflicts = libgme
+ source = game_music_emu-kode54-git::git+https://github.com/kode54/game_music_emu.git
+ source = File_Extractor::git+https://github.com/kode54/file_extractor.git
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = game_music_emu-kode54-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f35f1462e9dd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Matti Niemenmaa <matti.niemenmaa+aur ät iki dȯt fi>
+
+pkgname=game_music_emu-kode54-git
+pkgver=r185.54e3a42
+pkgrel=1
+pkgdesc="Multi-purpose console music emulator and player library (a.k.a. libgme) (kode54's fork)"
+arch=(i686 x86_64)
+url='https://github.com/kode54/game_music_emu'
+license=('LGPL2.1')
+depends=('gcc-libs' 'glibc')
+makedepends=('git' 'qtchooser')
+conflicts=('libgme')
+provides=('libgme')
+source=("${pkgname}::git+https://github.com/kode54/game_music_emu.git"
+ 'File_Extractor::git+https://github.com/kode54/file_extractor.git')
+sha256sums=('SKIP' 'SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir/$pkgname"/prj/Game_Music_Emu
+
+ # Call it libgme instead of libGame_Music_Emu.
+ sed -i '/^TARGET /s/Game_Music_Emu/gme/' Game_Music_Emu.pro
+
+ # gme/gme.txt identifies this as "0.6.0 Pre-release", generate
+ # libgme.so.0.6.0 instead of libgme.so.1.0.0. Especially since libgme.so.0
+ # is needed for compatibility with gstreamer0.10-bad-plugins.
+ echo 'VERSION=0.6.0' >> Game_Music_Emu.pro
+
+ # The header is already in INCLUDEPATH but the code needs adding to SOURCES.
+ echo 'SOURCES += ../../../File_Extractor/fex/Data_Reader.cpp' >> Game_Music_Emu.pro
+
+ cp -r . ../Game_Music_Emu_dynamic
+
+ qmake Game_Music_Emu.pro
+ make
+
+ cd ../Game_Music_Emu_dynamic
+ sed -i '/^CONFIG /s/staticlib/dll/' Game_Music_Emu.pro
+ cat >> Game_Music_Emu.pro <<EOF
+headers.path = /usr/include/gme
+headers.files += ../../gme/gme.h
+INSTALLS += headers
+EOF
+ qmake Game_Music_Emu.pro
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname"/prj/Game_Music_Emu
+ make INSTALL_ROOT="$pkgdir" install
+ cd ../Game_Music_Emu_dynamic
+ make INSTALL_ROOT="$pkgdir" install
+}