9089d5702cfbcdec80a423d654d43b304d9674b5
[vamp-aubio-plugins.git] / build_osx.sh
1 #! /bin/sh
2
3 # instructions to build vamp-aubio-plugins for mac os x
4
5 . $PWD/VERSION
6 VAMP_AUBIO_VERSION=$VAMP_AUBIO_MAJOR_VERSION.$VAMP_AUBIO_MINOR_VERSION.$VAMP_AUBIO_PATCH_VERSION$VAMP_AUBIO_VERSION_STATUS
7
8 if [ "$1" = 'dist' ]
9 then
10   rm -rf contrib/
11 fi
12
13 # get waf
14 ./scripts/get_waf.sh
15
16 # fetch Vamp SDK
17 ./scripts/get_deps_osx.sh
18
19 # fetch and build aubio
20 ./scripts/get_aubio.sh
21
22 # configure and build plugin
23 ./waf configure
24
25 ./waf build -v
26
27 # install in user's home directory
28 # ./waf install --destdir=$HOME
29
30 # system-wide installation
31 # sudo ./waf install
32
33 if [ "$1" = 'dist' ]
34 then
35   ARCH=$(lscpu  | head -1  | awk '{print $2}')
36   DESTDIR=vamp-aubio-plugins-$VAMP_AUBIO_VERSION-osx
37   rm -rf $DESTDIR $DESTDIR.zip
38   mkdir $DESTDIR
39   cp -prv contrib/aubio*/README.md $DESTDIR/README.aubio.md
40   cp -prv README.md $DESTDIR
41   cp -prv build/vamp-aubio.dylib $DESTDIR
42   strip $DESTDIR/vamp-aubio.dylib
43   cp -prv vamp-aubio.cat vamp-aubio.n3 $DESTDIR
44   tar jcvf $DESTDIR.tar.bz2 $DESTDIR
45 fi