-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpkg_sdrangelsrv
executable file
·177 lines (159 loc) · 6.29 KB
/
pkg_sdrangelsrv
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#!/bin/bash
###
### SIGpi
###
### pkg_sdrangelsrv
###
###
case "$1" in
remove )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## Remove SDRangel Server"
echo -e "${SIGPI_BANNER_RESET}"
sudo dpkg -r sdrangelsrv
sed -i /sdrangelsrv/d $SIGPI_INSTALLED
rm $HOME/.config/f4exb/fftw-wisdom
rm $HOME/.local/share/f4exb/SDRangel/fftw-wisdom
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## SDRangel Server Removed"
echo -e "${SIGPI_BANNER_RESET}"
;;
purge )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## Purge SDRangel Server"
echo -e "${SIGPI_BANNER_RESET}"
sudo dpkg -P sdrangelsrv
sed -i /sdrangelsrv/d $SIGPI_INSTALLED
rm $HOME/.config/f4exb/fftw-wisdom
rm $HOME/.local/share/f4exb/SDRangel/fftw-wisdom
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## SDRangel Server Purged"
echo -e "${SIGPI_BANNER_RESET}"
;;
install )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ##"
echo -e "${SIGPI_BANNER_COLOR} ## Install SDRangel Server"
echo -e "${SIGPI_BANNER_COLOR} ##"
echo -e "${SIGPI_BANNER_RESET}"
## DEPENDENCIES
sudo apt-get install -y libfftw3-dev
sudo apt-get install -y libusb-1.0-0-dev
sudo apt-get install -y libusb-dev
sudo apt-get install -y libboost-all-dev
sudo apt-get install -y libasound2-dev
sudo apt-get install -y libgl1-mesa-dev
sudo apt-get install -y gettext
sudo apt-get install -y pulseaudio
sudo apt-get install -y libopencv-dev
sudo apt-get install -y libxml2-dev
sudo apt-get install -y bison
sudo apt-get install -y flex
sudo apt-get install -y ffmpeg
sudo apt-get install -y libavcodec-dev
sudo apt-get install -y libavformat-dev
sudo apt-get install -y opus-tools
sudo apt-get install -y libopus-dev
sudo apt-get install -y qml-module-qtlocation
sudo apt-get install -y qml-module-qtpositioning
sudo apt-get install -y qml-module-qtquick-window2
sudo apt-get install -y qml-module-qtquick-dialogs
sudo apt-get install -y qml-module-qtquick-controls
sudo apt-get install -y qml-module-qtquick-layouts
## PACKAGE
cd $SIGPI_PACKAGES
if [[ "$SIGPI_HWARCH" == "x86_64" ]]; then
cd $SIGPI_DEBS
sudo dpkg -i sdrangelsrv_current_amd64.deb
fi
if [[ "$SIGPI_HWARCH" == "aarch64" ]]; then
cd $SIGPI_DEBS
sudo dpkg -i sdrangelsrv_current_arm64.deb
fi
cat $SIGPI_PKGLIST|grep "sdrangelsrv" >> $SIGPI_INSTALLED
### FFTW-WISDOM CHECK AND LINK
mkdir $HOME/.config/f4exb
mkdir $HOME/.local/share/f4exb
mkdir $HOME/.local/share/f4exb/SDRangel
if [ ! -f "$SIGPI_ETC/fftw-wisdom" ]; then
fftwf-wisdom -v -n -o $SIGPI_ETC/fftw-wisdom 128 256 512 1024 2048 4096 8192 16384 32768
fi
cp $SIGPI_ETC/fftw-wisdom $HOME/.local/share/f4exb/SDRangel/fftw-wisdom
cp $SIGPI_ETC/fftw-wisdom $HOME/.config/f4exb/SDRangel/fftw-wisdom
## DESKTOP
# Add Icon
# Add Desktop
# Change Category
# Add to Menu
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## SDRangel Server Installed"
echo -e "${SIGPI_BANNER_RESET}"
;;
build )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ##"
echo -e "${SIGPI_BANNER_COLOR} ## Build SDRangel Server"
echo -e "${SIGPI_BANNER_COLOR} ##"
echo -e "${SIGPI_BANNER_RESET}"
## DEPENDENCIES
sudo apt-get install -y libfftw3-dev
sudo apt-get install -y libusb-1.0-0-dev
sudo apt-get install -y libusb-dev
sudo apt-get install -y libboost-all-dev
sudo apt-get install -y libasound2-dev
sudo apt-get install -y libgl1-mesa-dev
sudo apt-get install -y gettext
sudo apt-get install -y pulseaudio
sudo apt-get install -y libopencv-dev
sudo apt-get install -y libxml2-dev
sudo apt-get install -y bison
sudo apt-get install -y flex
sudo apt-get install -y ffmpeg
sudo apt-get install -y libavcodec-dev
sudo apt-get install -y libavformat-dev
sudo apt-get install -y opus-tools
sudo apt-get install -y libopus-dev
sudo apt-get install -y qml-module-qtlocation
sudo apt-get install -y qml-module-qtpositioning
sudo apt-get install -y qml-module-qtquick-window2
sudo apt-get install -y qml-module-qtquick-dialogs
sudo apt-get install -y qml-module-qtquick-controls
sudo apt-get install -y qml-module-qtquick-layouts
## PACKAGE
cd $SIGPI_SOURCE
git clone https://github.com/f4exb/sdrangel.git
cd sdrangel
#git reset --hard 7b85db4 # v7.15.4
#git reset --hard 513c0e5 # v7.16.0
#git reset --hard c9075d4 # v7.17.0
#git reset --hard cdcb73f # v7.17.1
#git reset --hard 78068fd # v7.17.2
#git reset --hard 5dcf7f7 # v7.17.3
#git reset --hard ac651ff # v7.18.0
#git reset --hard 99b3c72 # v7.18.1
#git reset --hard 2550f73 # v7.19.0
#git reset --hard cb89392 # v7.19.1
#git reset --hard cdae5ca # v7.20.0
#git reset --hard 1836ae3 # v7.20.1
#git reset --hard 1d87e1e # v7.21.0
git reset --hard 4538d46 # v7.21.1
mkdir build && cd build
cmake .. -Wno-dev -DBUILD_GUI=off
make -j4
sudo checkinstall --install=no
sudo mv *.deb $SIGPI_DEBS
## DESKTOP
# Add Icon
# Add Desktop
# Change Category
# Add to Menu
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## SDRangel Server Built. Debian package available in $SIGPI_DEBS""
echo -e "${SIGPI_BANNER_RESET}"
;;
* )
echo -e "${SIGPI_BANNER_COLOR}"
echo -e "${SIGPI_BANNER_COLOR} ## ERROR: Unkown action or package"
echo -e "${SIGPI_BANNER_RESET}"
;;
esac