-
Notifications
You must be signed in to change notification settings - Fork 20
/
install.sh
executable file
·146 lines (120 loc) · 3.63 KB
/
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/bin/bash
SNAPCAST_ARCH=$(dpkg --print-architecture)
SNAPCASTVERSION=0.26.0
clear
# Set up the shell variables for colors
# http://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux
yellow=`tput setaf 3`;
green=`tput setaf 2`;
clear=`tput sgr0`;
echo "${green}"
echo "============================================"
echo ""
echo "Install Required Packages"
echo ""
echo "============================================"
echo "${clear}"
apt-get update
apt-get install -y ssl-cert \
wget \
curl \
gcc \
gnupg \
zip \
ca-certificates \
python3 \
python3-pip \
python3-crypto \
python3-setuptools \
python3-pykka \
python3-gst-1.0 \
gstreamer1.0-libav \
gstreamer1.0-plugins-ugly \
gstreamer1.0-tools
echo "${green}"
echo "============================================"
echo ""
echo "Configure Mopidy Repository"
echo ""
echo "============================================"
echo "${clear}"
mkdir -p /usr/local/share/keyrings
wget -q -O /usr/local/share/keyrings/mopidy-archive-keyring.gpg https://apt.mopidy.com/mopidy.gpg
wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/buster.list
echo "${green}"
echo "============================================"
echo ""
echo "Install Mopidy & Extensions from deb Packages"
echo ""
echo "============================================"
echo "${clear}"
apt-get update
apt-get install -y \
mopidy \
mopidy-tunein \
mopidy-soundcloud
echo "${green}"
echo "============================================"
echo ""
echo "Install Mopidy additional Extensions from PyPi"
echo ""
echo "============================================"
echo "${clear}"
python3 -m pip install https://github.com/natumbri/mopidy-youtube/archive/develop.zip
python3 -m pip install --upgrade youtube-dl
python3 -m pip install Mopidy-Bandcamp
python3 -m pip install jinja2 tornado
echo "${green}"
echo "============================================"
echo ""
echo "Install Snapcast Server"
echo ""
echo "============================================"
echo "${clear}"
apt-get update
apt-get install libavahi-client3 libavahi-common3 libatomic1
wget https://github.com/badaix/snapcast/releases/download/v${SNAPCASTVERSION}/snapserver_${SNAPCASTVERSION}-1_${SNAPCAST_ARCH}.deb
dpkg -i --force-all snapserver_${SNAPCASTVERSION}-1_${SNAPCAST_ARCH}.deb
apt-get -f install -y
# install spotify workaround
# Install mopidy-spotify-gstspotify (Hack, not released yet!)
# (https://github.com/kingosticks/mopidy-spotify/tree/gstspotifysrc-hack)
echo "${green}"
echo "============================================"
echo ""
echo "Install Spotify Workaround"
echo ""
echo "============================================"
echo "${clear}"
curl -sLO https://github.com/mariolukas/gst-plugins-rs-builder/releases/download/2023-01-25/gst-plugin-spotify_0.9.8_amd64.deb
dpkg -i gst-plugin-spotify_0.9.7_amd64.deb
git clone --depth 1 -b gstspotifysrc-hack https://github.com/kingosticks/mopidy-spotify.git mopidy-spotify
cd mopidy-spotify
python3 setup.py install
cd ..
rm -rf mopidy-spotify
echo "${green}"
echo "============================================"
echo ""
echo "Install HydraPlay"
echo ""
echo "============================================"
echo "${clear}"
cd tmp
mkdir source
cd source
curl -s https://api.github.com/repos/mariolukas/HydraPlay/releases/latest \
| grep "hydraplay-.*zip" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
unzip *.zip
python3 setup.py install
echo "${green}"
echo "============================================"
echo ""
echo "Installation Finished."
echo ""
echo "============================================"
echo "${clear}"
tail -F /dev/null