forked from pilight/pilight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile_all.sh
162 lines (146 loc) · 4.14 KB
/
compile_all.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#!/usr/bin/env bash
find . -name hardware_header.h -exec rm {} \;
find . -name hardware_init.h -exec rm {} \;
find . -name protocol_header.h -exec rm {} \;
find . -name protocol_init.h -exec rm {} \;
find . -name operator_header.h -exec rm {} \;
find . -name operator_init.h -exec rm {} \;
find . -name action_header.h -exec rm {} \;
find . -name action_init.h -exec rm {} \;
git checkout master
git stash
git stash clear
git pull origin master
git fetch --tags
cp CMakeLists.txt CMakeLists.txt.original
GIT=$(git describe --always | sed -e 's/^v//g');
COMMIT=$(echo $GIT | cut -d'-' -f2);
SHA=$(echo $GIT | cut -d'-' -f3);
VERSION=$(echo $GIT | cut -d'-' -f1 | sed -e 's/^v//g');
sed -e"" 's/MODULESPACK ON/MODULESPACK OFF/g' CMakeLists.txt > CMakeLists.txt.tmp
cp CMakeLists.txt.tmp CMakeLists.txt
./setup.sh clear
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/pilight/tools/toolchain-amd64.cmake
make -j4
cpack -G DEB
mv *.deb ../
cd ..
./gen_package.sh amd64
sed -e"" 's/MODULESPACK ON/MODULESPACK OFF/g' CMakeLists.txt > CMakeLists.txt.tmp
cp CMakeLists.txt.tmp CMakeLists.txt
./setup.sh clear
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/pilight/tools/toolchain-amd64.cmake -DCMAKE_BUILD_TYPE=Debug
make -j4
cpack -G DEB
mv *.deb ../
cd ..
./gen_package.sh amd64 debug
sed -e"" 's/MODULESPACK ON/MODULESPACK OFF/g' CMakeLists.txt > CMakeLists.txt.tmp
cp CMakeLists.txt.tmp CMakeLists.txt
./setup.sh clear
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/pilight/tools/toolchain-i386.cmake
make -j4
cpack -G DEB
mv *.deb ../
cd ..
./gen_package.sh i386
sed -e"" 's/MODULESPACK ON/MODULESPACK OFF/g' CMakeLists.txt > CMakeLists.txt.tmp
cp CMakeLists.txt.tmp CMakeLists.txt
./setup.sh clear
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/pilight/tools/toolchain-i386.cmake -DCMAKE_BUILD_TYPE=Debug
make -j4
cpack -G DEB
mv *.deb ../
cd ..
./gen_package.sh i386 debug
sed -e"" 's/MODULESPACK ON/MODULESPACK OFF/g' CMakeLists.txt > CMakeLists.txt.tmp
cp CMakeLists.txt.tmp CMakeLists.txt
./setup.sh clear
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/pilight/tools/toolchain-arm.cmake -DCMAKE_C_FLAGS=-fomit-frame-pointer
make -j4
cpack -G DEB
mv *.deb ../
cd ..
./gen_package.sh armhf
sed -e"" 's/MODULESPACK ON/MODULESPACK OFF/g' CMakeLists.txt > CMakeLists.txt.tmp
cp CMakeLists.txt.tmp CMakeLists.txt
./setup.sh clear
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/pilight/tools/toolchain-arm.cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fomit-frame-pointer
make -j4
cpack -G DEB
mv *.deb ../
cd ..
./gen_package.sh armhf debug
sed -e"" 's/MODULESPACK ON/MODULESPACK OFF/g' CMakeLists.txt > CMakeLists.txt.tmp
cp CMakeLists.txt.tmp CMakeLists.txt
./setup.sh clear
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/pilight/tools/toolchain-mipsel.cmake
make -j4
cpack -G DEB
mv *.deb ../
cd ..
./gen_package.sh mipsel
sed -e"" 's/MODULESPACK ON/MODULESPACK OFF/g' CMakeLists.txt > CMakeLists.txt.tmp
cp CMakeLists.txt.tmp CMakeLists.txt
./setup.sh clear
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/pilight/tools/toolchain-mipsel.cmake -DCMAKE_BUILD_TYPE=Debug
make -j4
cpack -G DEB
mv *.deb ../
cd ..
./gen_package.sh mipsel debug
sed -e"" 's/MODULESPACK ON/MODULESPACK OFF/g' CMakeLists.txt > CMakeLists.txt.tmp
cp CMakeLists.txt.tmp CMakeLists.txt
./setup.sh clear
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/pilight/tools/toolchain-aarch64.cmake
make -j4
cpack -G DEB
mv *.deb ../
cd ..
for i in $(find *.deb); do
cp $i $i.cpy;
done
./gen_package.sh arm64
for i in $(find *.cpy); do
mv $i ${i/.cpy/};
done
./gen_package.sh aarch64
sed -e"" 's/MODULESPACK ON/MODULESPACK OFF/g' CMakeLists.txt > CMakeLists.txt.tmp
cp CMakeLists.txt.tmp CMakeLists.txt
./setup.sh clear
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/pilight/tools/toolchain-aarch64.cmake -DCMAKE_BUILD_TYPE=Debug
make -j4
cpack -G DEB
mv *.deb ../
cd ..
for i in $(find *.deb); do
cp $i $i.cpy;
done
./gen_package.sh arm64 debug
for i in $(find *.cpy); do
mv $i ${i/.cpy/};
done
./gen_package.sh aarch64 debug
mv CMakeLists.txt.original CMakeLists.txt
rm CMakeLists.txt.tmp
rm -r build/