build/
Testing/
install_manifest.txt
+CMakeDoxyfile.in
+CMakeDoxygenDefaults.cmake
## Build project
+### With docker
+
+Architectures 'x86_64' and 'armv7l' are supported. Execute:
+
+ > tools/build-with-docker
+
+Note: database resources building is unsupported at the moment using docker.
+
+### Natively
+
This is a CMake based building suite.
Install cmake:
--- /dev/null
+FROM ubuntu
+
+RUN apt-get update && apt-get install -y \
+ g++ \
+ libssl-dev \
+ libxml2-dev \
+ libldap2-dev \
+ libpcap-dev \
+ libgtest-dev \
+ doxygen \
+ graphviz \
+ make \
+ cmake
+
+# Helper tools
+COPY deps/build.sh /usr/local/bin
+
+ENTRYPOINT ["build.sh"]
--- /dev/null
+#!/bin/sh
+if [ -x ./`basename $0` ]
+then
+ exec ./`basename $0` $@
+else
+ cmake -DSKIP_DATABASE_BUILD=1 $@ .
+ make -j `grep processor /proc/cpuinfo | wc -l` $2
+ make doc
+fi
+exit $?
--- /dev/null
+#!/bin/bash
+
+#############
+# VARIABLES #
+#############
+
+REPO_DIR="$(git rev-parse --show-toplevel 2>/dev/null)"
+[ -z "$REPO_DIR" ] && { echo "You must execute under a valid git repository !" ; exit 1 ; }
+
+#############
+# FUNCTIONS #
+#############
+
+# $1: image directory
+build_image() {
+ local imgdir=$1
+
+ local imgname=$(basename ${imgdir})
+ local imgtag=${TAG}
+
+ echo "Building ${imgname}:${imgtag} ..."
+ cd ${imgdir}
+
+ # Dockerfile for other contexts:
+ local dck_opt=
+ local preferred=Dockerfile.$(arch)
+ [ -f ${preferred} ] && { dck_opt="-f ${preferred}" ; echo "Selected '${preferred}' for current architecture." ; }
+ [ -z "${dck_opt}" -a ! -f Dockerfile ] && { echo "No Dockerfile for this directory. Ignoring ..." ; cd - >/dev/null ; return 1 ; }
+
+ docker build -t ${imgname}:${imgtag} ${dck_opt} .
+ [ $? -ne 0 ] && { echo "An error ocurred. Aborting ..." ; cd - >/dev/null ; return 1 ; }
+ cd - >/dev/null
+}
+
+#############
+# EXECUTION #
+#############
+
+TAG=$(${REPO_DIR}/tools/version)
+
+# Build compilation image:
+build_image ${REPO_DIR}/docker-images/anna-build-nodb # this image has neither oracle nor mysql installed
+
+# Build source with previous compilation image:
+docker run --rm -it -u $(id -u):$(id -g) -v ${REPO_DIR}:/code -w /code anna-build-nodb:${TAG}
+
--- /dev/null
+#!/bin/bash
+
+#############
+# VARIABLES #
+#############
+
+REPO_DIR="$(git rev-parse --show-toplevel 2>/dev/null)"
+[ -z "$REPO_DIR" ] && { echo "You must execute under a valid git repository !" ; exit 1 ; }
+
+#############
+# EXECUTION #
+#############
+
+# Get version from CMakeLists.txt:
+major=$(grep -w "VERSION_MAJOR" ${REPO_DIR}/CMakeLists.txt | egrep -o '[0-9]+')
+minor=$(grep -w "VERSION_MINOR" ${REPO_DIR}/CMakeLists.txt | egrep -o '[0-9]+')
+patch=$(grep -w "VERSION_PATCH" ${REPO_DIR}/CMakeLists.txt | egrep -o '[0-9]+')
+
+echo ${major}.${minor}.${patch}
+
+