1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 14:21:16 +00:00

Merge pull request #207 from Zillode/fix-i386

This commit is contained in:
Felix Ableitner 2015-01-17 13:45:10 +01:00
commit 3d9e09a818
2 changed files with 6 additions and 5 deletions

View file

@ -15,7 +15,7 @@ if [ -z $GOROOT ] || [[ $(go version) != go\ version\ go1.4* ]] ; then
tmpgo='build/go'
if [ ! -f "$tmpgo/bin/go" ]; then
# Download GOLANG v1.4
wget -O go.src.tar.gz https://golang.org/dl/go1.4.src.tar.gz
wget -O go.src.tar.gz http://golang.org/dl/go1.4.src.tar.gz
sha1=$(sha1sum go.src.tar.gz)
if [ "$sha1" != "6a7d9bd90550ae1e164d7803b3e945dc8309252b go.src.tar.gz" ]; then
echo "go.src.tar.gz SHA1 checksum does not match!"
@ -34,13 +34,15 @@ if [ -z $GOROOT ] || [[ $(go version) != go\ version\ go1.4* ]] ; then
fi
# Add GO compiler to PATH
export PATH=$PATH:$GOROOT/bin
export PATH=$GOROOT/bin:$PATH
# Disable CGO (no dynamic linking)
export CGO_ENABLED=0
# Check whether GOLANG is compiled with cross-compilation for 386
if [ ! -f $GOROOT/bin/linux_386/go ]; then
pushd $GOROOT/src
# Build GO for cross-compilation
GOOS=linux GOARCH=386 ./make.bash --no-clean
GOOS=linux GOARCH=386 GO386=387 ./make.bash --no-clean
popd
fi

View file

@ -106,10 +106,9 @@ task copyNative(type: Copy) {
def lib_dir = "libs/"
new File(lib_dir).mkdirs()
def st_dir = "bin/";
from st_dir + 'syncthing-x86', st_dir + 'syncthing-armeabi', st_dir + 'syncthing-armeabi-v7a';
from st_dir + 'syncthing-x86', st_dir + 'syncthing-armeabi';
into lib_dir
rename('syncthing-x86', 'x86/libsyncthing.so')
rename('syncthing-armeabi-v7a', 'armeabi-v7a/libsyncthing.so')
rename('syncthing-armeabi', 'armeabi/libsyncthing.so')
}
buildNative.finalizedBy copyNative