updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / oomidi-git / PKGBUILD
blob96edf5457791fd73e629497a8099278b2f56c175
1 # Maintainer: SpepS <dreamspepser at yahoo dot it>
3 _pkg=oomidi
4 pkgname=$_pkg-git
5 pkgver=20110614
6 pkgrel=1
7 pkgdesc="Open Octave Midi, the open source MIDI/Audio sequencer."
8 arch=(i686 x86_64)
9 url="http://www.openoctave.org/"
10 license=('GPL')
11 depends=('qt' 'liblo' 'lash' 'fluidsynth' 'liblscp')
12 makedepends=('git' 'cmake' 'dssi')
13 provides=("$_pkg")
14 conflicts=("$_pkg" "oom")
15 install="$pkgname.install"
17 _gitroot="git://github.com/ccherrett/oom.git"
18 _gitname="$_pkg"
20 build() {
21   cd "$srcdir"
22   msg "Connecting to GIT server...."
24   if [ -d $_gitname ] ; then
25     cd $_gitname && git pull origin
26     msg "The local files are updated."
27   else
28     git clone $_gitroot $_gitname
29   fi
31   msg "GIT checkout done or server timeout"
32   msg "Starting make..."
34   rm -rf "$srcdir/$_gitname-build"
35   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
36   cd "$srcdir/$_gitname-build"
38   #
39   # BUILD HERE
40   #
42   # python2 fixes
43   export PYTHON="python2"
44   sed -i "s|bin/python|&2|;s|env python|&2|" \
45     `grep -Erl "(bin/python|env python)" .`
47   # adding missing header
48   sed -i "14i#include <stddef.h>" oom/memory.h
50   # prepare build folder
51   mkdir build && cd build
53   cmake .. -DCMAKE_BUILD_TYPE=release \
54            -DCMAKE_INSTALL_PREFIX=/usr \
55            -DENABLE_LASH=ON \
56            -DENABLE_OSC=ON \
57            -DENABLE_DSSI=ON \
58            -DENABLE_FLUID=ON \
59            -DENABLE_LSCP=ON
60   make
63 package() {
64   cd "$srcdir/$_gitname-build/build"
66   make DESTDIR="$pkgdir/" install
68   # prevent conflicts with muse 2
69   cd "$pkgdir/usr/bin" && mv grepmidi oom-grepmidi
70