File: _build_astap.sh

package info (click to toggle)
astap-cli 2025.10.08-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,224 kB
  • sloc: pascal: 7,668; sh: 292; makefile: 4
file content (133 lines) | stat: -rw-r--r-- 5,317 bytes parent folder | download
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
#!/bin/bash

rm ~/astap.fpc/astap
/home/h/fpcupdeluxe/lazarus/lazbuild /home/h/astap.fpc/astap_linux.lpi
if [[ ! -f ~/astap.fpc/astap ]] ; then
    echo 'AMD64 file does not exist, aborting!!'
    exit
fi

cp /home/h/astap.fpc/astap /home/h/astap_install/astap_amd64/opt/astap
cd /home/h/astap_install
sudo fakeroot dpkg-deb -Zxz --build /home/h/astap_install/astap_amd64


#sudo rm *.rpm
#sudo /home/h/alien/alien-8.95/alien.pl -r -c -k  /home/h/astap_install/astap_amd64.deb
#cp *.rpm astap_amd64.rpm

sudo rm *.rpm
cp /home/h/astap.fpc/astap  home/h/astap_install/rpmbuild/SOURCES/astap_amd64_rpm/opt/astap
rpmbuild -ba ~/astap_install/rpmbuild/SPECS/astap.spec
cp /home/h/astap_install/rpmbuild/RPMS/x86_64/*.rpm ./astap_amd64.rpm
sudo rm /home/h/astap_install/rpmbuild/RPMS/x86_64/*.rpm


#unpack
sudo dpkg -i ./astap_amd64.deb
tar -czvf astap_amd64.tar.gz /opt/astap/astap  /opt/astap/astap.ico /opt/astap/astap.ico /opt/astap/copyright.txt /opt/astap/deep_sky.csv /opt/astap/variable_stars.csv /usr/share/applications/ASTAP.desktop /usr/local/bin/astap /opt/astap/dcraw-astap /opt/astap/unprocessed_raw-astap


rm ~/astap.fpc/astap
/home/h/fpcupdeluxe/lazarus/lazbuild /home/h/astap.fpc/astap_linux_qt5.lpi
if [[ ! -f ~/astap.fpc/astap ]] ; then
    echo 'AMD64 QT5 file does not exist, aborting!!'
    exit
fi
sudo cp /home/h/astap.fpc/astap /opt/astap
tar -czvf astap_amd64_qt5.tar.gz /opt/astap/astap  /opt/astap/astap.ico /opt/astap/astap.ico /opt/astap/copyright.txt /opt/astap/deep_sky.csv /opt/astap/variable_stars.csv /usr/share/applications/ASTAP.desktop /opt/astap/dcraw-astap /opt/astap/unprocessed_raw-astap

#Build i386    
rm ~/astap.fpc/astap                                
/home/h/fpcupdeluxe/lazarus/lazbuild /home/h/astap.fpc/astap_linux_gkt2_i386.lpi                  
if [[ ! -f ~/astap.fpc/astap ]] ; then
    echo 'I386 file does not exist, aborting!!'
    exit
fi
cp /home/h/astap.fpc/astap /home/h/astap_install/astap_i386/opt/astap
cd /home/h/astap_install
sudo fakeroot dpkg-deb -Zxz --build /home/h/astap_install/astap_i386



#build aarch64
rm ~/astap.fpc/astap 
/home/h/fpcupdeluxe/lazarus/lazbuild /home/h/astap.fpc/astap_linux_aarch64.lpi                  
if [[ ! -f ~/astap.fpc/astap ]] ; then
    echo 'aarch64 file does not exist, aborting!!'
    exit
fi
cp /home/h/astap.fpc/astap /home/h/astap_install/astap_aarch64/opt/astap
cd /home/h/astap_install
sudo fakeroot dpkg-deb -Zxz --build /home/h/astap_install/astap_aarch64
sudo cp /home/h/astap.fpc/astap /opt/astap
sudo cp /home/h/astap_install/astap_aarch64/opt/astap/unprocessed_raw-astap /opt/astap
tar -czvf astap_aarch64.tar.gz /opt/astap/astap   /opt/astap/astap.ico /opt/astap/*.txt /opt/astap/deep_sky.csv /opt/astap/variable_stars.csv /usr/share/applications/ASTAP.desktop  /opt/astap/unprocessed_raw-astap


#build aarch64 qt5
rm ~/astap.fpc/astap 
/home/h/fpcupdeluxe/lazarus/lazbuild /home/h/astap.fpc/astap_linux_aarch64_qt5.lpi
 if [[ ! -f ~/astap.fpc/astap ]] ; then
    echo 'aarch64 qt5 file does not exist, aborting!!'
    exit
fi
sudo cp /home/h/astap.fpc/astap /opt/astap
tar -czvf astap_aarch64_qt5.tar.gz /opt/astap/astap   /opt/astap/astap.ico /opt/astap/*.txt /opt/astap/deep_sky.csv /opt/astap/variable_stars.csv /usr/share/applications/ASTAP.desktop  /opt/astap/unprocessed_raw-astap



rm ~/astap.fpc/astap                                     
/home/h/fpcupdeluxe/lazarus/lazbuild /home/h/astap.fpc/astap_linux_cross_compile_to_Darwin_M1.lpi
if [[ ! -f ~/astap.fpc/astap ]] ; then
    echo 'macos M1 file does not exist, aborting!!'
    exit
fi 
zip astap_mac_M1.zip /home/h/astap.fpc/astap

rm ~/astap.fpc/astap  
/home/h/fpcupdeluxe/lazarus/lazbuild /home/h/astap.fpc/astap_linux_cross_compile_to_Darwin_X86_64.lpi

zip astap_mac_X86_64.zip /home/h/astap.fpc/astap
if [[ ! -f ~/astap.fpc/astap ]] ; then
    echo 'macos file does not exist, aborting!!'
    exit
fi 


#build armhf
#use stable version!!
rm ~/astap.fpc/astap 
/home/h/fpcupdeluxe_stable/lazarus/lazbuild /home/h/astap.fpc/astap_linux_armhf.lpi 
if [[ ! -f ~/astap.fpc/astap ]] ; then
    echo 'armhf file does not exist, aborting!!'
    exit
fi 
cp /home/h/astap.fpc/astap /home/h/astap_install/astap_armhf/opt/astap
cd /home/h/astap_install
sudo fakeroot dpkg-deb -Zxz --build /home/h/astap_install/astap_armhf
sudo cp /home/h/astap.fpc/astap /opt/astap
sudo cp /home/h/astap_install/astap_armhf/opt/astap/unprocessed_raw-astap /opt/astap
# not dcraw-astap
tar -czvf astap_armhf.tar.gz /opt/astap/astap   /opt/astap/astap.ico /opt/astap/*.txt /opt/astap/deep_sky.csv /opt/astap/variable_stars.csv /usr/share/applications/ASTAP.desktop  /opt/astap/unprocessed_raw-astap


# read -p "Press any key to resume ..."
#build armhf qt5
#use stable compiler. 
rm ~/astap.fpc/astap 
/home/h/fpcupdeluxe_stable/lazarus/lazbuild /home/h/astap.fpc/astap_linux_armhf_qt5.lpi 
if [[ ! -f ~/astap.fpc/astap ]] ; then
    echo 'armhf qt5 file does not exist, aborting!!'
    exit
fi 
sudo cp /home/h/astap.fpc/astap /opt/astap
tar -czvf astap_armhf_qt5.tar.gz /opt/astap/astap   /opt/astap/astap.ico /opt/astap/*.txt /opt/astap/deep_sky.csv /opt/astap/variable_stars.csv /usr/share/applications/ASTAP.desktop  /opt/astap/unprocessed_raw-astap



#restore amd64 installation
sudo dpkg -i ./astap_amd64.deb

read -p "Press any key to continue"