projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
arrgh
[citadel.git]
/
appimage
/
build_appimage.sh
diff --git
a/appimage/build_appimage.sh
b/appimage/build_appimage.sh
index 5a971c7c336bcdfd9e29c8886176253f17d5ddf2..b52ee9a28920773683e21a3fe1eebe953f60f56f 100755
(executable)
--- a/
appimage/build_appimage.sh
+++ b/
appimage/build_appimage.sh
@@
-1,5
+1,7
@@
#!/bin/bash
#!/bin/bash
+rm -vf citadel-*appimage
+
export CITADEL_BUILD_DIR=/tmp/citadel-build-$$
export WEBCIT_BUILD_DIR=/tmp/webcit-build-$$
rm -fr $CITADEL_BUILD_DIR $WEBCIT_BUILD_DIR
export CITADEL_BUILD_DIR=/tmp/citadel-build-$$
export WEBCIT_BUILD_DIR=/tmp/webcit-build-$$
rm -fr $CITADEL_BUILD_DIR $WEBCIT_BUILD_DIR
@@
-7,28
+9,28
@@
rm -fr $CITADEL_BUILD_DIR $WEBCIT_BUILD_DIR
# libcitadel has to be built in a "real" library directory
pushd ../libcitadel || exit 1
make distclean 2>/dev/null
# libcitadel has to be built in a "real" library directory
pushd ../libcitadel || exit 1
make distclean 2>/dev/null
-./bootstrap || exit
1
-./configure || exit
1
-make || exit
1
-make install || exit
1
+./bootstrap || exit
2
+./configure || exit
3
+make || exit
4
+make install || exit
5
popd
# Build the Citadel server
popd
# Build the Citadel server
-pushd ../citadel || exit
1
+pushd ../citadel || exit
6
make distclean 2>/dev/null
make distclean 2>/dev/null
-./bootstrap || exit
1
-./configure --prefix=$CITADEL_BUILD_DIR || exit
1
-make || exit
1
-make install || exit 1
+./bootstrap || exit
7
+./configure --prefix=$CITADEL_BUILD_DIR || exit
8
+make || exit
9
+make install || exit 1
0
popd
# Build WebCit
popd
# Build WebCit
-pushd ../webcit || exit 1
+pushd ../webcit || exit 1
1
make distclean 2>/dev/null
make distclean 2>/dev/null
-./bootstrap || exit 1
-./configure --prefix=$WEBCIT_BUILD_DIR || exit 1
-make || exit 1
-make install || exit 1
+./bootstrap || exit 1
2
+./configure --prefix=$WEBCIT_BUILD_DIR || exit 1
3
+make || exit 1
4
+make install || exit 1
5
popd
# Clear out any old versions in the AppDir
popd
# Clear out any old versions in the AppDir
@@
-37,34
+39,42
@@
mkdir -p citadel.AppDir/usr/bin
mkdir -p citadel.AppDir/usr/lib
# Copy over all the libraries we used
mkdir -p citadel.AppDir/usr/lib
# Copy over all the libraries we used
-for bin in $CITADEL_BUILD_DIR/citserver $WEBCIT_BUILD_DIR/webcit
+for bin in $CITADEL_BUILD_DIR/citserver $WEBCIT_BUILD_DIR/webcit
$CITADEL_BUILD_DIR/ctdlmigrate
do
do
- for x in `ldd $bin | awk ' { print $3 } ' | grep -v -e '^$' | grep -v 'libc.so' | grep -v 'libpthread.so' | grep -v 'libresolv.so'`
+ #for x in `ldd $bin | awk ' { print $3 } ' | grep -v -e '^$' | grep -v 'libc.so' | grep -v 'libpthread.so' | grep -v 'libresolv.so'`
+ for x in `ldd $bin | awk ' { print $3 } ' | grep -v -e '^$' `
do
cp -v -L $x citadel.AppDir/usr/lib/
done
done
ldconfig -v citadel.AppDir/usr/lib
do
cp -v -L $x citadel.AppDir/usr/lib/
done
done
ldconfig -v citadel.AppDir/usr/lib
+# Copy over some utilities
+for bin in db_dump db_load db_recover
+do
+ cp `which $bin` citadel.AppDir/usr/bin/ || exit 16
+done
+
# Install the Citadel Server application tree
# Install the Citadel Server application tree
-mkdir -p citadel.AppDir/usr/local/citadel
-rsync -va $CITADEL_BUILD_DIR/ ./citadel.AppDir/usr/local/citadel/
+mkdir -p citadel.AppDir/usr/local/citadel
|| exit 17
+rsync -va $CITADEL_BUILD_DIR/ ./citadel.AppDir/usr/local/citadel/
|| exit 18
# Install the WebCit application tree
# Install the WebCit application tree
-mkdir -p citadel.AppDir/usr/local/webcit
-rsync -va $WEBCIT_BUILD_DIR/ ./citadel.AppDir/usr/local/webcit/
+mkdir -p citadel.AppDir/usr/local/webcit
|| exit 19
+rsync -va $WEBCIT_BUILD_DIR/ ./citadel.AppDir/usr/local/webcit/
|| exit 20
# Remove the build directories
rm -fr $CITADEL_BUILD_DIR $WEBCIT_BUILD_DIR
# Remove the build directories
rm -fr $CITADEL_BUILD_DIR $WEBCIT_BUILD_DIR
-cc ctdlvisor.c -o citadel.AppDir/usr/bin/ctdlvisor || exit 1
+cc ctdlvisor.c -o citadel.AppDir/usr/bin/ctdlvisor || exit
2
1
-
cpu=`uname -p
`
+
CPU=`uname -m
`
basefilename=citadel-`date +%s`
basefilename=citadel-`date +%s`
-if [ $
cpu
== x86_64 ] ; then
- ARCH=x86_64 appimagetool citadel.AppDir/ ${basefilename}-x64.appimage
-el
se
- ARCH=ARM appimagetool citadel.AppDir/ ${basefilename}-arm32.appimage
+if [ $
CPU
== x86_64 ] ; then
+ export ARCH=x86_64
+el
if [ $CPU == armv7l ] ; then
+ export ARCH=ARM
fi
fi
-
-
+echo ARCH: $ARCH
+echo CPU: $CPU
+appimagetool citadel.AppDir/ ${basefilename}-${CPU}.appimage