-
Notifications
You must be signed in to change notification settings - Fork 1
/
mkpkg-8.sh
executable file
·73 lines (53 loc) · 1.8 KB
/
mkpkg-8.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
#!/bin/sh
buildver=$1
if [ -z "$buildver" ]; then
echo "Provide build version string: x.y.z-n"
exit
fi
tarball="`pwd`/_tarball"
build="_build"
install="$PWD/_install"
mkdir -p $tarball
###
### 8.0 section
###
# start a clean slate
rm -rf $build
## 8.0 aarch64
aprefix="$install/aarch64-8.0.0"
atargetlibdir="$build/target/qnx/aarch64le/usr/lib/wolfssl"
atargetbindir="$build/target/qnx/aarch64le/usr/bin/wolfssl"
atargetincdir="$build/target/qnx/aarch64le/usr/include/wolfssl/curl"
astrip="aarch64-unknown-nto-qnx8.0.0-strip"
mkdir -p $atargetlibdir
cp -p $aprefix/lib/libcurl.a $aprefix/lib/libcurl.so* $atargetlibdir
cp -p $aprefix/lib/libcurl.so.12 $atargetlibdir/libcurl.so.12.sym
$astrip $atargetlibdir/libcurl.so.12 $atargetlibdir/libcurl.so
mkdir -p $atargetbindir
cp -p $aprefix/bin/curl $atargetbindir
cp -p $aprefix/bin/curl $atargetbindir/curl.sym
$astrip $atargetbindir/curl
mkdir -p $atargetincdir
cp -p $aprefix/include/curl/*.h $atargetincdir
## 8.0 x86_64
xprefix="$install/x86_64-8.0.0"
xtargetlibdir="$build/target/qnx/x86_64/usr/lib/wolfssl"
xtargetbindir="$build/target/qnx/x86_64/usr/bin/wolfssl"
xtargetincdir="$build/target/qnx/x86_64/usr/include/wolfssl/curl"
xstrip="x86_64-pc-nto-qnx8.0.0-strip"
mkdir -p $xtargetlibdir
cp -p $xprefix/lib/libcurl.a $xprefix/lib/libcurl.so* $xtargetlibdir
cp -p $xprefix/lib/libcurl.so.12 $xtargetlibdir/libcurl.so.12.sym
$xstrip $xtargetlibdir/libcurl.so.12 $xtargetlibdir/libcurl.so
mkdir -p $xtargetbindir
cp -p $xprefix/bin/curl $xtargetbindir
cp -p $xprefix/bin/curl $xtargetbindir/curl.sym
$xstrip $xtargetbindir/curl
mkdir -p $xtargetincdir
cp -p $xprefix/include/curl/*.h $xtargetincdir
## 8.0 documentation
cp README-QNX.md "$build/target/qnx/"
## build the 8.0 package
cd $build
tar czf curl-$buildver-qnxsdp8.0.tar.gz target/qnx
mv *tar.gz $tarball