build_osx.sh: update script to create tarball
authorPaul Brossier <piem@piem.org>
Mon, 13 Feb 2017 21:48:17 +0000 (22:48 +0100)
committerPaul Brossier <piem@piem.org>
Mon, 13 Feb 2017 21:48:17 +0000 (22:48 +0100)
build_osx.sh

index bd27971..9089d57 100755 (executable)
@@ -2,6 +2,14 @@
 
 # instructions to build vamp-aubio-plugins for mac os x
 
+. $PWD/VERSION
+VAMP_AUBIO_VERSION=$VAMP_AUBIO_MAJOR_VERSION.$VAMP_AUBIO_MINOR_VERSION.$VAMP_AUBIO_PATCH_VERSION$VAMP_AUBIO_VERSION_STATUS
+
+if [ "$1" = 'dist' ]
+then
+  rm -rf contrib/
+fi
+
 # get waf
 ./scripts/get_waf.sh
 
 
 # system-wide installation
 # sudo ./waf install
+
+if [ "$1" = 'dist' ]
+then
+  ARCH=$(lscpu  | head -1  | awk '{print $2}')
+  DESTDIR=vamp-aubio-plugins-$VAMP_AUBIO_VERSION-osx
+  rm -rf $DESTDIR $DESTDIR.zip
+  mkdir $DESTDIR
+  cp -prv contrib/aubio*/README.md $DESTDIR/README.aubio.md
+  cp -prv README.md $DESTDIR
+  cp -prv build/vamp-aubio.dylib $DESTDIR
+  strip $DESTDIR/vamp-aubio.dylib
+  cp -prv vamp-aubio.cat vamp-aubio.n3 $DESTDIR
+  tar jcvf $DESTDIR.tar.bz2 $DESTDIR
+fi