author | František Kučera <franta-hg@frantovo.cz> |
Sun, 09 May 2021 00:06:13 +0200 | |
branch | v_0 |
changeset 323 | e2d607e4a4f4 |
parent 322 | 060d2590e77c |
child 329 | 5bc2bb8b7946 |
permissions | -rw-r--r-- |
219 | 1 |
# Install dependencies as root: |
322
060d2590e77c
first version of release-v0.18.sh
František Kučera <franta-hg@frantovo.cz>
parents:
319
diff
changeset
|
2 |
if [[ "$USER" == "root" ]]; then |
323
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
3 |
RELPIPE_DEPENDENCIES=(g++ make cmake mercurial pkg-config) |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
4 |
RELPIPE_DEPENDENCIES+=(libxerces-c-dev) # needed only for relpipe-in-xml module |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
5 |
RELPIPE_DEPENDENCIES+=(guile-2.2-dev) # needed only for relpipe-tr-scheme module |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
6 |
RELPIPE_DEPENDENCIES+=(gawk) # needed only for relpipe-tr-awk module |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
7 |
RELPIPE_DEPENDENCIES+=(libxml++2.6-dev) # needed only for relpipe-in-xmltable module |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
8 |
RELPIPE_DEPENDENCIES+=(unixodbc-dev) # needed only for relpipe-tr-sql module |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
9 |
RELPIPE_DEPENDENCIES+=(libsqliteodbc) # needed only for relpipe-tr-sql module if used with SQLite |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
10 |
RELPIPE_DEPENDENCIES+=(odbc-postgresql) # needed only for relpipe-tr-sql module if used with PostgreSQL |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
11 |
RELPIPE_DEPENDENCIES+=(libjack-jackd2-dev) # needed only for relpipe-in-jack and relpipe-out-jack modules; Jack1 should also work |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
12 |
RELPIPE_DEPENDENCIES+=(libxi-dev libxtst-dev) # needed only for relpipe-in-x11 and relpipe-out-x11 |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
13 |
RELPIPE_DEPENDENCIES+=(libzbar-dev libmagick++-dev) # needed only for relpipe-in-barcode and the barcode-reader streamlet |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
14 |
RELPIPE_DEPENDENCIES+=(libgumbo-dev) # needed only for relpipe-in-htmltable |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
15 |
RELPIPE_DEPENDENCIES+=(libyaml-dev) # needed only for relpipe-in-yaml, relpipe-in-yamltable, relpipe-in-json and relpipe-in-jsontable |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
16 |
RELPIPE_DEPENDENCIES+=(libvmime-dev) # needed only for relpipe-in-mimetable |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
17 |
apt install "${RELPIPE_DEPENDENCIES[@]}" |
322
060d2590e77c
first version of release-v0.18.sh
František Kučera <franta-hg@frantovo.cz>
parents:
319
diff
changeset
|
18 |
exit; |
060d2590e77c
first version of release-v0.18.sh
František Kučera <franta-hg@frantovo.cz>
parents:
319
diff
changeset
|
19 |
fi |
219 | 20 |
|
21 |
# Run rest of installation as a non-root user: |
|
322
060d2590e77c
first version of release-v0.18.sh
František Kučera <franta-hg@frantovo.cz>
parents:
319
diff
changeset
|
22 |
export RELPIPE_VERSION="v0.18" |
060d2590e77c
first version of release-v0.18.sh
František Kučera <franta-hg@frantovo.cz>
parents:
319
diff
changeset
|
23 |
export RELPIPE_VERSION="tip" # FIXME: v0.18 |
219 | 24 |
export RELPIPE_SRC=~/src |
25 |
export RELPIPE_BUILD=~/build |
|
26 |
export RELPIPE_INSTALL=~/install |
|
27 |
export PKG_CONFIG_PATH="$RELPIPE_INSTALL/lib/pkgconfig/:$PKG_CONFIG_PATH" |
|
28 |
export PATH="$RELPIPE_INSTALL/bin:$PATH" |
|
29 |
||
241 | 30 |
rm -rf "$RELPIPE_BUILD"/relpipe-* |
31 |
mkdir -p "$RELPIPE_SRC" "$RELPIPE_BUILD" "$RELPIPE_INSTALL" |
|
219 | 32 |
|
33 |
# Helper functions: |
|
241 | 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; } |
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; } |
|
219 | 36 |
|
322
060d2590e77c
first version of release-v0.18.sh
František Kučera <franta-hg@frantovo.cz>
parents:
319
diff
changeset
|
37 |
RELPIPE_LIBS=(lib-common lib-reader lib-writer lib-cli lib-xmlwriter) |
323
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
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) |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
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 |
e2d607e4a4f4
release-v0.18.sh: run apt install only once + small fixes and improvements
František Kučera <franta-hg@frantovo.cz>
parents:
322
diff
changeset
|
40 |
# RELPIPE_TOOLS+=(out-gui.qt tr-python) # not enabled by default |
322
060d2590e77c
first version of release-v0.18.sh
František Kučera <franta-hg@frantovo.cz>
parents:
319
diff
changeset
|
41 |
|
060d2590e77c
first version of release-v0.18.sh
František Kučera <franta-hg@frantovo.cz>
parents:
319
diff
changeset
|
42 |
|
219 | 43 |
# Download all sources: |
322
060d2590e77c
first version of release-v0.18.sh
František Kučera <franta-hg@frantovo.cz>
parents:
319
diff
changeset
|
44 |
relpipe_download "${RELPIPE_LIBS[@]}" "${RELPIPE_TOOLS[@]}" |
250 | 45 |
|
46 |
# 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. |
|
219 | 47 |
|
48 |
# Build and install libraries: |
|
322
060d2590e77c
first version of release-v0.18.sh
František Kučera <franta-hg@frantovo.cz>
parents:
319
diff
changeset
|
49 |
relpipe_install "${RELPIPE_LIBS[@]}" |
219 | 50 |
|
51 |
# Build and install tools: |
|
322
060d2590e77c
first version of release-v0.18.sh
František Kučera <franta-hg@frantovo.cz>
parents:
319
diff
changeset
|
52 |
relpipe_install "${RELPIPE_TOOLS[@]}" |
219 | 53 |
|
282
ec02133045a3
Release v0.14 – SQL, AWK, Bash completion, GPLv3
František Kučera <franta-hg@frantovo.cz>
parents:
264
diff
changeset
|
54 |
# Load Bash completion scripts: |
ec02133045a3
Release v0.14 – SQL, AWK, Bash completion, GPLv3
František Kučera <franta-hg@frantovo.cz>
parents:
264
diff
changeset
|
55 |
for c in "$RELPIPE_SRC"/relpipe-*/bash-completion.sh ; do . "$c"; done |
ec02133045a3
Release v0.14 – SQL, AWK, Bash completion, GPLv3
František Kučera <franta-hg@frantovo.cz>
parents:
264
diff
changeset
|
56 |
|
294
abbc9bcfbcc4
Release v0.15 – streamlets, parallel processing
František Kučera <franta-hg@frantovo.cz>
parents:
282
diff
changeset
|
57 |
# Enable streamlet examples: |
abbc9bcfbcc4
Release v0.15 – streamlets, parallel processing
František Kučera <franta-hg@frantovo.cz>
parents:
282
diff
changeset
|
58 |
export RELPIPE_IN_FILESYSTEM_STREAMLET_PATH="$RELPIPE_SRC"/relpipe-in-filesystem.cpp/streamlet-examples/ |
abbc9bcfbcc4
Release v0.15 – streamlets, parallel processing
František Kučera <franta-hg@frantovo.cz>
parents:
282
diff
changeset
|
59 |
|
219 | 60 |
# Clean-up: |
61 |
unset -f relpipe_install |
|
62 |
unset -f relpipe_download |
|
63 |
unset -v RELPIPE_VERSION |
|
64 |
unset -v RELPIPE_SRC |
|
65 |
unset -v RELPIPE_BUILD |
|
66 |
unset -v RELPIPE_INSTALL |
|
67 |
||
317
fce3d6290c40
Release v0.16 – JACK MIDI output, ports + rename Guile to Scheme + improve CLI interfaces
František Kučera <franta-hg@frantovo.cz>
parents:
297
diff
changeset
|
68 |
# List available JACK ports (the JACK daemon should be running): |
fce3d6290c40
Release v0.16 – JACK MIDI output, ports + rename Guile to Scheme + improve CLI interfaces
František Kučera <franta-hg@frantovo.cz>
parents:
297
diff
changeset
|
69 |
relpipe-in-jack --list-ports true --list-midi-messages false | relpipe-out-tabular |