Move pgsql_test into the new build framework

This commit is contained in:
Joris Vink 2014-08-03 17:35:03 +02:00
parent 2b40672ba1
commit 2a1aecbaa0
4 changed files with 17 additions and 67 deletions

View File

@ -0,0 +1,17 @@
# Kore pgsql_test configuration
bind 127.0.0.1 8888
pidfile kore.pid
ssl_no_compression
load ./pgsql.so pgsql_load
pgsql_conn_max 5
domain localhost {
certfile cert/server.crt
certkey cert/server.key
accesslog kore_access.log
static / serve_pgsql_test
}

View File

@ -1,45 +0,0 @@
#!/bin/sh
#
# Kore pgsql test module build directives.
#
MODULE=pgsql_test.module
SOURCE_DIR=.
PGDIR=$(pg_config --includedir)
CC=gcc
CFLAGS="-I. -I/usr/local/include -I${PGDIR} \
-Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual \
-Wsign-compare -g"
OSNAME=$(uname -s | sed -e 's/[-_].*//g' | tr A-Z a-z)
if [ "${OSNAME}" = "darwin" ]; then
LDFLAGS="-dynamiclib -undefined suppress -flat_namespace"
else
LDFLAGS="-shared"
fi
MODULE_BUILD_DATE=$(date +"%Y-%m-%d %H:%M:%S")
### Begin building ####
echo "Building module ${MODULE}..."
rm -f ${MODULE}
if [ ! -d .objs ]; then
mkdir .objs;
fi
rm -f .objs/*
for src in `find ${SOURCE_DIR} -type f -name \*.c`; do
base=`basename $src`;
${CC} ${CFLAGS} -fPIC -c $src -o .objs/${base}.o
if [ $? -ne 0 ]; then
echo "Build error, check above messages for clues.";
exit 1;
fi
done
${CC} ${LDFLAGS} `find .objs -name \*.o -type f` -o ${MODULE}
echo "Building completed!"
rm -rf .objs

View File

@ -1,22 +0,0 @@
# Kore pgsql_test configuration
# see modules/examples/module.conf for a better overview
# of what a configuration file has to offer and what different
# settings mean and do.
bind 127.0.0.1 8081
chroot /home/joris/src/kore
runas joris
workers 4
pidfile kore.pid
load contrib/examples/pgsql_test/pgsql_test.module pgsql_load
ssl_no_compression
pgsql_conn_max 5
domain localhost {
certfile cert/server.crt
certkey cert/server.key
accesslog kore_pgsql.log
static / serve_pgsql_test
}