root/gs3-extensions/mars-src/trunk/src/CASCADE-MAKE/WAVESURFER.sh @ 34370

Revision 34370, 2.7 KB (checked in by davidb, 6 weeks ago)

WaveSurfer?-JS source files and top-up player

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3package=wavesurfer.js
4version=-4.0.1
5
6progname=$0
7
8source ../cascade-make/lib/cascade-lib.bash GEXT_MARS ../.. $*
9
10prefix=$GEXT_MARS_INSTALLED
11
12#export CFLAGS="$CFLAGS -I$GEXT_MARS_INSTALLED/include"
13#export CPPFLAGS="$CPPFLAGS -I$GEXT_MARS_INSTALLED/include"
14#export CXXFLAGS="$CXXFLAGS -I$GEXT_MARS_INSTALLED/include"
15#export LDFLAGS="$LDFLAGS -L$GEXT_MARS_INSTALLED/lib"
16#export LD_LIBRARY_PATH="$GEXT_MARS_INSTALLED/lib"
17
18opt_run_untar $force_untar $auto_untar $package $version
19
20#opt_run_configure $force_config $auto_config $package $version $prefix
21if [ $force_config = "1" ] ; then
22    echo "[pushd $package$version]"
23    ( cd $package$version ; \
24      echo "Running the *configure* stage with NodeJS source code equates to running 'npm install' to downloading required packages" ; \
25      echo "npm install" ; \
26      npm install )
27    if [ $? != 0 ] ; then
28        echo "      Error encountered running *configure* stage of $progname"
29        exit 1
30    fi
31    echo "[popd]"
32else
33    # Is the following check meaningful for npm???
34    if [ $auto_config = "1" ] ; then
35      echo "Found top-level for ${progname%.*} => no need to run ./configure"
36    fi
37fi
38
39
40# opt_run_make $compile $package $version
41if [ $compile = "1" ] ; then
42    ( cd $package$version ; \
43      echo "npm run build $@" ; \
44      npm run build $@ )
45    if [ $? != 0 ] ; then
46        echo "      Error encountered running *make $target* stage of $progname"
47        exit 1
48    fi
49fi
50
51# opt_run_make $install $package $version "install"
52if [ $install = "1" ] ; then
53#    echo "****"
54#    echo "* Generate files: $package$version/dist"
55#    echo "****"
56
57    if [ ! -d ../../../web/ext ] ; then
58    echo "  Making directory: ../../../web/ext"
59    mkdir ../../../web/ext
60    fi
61   
62    if [ ! -d ../../../web/ext/audio ] ; then
63    echo "  Making directory: ../../../web/ext/audio"
64    mkdir ../../../web/ext/audio
65    fi
66
67    echo "  Installing 'wavesurfer' into ../../../web/ext/audio"
68
69    echo "Copying  $package$version/dist to ../../../web/ext/audio/ws"
70    /bin/cp -r "$package$version/dist" "../../../web/ext/audio/ws"
71
72    echo "Copying  wavesurfer-player to ../../../web/ext/audio"
73    /bin/cp -r wavesurfer-player/css wavesurfer-player/wavesurfer-player.js ../../../web/ext/audio/.
74
75fi
76
77# opt_run_make $clean $package $version "clean"
78if [ $clean = "1" ] ; then
79    echo "****"
80    echo "* No 'clean' target currently implemented for 'npm' based src package"
81    echo "****"
82fi
83
84#opt_run_make $distclean $package $version "distclean"
85if [ $distclean = "1" ] ; then
86    echo "****"
87    echo "* No 'clean' target currently implemented for 'npm' based src package"
88    echo "****"
89fi
90
91opt_run_tarclean $tarclean $package $version
92
93
94
Note: See TracBrowser for help on using the browser.