summaryrefslogtreecommitdiffstats
path: root/autogen.sh
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-12 13:44:42 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-12 13:44:42 +0100
commite870c40ffdc19c007eaf8704723ef9ec841494f9 (patch)
treecc7817ba80577b24c37e941072e26ae826219a6f /autogen.sh
parentf01b8f1a613901baa19bfc25a8da07213fccace7 (diff)
downloadlibkolab-e870c40ffdc19c007eaf8704723ef9ec841494f9.tar.gz
Use -I pointing to /usr/include/kolabxml/ (pulled from the libkolabxml-devel cmake file) rather than including kolab/blah everywhere, as per naming convention the development headers for libkolabxml should reside in /usr/include/kolabxml, not /usr/include/kolab (which is where this package places its development headers)
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh73
1 files changed, 73 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..962caef
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+dobuild=0
+doprep=0
+dotest=0
+doinstall=0
+
+srcdir=$(pwd)
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ --build|-b)
+ dobuild=1
+ shift
+ ;;
+
+ --prep|-p)
+ doprep=1
+ shift
+ ;;
+
+ --test|-t)
+ dotest=1
+ shift
+ ;;
+
+ --install|-i)
+ doinstall=1
+ shift
+ ;;
+
+ esac
+done
+
+if [ ${dobuild} -eq 0 -a ${doprep} -eq 0 -a ${dotest} -eq 0 -a ${doinstall} -eq 0 ]; then
+ dobuild=1
+ doprep=1
+ dotest=1
+ doinstall=1
+fi
+
+# Rebuilds the entire foo in one go. One shot, one kill.
+rm -rf build/
+mkdir -p build
+cd build
+if [ ${doprep} -eq 1 ]; then
+ cmake \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_INSTALL_DIR=/usr/lib64 \
+ -DINCLUDE_INSTALL_DIR=/usr/include/kolab \
+ ..
+fi
+
+if [ ${dobuild} -eq 1 ]; then
+ make
+fi
+
+if [ ${dotest} -eq 1 ]; then
+ # Execute some tests?
+ echo "Executing tests"
+fi
+
+if [ ${doinstall} -eq 1 ]; then
+ make install DESTDIR=${TMPDIR:-/tmp}
+fi
+
+cd ..
+
+git archive --prefix=libkolab-0.3/ HEAD | gzip -c > libkolab-0.3.tar.gz
+
+cp libkolab-0.3.tar.gz `rpm --eval='%{_sourcedir}'`
+