Skip to content

Commit eda9edf

Browse files
authored
Merge pull request AppImage#7 from probonopd/32-bit
Also build 32-bit versions
2 parents b0dbc13 + 546e0f6 commit eda9edf

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

.travis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@ arch:
77
- arm64
88

99
script:
10+
- echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4" | sudo tee -a /etc/resolv.conf # Fix 'temporary error (try again later)'? https://github.com/gliderlabs/docker-alpine/issues/386
11+
# 64-bit
12+
- if [ "$TRAVIS_ARCH" == "aarch64" ] ; then export ARCHITECTURE=aarch64; else export ARCHITECTURE=x86_64; fi
1013
- env
1114
- bash -ex build.sh
12-
15+
# Also build 32-bit versions in the same go
16+
- if [ "$TRAVIS_ARCH" == "aarch64" ] ; then export ARCHITECTURE=armhf; else export ARCHITECTURE=x86; fi
17+
- env
18+
- bash -ex build.sh
19+
1320
after_success:
1421
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
1522
- bash upload.sh ./out/*

build.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
if [ "$TRAVIS_ARCH" == "aarch64" ] ; then
2-
export ARCHITECTURE=aarch64
3-
else
4-
export ARCHITECTURE=x86_64
5-
fi
6-
71
#############################################
82
# Download and extract minimal Alpine system
93
#############################################
104

115
wget http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/$ARCHITECTURE/alpine-minirootfs-3.10.2-$ARCHITECTURE.tar.gz
6+
sudo rm -rf ./miniroot true # Clean up from previous runs
127
mkdir -p ./miniroot
138
cd ./miniroot
14-
tar xf ../alpine-minirootfs-3.10.2-$ARCHITECTURE.tar.gz
9+
sudo tar xf ../alpine-minirootfs-3.10.2-$ARCHITECTURE.tar.gz
1510
cd -
1611

1712
#############################################
@@ -88,7 +83,7 @@ meson ..
8883
ninja -v
8984
libs=$(ldd ./tools/appstreamcli | cut -d " " -f 3 | sort | uniq )
9085
cp $libs tools/
91-
cp /lib/ld-musl-$ARCHITECTURE.so.1 tools/
86+
cp /lib/ld-musl-*.so.1 tools/
9287
patchelf --set-rpath '$ORIGIN' tools/appstreamcli
9388
strip ./tools/appstreamcli
9489
(cd tools/ ; tar cfvj ../appstreamcli.tar.bz2 * )
@@ -117,6 +112,10 @@ sudo umount miniroot/proc miniroot/sys miniroot/dev
117112
# Copy build artefacts out
118113
#############################################
119114

115+
116+
# Use the same architecture names as https://github.com/AppImage/AppImageKit/releases/
117+
if [ "$ARCHITECTURE" == "x86" ] ; then export ARCHITECTURE=i686 ; fi
118+
120119
mkdir -p out/
121120
sudo find miniroot/ -type f -executable -name 'mksquashfs' -exec cp {} out/mksquashfs-$ARCHITECTURE \; 2>/dev/null
122121
sudo find miniroot/ -type f -executable -name 'unsquashfs' -exec cp {} out/unsquashfs-$ARCHITECTURE \; 2>/dev/null
@@ -126,3 +125,4 @@ sudo find miniroot/ -type f -executable -name 'desktop-file-validate' -exec cp {
126125
sudo find miniroot/ -type f -executable -name 'update-desktop-database' -exec cp {} out/update-desktop-database-$ARCHITECTURE \; 2>/dev/null
127126
sudo find miniroot/ -type f -name 'appstreamcli.tar.bz2' -exec cp {} out/appstreamcli-$ARCHITECTURE.tar.bz2 \; 2>/dev/null
128127
sudo find patchelf-*/ -type f -executable -name 'patchelf' -exec cp {} out/patchelf-$ARCHITECTURE \; 2>/dev/null
128+
sudo rm -rf miniroot/ patchelf-*/

0 commit comments

Comments
 (0)