-
Notifications
You must be signed in to change notification settings - Fork 1
/
mkrelease.sh
executable file
·203 lines (168 loc) · 4.35 KB
/
mkrelease.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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
#!/bin/bash
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
set -eu
tarball="${1:-}"
build="${2:-1}"
if [ -z "$tarball" ]; then
echo "Provide a curl release tarball name as argument"
exit
fi
i="0"
for dl in curl-*; do
i=$(expr $i + 1)
done
if test "$i" -gt 1; then
echo "multiple curl-* entries found, disambiguate please"
exit
fi
. "./setup"
if [ -z "$QNX700" ]; then
echo "Set QNX700 in the setup file"
exit
fi
if [ -z "$QNX710" ]; then
echo "Set QNX710 in the setup file"
exit
fi
if [ -z "$QNX800" ]; then
echo "Set QNX800 in the setup file"
exit
fi
# remove previous curl release leftovers
rm -rf build-* _install _tarball
# extract the release contents
tar xf "$tarball"
curlver=$(grep '#define LIBCURL_VERSION ' curl-*/include/curl/curlver.h | sed 's/[^0-9.]//g')
buildver="$curlver-$build"
echo "Create QNX curl release $buildver"
# install everything here
mkdir _install
# make dedicated build dirs for every build
mkdir build-70-aarch64
mkdir build-70-armle-v7
mkdir build-70-x86_64
mkdir build-71-aarch64
mkdir build-71-armle-v7
mkdir build-71-x86_64
mkdir build-80-aarch64
mkdir build-80-x86_64
#
# SDK 7.0 builds
#
. "$QNX700/qnxsdp-env.sh" 2>&1 > /dev/null
## 7.0 for aarch64
pushd build-70-aarch64 >/dev/null
echo "7.0 aarch64"
echo " - configure"
sh ../conf/7.0-aarch64 >configure.log 2>&1
echo " - build"
make -sj >make.log 2>&1
echo " - install"
make install >make-install.log 2>&1
popd > /dev/null
## 7.0 for arlmle-v7
pushd build-70-armle-v7 > /dev/null
echo "7.0 armle-v7"
echo " - configure"
sh ../conf/7.0-armle-v7 >configure.log 2>&1
echo " - build"
make -sj >make.log 2>&1
echo " - install"
make install >make-install.log 2>&1
popd> /dev/null
## 7.0 for x86_64
pushd build-70-x86_64 > /dev/null
echo "7.0 x86_64"
echo " - configure"
sh ../conf/7.0-x86_64 >configure.log 2>&1
echo " - build"
make -sj >make.log 2>&1
echo " - install"
make install >make-install.log 2>&1
popd> /dev/null
#
# SDK 7.1 builds
#
. "$QNX710/qnxsdp-env.sh" 2>&1 > /dev/null
## 7.1 for aarch64
pushd build-71-aarch64 >/dev/null
echo "7.1 aarch64"
echo " - configure"
sh ../conf/7.1-aarch64 >configure.log 2>&1
echo " - build"
make -sj >make.log 2>&1
echo " - install"
make install >make-install.log 2>&1
popd > /dev/null
## 7.1 for arlmle-v7
pushd build-71-armle-v7 > /dev/null
echo "7.1 armle-v7"
echo " - configure"
sh ../conf/7.1-armle-v7 >configure.log 2>&1
echo " - build"
make -sj >make.log 2>&1
echo " - install"
make install >make-install.log 2>&1
popd> /dev/null
## 7.1 for x86_64
pushd build-71-x86_64 > /dev/null
echo "7.1 x86_64"
echo " - configure"
sh ../conf/7.1-x86_64 >configure.log 2>&1
echo " - build"
make -sj >make.log 2>&1
echo " - install"
make install >make-install.log 2>&1
popd> /dev/null
#
# SDK 8.0 builds
#
. $QNX800/qnxsdp-env.sh 2>&1 > /dev/null
## 8.0 for aarch64
pushd build-80-aarch64 > /dev/null
echo "8.0 aarch64"
echo " - configure"
sh ../conf/8.0-aarch64 >configure.log 2>&1
echo " - build"
make -sj >make.log 2>&1
echo " - install"
make install >make-install.log 2>&1
popd > /dev/null
## 8.0 for x86_64
pushd build-80-x86_64 > /dev/null
echo "8.0 x86_64"
echo " - configure"
sh ../conf/8.0-x86_64 >configure.log 2>&1
echo " - build"
make -sj >make.log 2>&1
echo " - install"
make install >make-install.log 2>&1
popd > /dev/null
# generate the tarballs
sh mkpkg-70.sh $buildver
sh mkpkg-71.sh $buildver
sh mkpkg-8.sh $buildver
ls -l _tarball/curl-*
sh sign.sh