-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild
More file actions
executable file
·43 lines (33 loc) · 1.11 KB
/
build
File metadata and controls
executable file
·43 lines (33 loc) · 1.11 KB
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
#!/bin/bash -e
# Copyright © 2020-2026 Matt Robinson
#
# SPDX-License-Identifier: GPL-3.0-or-later
if [ -z "$ANDROID_NDK_HOME" ]; then
echo "ANDROID_NDK_HOME is not set" >&2
exit 1
fi
TARGET=${TARGET:-armv7a-linux-androideabi}
PLATFORM=21
toolchain=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64
version=$(cat rsync-version)
patches=$(find . -maxdepth 1 -name "*.patch" | wc -l)
[ "$patches" -lt 1 ] && unset -v patches
[ -d buildinfo ] || mkdir buildinfo
echo $PLATFORM > buildinfo/minsdk
echo "$version${patches+p$patches}" > buildinfo/release
grep Pkg.Revision "$ANDROID_NDK_HOME/source.properties" | \
cut -d ' ' -f 3 >> buildinfo/ndkver
git clone -b "$version" --depth 1 https://github.com/RsyncProject/rsync.git
cd rsync
if [ "$patches" ]; then
for patch in ../*.patch; do
patch -p1 < "$patch"
done
fi
./configure --host="$TARGET" --disable-md2man \
--disable-lz4 --disable-openssl --disable-xxhash --disable-zstd \
AR="$toolchain/bin/llvm-ar" \
CC="$toolchain/bin/$TARGET$PLATFORM-clang" \
RANLIB="$toolchain/bin/llvm-ranlib" \
make
"$toolchain/bin/llvm-strip" rsync