File: build_astap.sh

package info (click to toggle)
astap 2024.11.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,032 kB
  • sloc: pascal: 49,240; sh: 205; makefile: 5
file content (116 lines) | stat: -rw-r--r-- 4,215 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

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 rm *.rpm
sudo fakeroot dpkg-deb -Zxz --build /home/h/astap_install/astap_amd64
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 ./astap-2*.rpm

#unpack
sudo dpkg -i ./astap_amd64.deb
tar -czvf astap_amd64.tar.gz /opt/astap /usr/share/applications/ASTAP.desktop 

#build amd64 qt5 using stable version!!
rm ~/astap.fpc/astap
/home/h/fpcupdeluxe_stable/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 /usr/share/applications/astap.desktop 
#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 /usr/share/applications/astap.desktop 

#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 /usr/share/applications/astap.desktop 


# read -p "Press any key to resume ..."

#build armhf
#use old compiler. New one has problems with triplets routine
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 /usr/share/applications/astap.desktop 

#build armhf qt5
#use old compiler. New one has problems with triplets routine
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 /usr/share/applications/astap.desktop 

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 
#restore amd64 installation
sudo dpkg -i ./astap_amd64.deb