changeset 180:0e996245fb70

build_linux.sh: add dist arg to build binary tarball
author Paul Brossier <piem@piem.org>
date Mon, 13 Feb 2017 18:41:10 +0100
parents 126597b25b28
children 06a5ea89982f
files build_linux.sh
diffstat 1 files changed, 23 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/build_linux.sh	Mon Feb 13 17:43:05 2017 +0100
+++ b/build_linux.sh	Mon Feb 13 18:41:10 2017 +0100
@@ -1,6 +1,14 @@
 #! /bin/sh
 
-# instructions to build vamp-aubio-plugins for linux
+# script to build vamp-aubio-plugins for linux
+
+. $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
@@ -18,3 +26,17 @@
 
 # system-wide installation
 # sudo ./waf install
+
+if [ "$1" = 'dist' ]
+then
+  ARCH=$(lscpu  | head -1  | awk '{print $2}')
+  DESTDIR=vamp-aubio-plugins-$VAMP_AUBIO_VERSION-$ARCH
+  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.dll $DESTDIR
+  strip $DESTDIR/vamp-aubio.so
+  cp -prv vamp-aubio.cat vamp-aubio.n3 $DESTDIR
+  tar jcvf $DESTDIR.tar.bz2 $DESTDIR
+fi