forked from indilib/indi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequisites-install.sh
executable file
·77 lines (70 loc) · 2.54 KB
/
requisites-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
set -e
command -v realpath >/dev/null 2>&1 || realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
SRCS=$(dirname $(realpath $0))/..
# TODO
# libtiff-devel ?
OS=$(uname -s)
case "$OS" in
Darwin)
brew install \
git \
cfitsio libnova libusb curl \
gsl jpeg fftw librtlsdr
;;
Linux)
. /etc/os-release
case $ID in
debian|ubuntu|raspbian)
export DEBIAN_FRONTEND=noninteractive
$(command -v sudo) apt-get update
$(command -v sudo) apt-get upgrade -y
$(command -v sudo) apt-get install -y \
git \
cmake build-essential zlib1g-dev \
libcfitsio-dev libnova-dev libusb-1.0-0-dev libcurl4-gnutls-dev \
libgsl-dev libjpeg-dev libfftw3-dev librtlsdr-dev
;;
fedora)
$(command -v sudo) dnf upgrade -y
$(command -v sudo) dnf install -y \
git \
cmake gcc-c++ zlib-devel \
cfitsio-devel libnova-devel libusb-devel libcurl-devel \
gsl-devel libjpeg-devel fftw-devel rtl-sdr-devel
;;
centos)
# CentOS 8 dont have libnova-devel package
$(command -v sudo) yum install -y epel-release
$(command -v sudo) yum upgrade -y
$(command -v sudo) yum install -y \
git \
cmake gcc-c++ zlib-devel \
cfitsio-devel libnova-devel libusb-devel libcurl-devel \
gsl-devel libjpeg-devel fftw-devel rtlsdr-devel
;;
opensuse-tumbleweed)
# broken git/openssh package
$(command -v sudo) zypper refresh
$(command -v sudo) zypper --non-interactive update
$(command -v sudo) zypper --non-interactive install -y \
openssh git \
cmake gcc-c++ zlib-devel \
cfitsio-devel libnova-devel libusb-devel libcurl-devel \
gsl-devel libjpeg-devel fftw-devel rtlsdr-devel libtheora-devel
;;
*)
echo "Unknown Linux Distribution: $ID"
cat /etc/os-release
exit 1
;;
esac
;;
*)
echo "Unknown System: $OS"
exit 1
esac
$SRCS/scripts/googletest-build.sh
$SRCS/scripts/googletest-install.sh