Skip to content
This repository was archived by the owner on Jun 14, 2018. It is now read-only.

Commit f67f62f

Browse files
committed
Bit cleaner build
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
1 parent d2d9044 commit f67f62f

2 files changed

Lines changed: 47 additions & 23 deletions

File tree

linux/AppImage/Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ FROM ubuntu:trusty
22

33
MAINTAINER Roeland Jago Douma <roeland@famdouma.nl>
44

5-
RUN apt-get update
5+
RUN apt-get update && \
6+
apt-get install -y wget libsqlite3-dev libssl-dev cmake git \
7+
software-properties-common build-essential mesa-common-dev fuse rsync
68

7-
RUN apt-get install -y wget libsqlite3-dev libssl-dev cmake git software-properties-common build-essential mesa-common-dev fuse
9+
RUN add-apt-repository -y ppa:beineri/opt-qt58-trusty && \
10+
apt-get update && \
11+
apt-get install -y qt58base qt58tools
812

9-
RUN add-apt-repository -y ppa:beineri/opt-qt58-trusty
10-
11-
RUN apt-get update
12-
13-
RUN apt-get install -y qt58base qt58tools
Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
#/bin/bash
1+
#! /bin/bash
22

3-
#Get Qt-5.8
4-
source /opt/qt58/bin/qt58-env.sh
3+
export SUDO_UID=${SUDO_UID:-1000}
4+
export SUDO_GID=${SUDO_GID:-1000}
55

6-
#QtKeyChain
7-
cd
6+
export APP=Nextcloud
7+
export LOWERAPP=${APP,,}
8+
export ARCH=x86_64
9+
export VERSION=2.3.2-beta
10+
11+
#Set Qt-5.8
12+
export QT_BASE_DIR=/opt/qt58
13+
export QTDIR=$QT_BASE_DIR
14+
export PATH=$QT_BASE_DIR/bin:$PATH
15+
export LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH
16+
export PKG_CONFIG_PATH=$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
17+
18+
#QtKeyChain 0.8.0
19+
cd
820
git clone https://github.com/frankosterfeld/qtkeychain.git
921
cd qtkeychain
1022
git checkout v0.8.0
@@ -15,7 +27,7 @@ make -j4
1527
make install
1628

1729
#Build client
18-
cd
30+
cd
1931
mkdir build-client
2032
cd build-client
2133
cmake -D CMAKE_INSTALL_PREFIX=/app \
@@ -27,12 +39,6 @@ cmake -D CMAKE_INSTALL_PREFIX=/app \
2739
make -j4
2840
make install
2941

30-
#Set info
31-
ARCH=$(arch)
32-
APP=Nextcloud
33-
LOWERAPP=${APP,,}
34-
VERSION=2.3.2-beta
35-
3642
#Create skeleton
3743
mkdir -p $HOME/$APP/$APP.AppDir/usr/
3844
cd $HOME/$APP/
@@ -72,22 +78,41 @@ strip usr/bin/* usr/lib/* || true
7278
rm -rf app/ || true
7379
# Copy, since libssl must be in sync with libcrypto
7480
cp /lib/x86_64-linux-gnu/libssl.so.1.0.0 usr/lib/
75-
81+
# No need to add CMake stuff
82+
rm -rf usr/lib/x86_64-linux-gnu/cmake/
83+
rm -rf usr/mkspecs
84+
# Don't bundle nextcloudcmd as we don't run it anyway
85+
rm usr/bin/nextcloudcmd
86+
# Don't bundle the explorer extentions as we can't do anything with them in the AppImage
87+
rm -rf usr/share/caja-python/
88+
rm -rf usr/share/nautilus-python/
89+
rm -rf usr/share/nemo-python/
7690

7791
#Move qt5.8 libs to the right location
7892
mv ./opt/qt58/lib/* ./usr/lib/
7993
rm -rf ./opt/
8094

8195
#Move sync exlucde to right location
8296
mv ./usr/etc/Nextcloud/sync-exclude.lst ./usr/bin/
97+
rm -rf ./usr/etc
8398

8499
#desktop intergration
85100
get_desktopintegration $LOWERAPP
86101

87102
#Generate the appimage
88103
cd ..
104+
wget -c https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
105+
chmod +x appimagetool-x86_64.AppImage
106+
./appimagetool-x86_64.AppImage --appimage-extract
107+
89108
mkdir -p ../out/
90-
generate_type2_appimage
109+
GLIBC_NEEDED=$(glibc_needed)
110+
APPIMAGE_FILENAME=${APP}-${VERSION}-${ARCH}.glibc$GLIBC_NEEDED.AppImage
111+
APPIMAGE_PATH=../out/$APPIMAGE_FILENAME
112+
113+
./squashfs-root/AppRun -n -v $APP.AppDir $APPIMAGE_PATH
91114

92-
#move appimag
93-
mv ../out/ /home/client/
115+
#move appimage
116+
chown $SUDO_UID:$SUDO_GID ../out/*.AppImage
117+
mkdir -p /home/client/out
118+
mv ../out/*.AppImage /home/client/out/

0 commit comments

Comments
 (0)