-
Notifications
You must be signed in to change notification settings - Fork 1
/
builder-arm64.sh
executable file
·34 lines (27 loc) · 1.01 KB
/
builder-arm64.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
#!/bin/sh
#######################################################################
# Copyright (c) 2024 Silvio Clecio (silvioprog) <silvioprog@gmail.com>
#
# SPDX-License-Identifier: MIT
#######################################################################
set -e
workdir=/sagui/libsagui
dist=/sagui/output
cmake_cmd="cmake -Wno-dev"
clean() {
cd $workdir
rm -rf ./build
mkdir build
cd build
}
version=$(curl -s https://raw.githubusercontent.com/risoflora/libsagui/main/include/sagui.h | sed -n 's/#define SG_VERSION_\(.*\) \([0-9]\)/\2/p' | tr '\n' '.' | sed 's/.$//')
git clone https://github.com/risoflora/libsagui.git libsagui
# linux_arm64
clean
$cmake_cmd -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=./Output ..
make package
cp "libsagui-$version.tar.gz" "$dist/libsagui-$version-linux_arm64.tar.gz"
# linux_arm64 (TLS)
$cmake_cmd -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=./Output -DSG_HTTPS_SUPPORT=ON ..
make package
cp "libsagui-$version.tar.gz" "$dist/libsagui_tls-$version-linux_arm64.tar.gz"