Moved the appimage project into the main tree
[citadel.git] / appimage / build_appimage.sh
1 #!/bin/bash
2
3 CTDLROOT=../citadel
4
5 rm -frv citadel.AppDir/usr
6 mkdir -p citadel.AppDir/usr/bin
7 mkdir -p citadel.AppDir/usr/lib
8
9 pushd citadel.AppDir
10 cc ctdlvisor.c -o ctdlvisor || exit 1
11 popd
12
13 for bin in $CTDLROOT/citadel/citserver $CTDLROOT/webcit/webcit
14 do
15         cp -v $bin citadel.AppDir/usr/bin/
16         for x in `ldd $bin | awk ' { print $3 } ' | grep -v -e '^$' | grep -v 'libc.so' | grep -v 'libpthread.so' | grep -v 'libresolv.so'`
17         do
18                 cp -v -L $x citadel.AppDir/usr/lib/
19         done
20 done
21 ldconfig -v citadel.AppDir/usr/lib
22
23 ARCH=x86_64 appimagetool citadel.AppDir/
24
25 # Hint: do this on your build server first!
26 # apt-get install make build-essential autoconf zlib1g-dev libldap2-dev libssl-dev gettext libical-dev libexpat1-dev libcurl4-openssl-dev