Source

woocode / sa-auto / src / nagios-core.sh

Full commit
#!/bin/sh
. ./set_app_env.sh;

L_CFLAGS="-I${APP_LIB}/jpeg/include -L${APP_LIB}/libpng/include -L${APP_LIB}/gd/include ";
L_LDFLAGS="-L${APP_LIB}/jpeg/lib -L${APP_LIB}/libpng/lib  -L${APP_LIB}/gd/lib ";
CFLAGS=" $G_CFLAGS $L_CFLAGS";export CFLAGS;
LDFLAGS=" $G_LDFLAGS $L_LDFLAGS";export LDFLAGS;
CPPFLAGS=" $G_CPPFLAGS $L_CPPFLAGS";export CPPFLAGS;

PKG=$NAGIOS_CORE
PKG_NAME=$(echo $PKG | cut -d- -f1)

rm -rf $PKG
rm -rf $APP_SVR/$PKG
rm -f $APP_SVR/${PKG_NAME}

x $PKG.tar.gz

cd $PKG

        # --with-init-dir="${APP}/sh" \
            # --with-datarootdir=$APP/dat/nagios \
            # --with-datadir=$APP/dat/nagios \
            # --htmldir=$APP/dat/nagios \
./configure --prefix=$APP_SVR/$PKG \
            --with-nagios-user=${NAGIOS_USER} \
            --with-httpd-conf=${APP}/conf/apache22/sites \
            --with-nagios-group=${NAGIOS_USER} \
            --with-command-user=${NAGIOS_USER} \
            --with-command-group=${NAGIOS_GROUP} \
            --with-cgiurl="/cgi-bin" \
            --with-htmlurl="/" \
            --with-gd-lib=${APP_LIB}/gd/lib \
            --with-gd-inc=${APP_LIB}/gd/include \

make all $MAKEOPT && \
make install install-base install-cgis install-commandmode  && \
ln -s $APP/conf/nagios $APP_SVR/$PKG_NAME/etc
test -d $APP/dat/nagios && rm -rf $APP/dat/nagios
mv $APP_SVR/$PKG/share $APP/dat/nagios
# make install install-base install-cgis install-commandmode && \
ln -sf $APP_SVR/$PKG $APP_SVR/${PKG_NAME}