relpipe-data/examples/release-v0.17.sh
branchv_0
changeset 317 fce3d6290c40
parent 297 192b0059a6c4
equal deleted inserted replaced
316:d7ae02390fac 317:fce3d6290c40
       
     1 # Install dependencies as root:
       
     2 apt install g++ make cmake mercurial pkg-config
       
     3 apt install libxerces-c-dev       # needed only for relpipe-in-xml module
       
     4 apt install guile-2.2-dev         # needed only for relpipe-tr-scheme module
       
     5 apt install gawk                  # needed only for relpipe-tr-awk module
       
     6 apt install libxml++2.6-dev       # needed only for relpipe-in-xmltable module
       
     7 apt install unixodbc-dev          # needed only for relpipe-tr-sql module
       
     8 apt install libsqliteodbc         # needed only for relpipe-tr-sql module if used with SQLite
       
     9 apt install odbc-postgresql       # needed only for relpipe-tr-sql module if used with PostgreSQL
       
    10 apt install libjack-jackd2-dev    # needed only for relpipe-in-jack and relpipe-out-jack modules; Jack1 should also work
       
    11 
       
    12 # Run rest of installation as a non-root user:
       
    13 export RELPIPE_VERSION="v0.17"
       
    14 export RELPIPE_SRC=~/src
       
    15 export RELPIPE_BUILD=~/build
       
    16 export RELPIPE_INSTALL=~/install
       
    17 export PKG_CONFIG_PATH="$RELPIPE_INSTALL/lib/pkgconfig/:$PKG_CONFIG_PATH"
       
    18 export PATH="$RELPIPE_INSTALL/bin:$PATH"
       
    19 
       
    20 rm -rf "$RELPIPE_BUILD"/relpipe-*
       
    21 mkdir -p "$RELPIPE_SRC" "$RELPIPE_BUILD" "$RELPIPE_INSTALL"
       
    22 
       
    23 # Helper functions:
       
    24 relpipe_download() { for m in "$@"; do cd "$RELPIPE_SRC" && ([[ -d "relpipe-$m.cpp" ]] && hg pull -R "relpipe-$m.cpp" && hg update -R "relpipe-$m.cpp" "$RELPIPE_VERSION" || hg clone -u "$RELPIPE_VERSION" https://hg.globalcode.info/relpipe/relpipe-$m.cpp) || break; done; }
       
    25 relpipe_install()  { for m in "$@"; do cd "$RELPIPE_BUILD" && mkdir -p relpipe-$m.cpp && cd relpipe-$m.cpp && cmake -DCMAKE_INSTALL_PREFIX:PATH="$RELPIPE_INSTALL" "$RELPIPE_SRC/relpipe-$m.cpp" && make && make install || break; done; }
       
    26 
       
    27 # Download all sources:
       
    28 relpipe_download lib-common lib-reader lib-writer lib-cli lib-xmlwriter in-cli in-fstab in-xml in-xmltable in-csv in-filesystem in-recfile out-gui.qt out-nullbyte out-ods out-tabular out-xml out-csv out-asn1 out-recfile tr-cut tr-grep tr-python tr-sed tr-validator tr-scheme tr-awk tr-sql in-jack out-jack
       
    29 
       
    30 # Optional: At this point, we have all dependencies and sources downloaded, so we can disconnect this computer from the internet in order to verify that our build process is sane, deterministic and does not depend on any external resources.
       
    31 
       
    32 # Build and install libraries:
       
    33 relpipe_install lib-common lib-reader lib-writer lib-cli lib-xmlwriter
       
    34 
       
    35 # Build and install tools:
       
    36 relpipe_install in-fstab in-cli in-fstab in-xml in-xmltable in-csv in-recfile tr-cut tr-grep tr-sed tr-scheme tr-awk tr-sql out-nullbyte out-ods out-tabular out-xml out-csv out-asn1 out-recfile in-filesystem in-jack out-jack
       
    37 
       
    38 # Load Bash completion scripts:
       
    39 for c in "$RELPIPE_SRC"/relpipe-*/bash-completion.sh ; do . "$c"; done
       
    40 
       
    41 # Enable streamlet examples:
       
    42 export RELPIPE_IN_FILESYSTEM_STREAMLET_PATH="$RELPIPE_SRC"/relpipe-in-filesystem.cpp/streamlet-examples/
       
    43 
       
    44 # Clean-up:
       
    45 unset -f relpipe_install
       
    46 unset -f relpipe_download
       
    47 unset -v RELPIPE_VERSION
       
    48 unset -v RELPIPE_SRC
       
    49 unset -v RELPIPE_BUILD
       
    50 unset -v RELPIPE_INSTALL
       
    51 
       
    52 # List available JACK ports (the JACK daemon should be running):
       
    53 relpipe-in-jack --list-ports true --list-midi-messages false | relpipe-out-tabular