1 # Install dependencies as root: |
1 # Install dependencies as root: |
2 if [[ "$USER" == "root" ]]; then |
2 if [[ "$USER" == "root" ]]; then |
3 apt install g++ make cmake mercurial pkg-config |
3 RELPIPE_DEPENDENCIES=(g++ make cmake mercurial pkg-config) |
4 apt install libxerces-c-dev # needed only for relpipe-in-xml module |
4 RELPIPE_DEPENDENCIES+=(libxerces-c-dev) # needed only for relpipe-in-xml module |
5 apt install guile-2.2-dev # needed only for relpipe-tr-scheme module |
5 RELPIPE_DEPENDENCIES+=(guile-2.2-dev) # needed only for relpipe-tr-scheme module |
6 apt install gawk # needed only for relpipe-tr-awk module |
6 RELPIPE_DEPENDENCIES+=(gawk) # needed only for relpipe-tr-awk module |
7 apt install libxml++2.6-dev # needed only for relpipe-in-xmltable module |
7 RELPIPE_DEPENDENCIES+=(libxml++2.6-dev) # needed only for relpipe-in-xmltable module |
8 apt install unixodbc-dev # needed only for relpipe-tr-sql module |
8 RELPIPE_DEPENDENCIES+=(unixodbc-dev) # needed only for relpipe-tr-sql module |
9 apt install libsqliteodbc # needed only for relpipe-tr-sql module if used with SQLite |
9 RELPIPE_DEPENDENCIES+=(libsqliteodbc) # needed only for relpipe-tr-sql module if used with SQLite |
10 apt install odbc-postgresql # needed only for relpipe-tr-sql module if used with PostgreSQL |
10 RELPIPE_DEPENDENCIES+=(odbc-postgresql) # needed only for relpipe-tr-sql module if used with PostgreSQL |
11 apt install libjack-jackd2-dev # needed only for relpipe-in-jack and relpipe-out-jack modules; Jack1 should also work |
11 RELPIPE_DEPENDENCIES+=(libjack-jackd2-dev) # needed only for relpipe-in-jack and relpipe-out-jack modules; Jack1 should also work |
12 apt install libxi-dev libxtst-dev # needed only for relpipe-in-x11 and relpipe-out-x11 |
12 RELPIPE_DEPENDENCIES+=(libxi-dev libxtst-dev) # needed only for relpipe-in-x11 and relpipe-out-x11 |
13 apt install libzbar-dev libmagick++-dev # needed only for relpipe-in-barcode and the barcode-reader streamlet |
13 RELPIPE_DEPENDENCIES+=(libzbar-dev libmagick++-dev) # needed only for relpipe-in-barcode and the barcode-reader streamlet |
14 apt install libgumbo-dev # needed only for relpipe-in-htmltable |
14 RELPIPE_DEPENDENCIES+=(libgumbo-dev) # needed only for relpipe-in-htmltable |
15 apt install libyaml-dev # needed only for relpipe-in-yaml, relpipe-in-yamltable, relpipe-in-json and relpipe-in-jsontable |
15 RELPIPE_DEPENDENCIES+=(libyaml-dev) # needed only for relpipe-in-yaml, relpipe-in-yamltable, relpipe-in-json and relpipe-in-jsontable |
|
16 RELPIPE_DEPENDENCIES+=(libvmime-dev) # needed only for relpipe-in-mimetable |
|
17 apt install "${RELPIPE_DEPENDENCIES[@]}" |
16 exit; |
18 exit; |
17 fi |
19 fi |
18 |
20 |
19 # Run rest of installation as a non-root user: |
21 # Run rest of installation as a non-root user: |
20 export RELPIPE_VERSION="v0.18" |
22 export RELPIPE_VERSION="v0.18" |
31 # Helper functions: |
33 # Helper functions: |
32 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; } |
34 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; } |
33 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; } |
35 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; } |
34 |
36 |
35 RELPIPE_LIBS=(lib-common lib-reader lib-writer lib-cli lib-xmlwriter) |
37 RELPIPE_LIBS=(lib-common lib-reader lib-writer lib-cli lib-xmlwriter) |
36 RELPIPE_TOOLS=(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) |
38 RELPIPE_TOOLS=(in-cli in-fstab in-xml in-xmltable in-csv in-filesystem in-recfile out-nullbyte out-ods out-tabular out-xml out-csv out-asn1 out-recfile tr-cut tr-grep tr-sed tr-validator tr-scheme tr-awk tr-sql in-jack out-jack) |
37 RELPIPE_TOOLS+=(in-asn1table in-barcode in-htmltable in-ini in-initable in-json in-jsontable in-mimetable in-x11 in-yaml in-yamltable out-ini out-x11 out-xml out-yaml tr-xpath) # since v0.18 |
39 RELPIPE_TOOLS+=(in-asn1table in-barcode in-htmltable in-ini in-initable in-mimetable in-x11 in-yaml in-yamltable out-ini out-x11 out-yaml tr-xpath) # since v0.18 |
|
40 # RELPIPE_TOOLS+=(out-gui.qt tr-python) # not enabled by default |
38 |
41 |
39 |
42 |
40 # Download all sources: |
43 # Download all sources: |
41 relpipe_download "${RELPIPE_LIBS[@]}" "${RELPIPE_TOOLS[@]}" |
44 relpipe_download "${RELPIPE_LIBS[@]}" "${RELPIPE_TOOLS[@]}" |
42 |
45 |