-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxastir_src.sh
95 lines (76 loc) · 2.67 KB
/
xastir_src.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
#!/bin/bash
#########################################################
# Created by W7SVT Jan, 2023 ############################
#########################################################
#########################################################
# __ ___________ _____________ _______________ #
# / \ / \______ \/ _____/\ \ / /\__ ___/ #
# \ \/\/ / / /\_____ \ \ Y / | | #
# \ / / / / \ \ / | | #
# \__/\ / /____/ /_______ / \___/ |____| #
# \/ \/ #
#########################################################
cd $HOME/Downloads
echo "###################################################"
echo "# Prepping XASTIR build & prereqs #"
echo "###################################################"
xastir_ver=$(curl -s https://api.github.com/repos/Xastir/Xastir/releases/latest | \
grep "tarball_url" | \
sed 's/..$//' | \
cut -d - -f2,3
)
xastir_stow="/usr/local/stow/xastir_$xastir_ver"
sudo mkdir $xastir_stow
sudo apt-get install -y \
automake \
xorg-dev \
libmotif-dev \
graphicsmagick \
gv \
libcurl4-openssl-dev \
shapelib \
libshp-dev \
libpcre3-dev \
libproj-dev \
libdb-dev \
libax25-dev \
libwebp-dev \
libwebp-dev \
libgraphicsmagick1-dev \
festival \
festival-dev
git clone https://github.com/Xastir/Xastir.git
echo "####################################################"
echo "# Installing XASTIR in stow to remove run #"
echo "# cd /usr/local/stow/&& sudo stow --delete xastir* #"
echo "####################################################"
cd Xastir
./bootstrap.sh
mkdir build
cd build
../configure --prefix=$xastir_stow
make -j$(nproc)
sudo make install
sudo rm $xastir_stow/share/xastir/maps/CC_OpenStreetMap.png
sudo mkdir $xastir_stow/share/applications
echo "########################"
echo "# Desktop Entry & Icon #"
echo "########################"
sudo dd of=$xastir_stow/share/applications/xastir.desktop << EOF
[Desktop Entry]
Name=Xastir
Comment=X Amateur Station Tracking and Information Reporting
Exec=xastir
Icon=$HOME/.local/share/icons/xastir.png
Terminal=false
Type=Application
Categories=HamRadio
Keywords=APRS;HamRadio
EOF
echo "####################################################"
echo "# Stowing XASTIR to remove run #"
echo "# cd /usr/local/stow/&& sudo stow --delete xastir* #"
echo "####################################################"
cp $HOME/Downloads/Xastir/symbols/icon.png $HOME/.local/share/icons/
mv $HOME/.local/share/icons/icon.png $HOME/.local/share/icons/xastir.png
cd $xastir_stow/.. && sudo stow "xastir_$xastir_ver"