diff options
Diffstat (limited to 'network/zabbix_server/zabbix_server.SlackBuild')
-rw-r--r-- | network/zabbix_server/zabbix_server.SlackBuild | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/network/zabbix_server/zabbix_server.SlackBuild b/network/zabbix_server/zabbix_server.SlackBuild index ae8e62db4d..1f573dab73 100644 --- a/network/zabbix_server/zabbix_server.SlackBuild +++ b/network/zabbix_server/zabbix_server.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for zabbix_server @@ -22,10 +22,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=zabbix_server -VERSION=${VERSION:-4.0.4} +VERSION=${VERSION:-6.4.11} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -37,16 +40,23 @@ fi PRGSHORT=zabbix -DOCROOT=${DOCROOT:-/var/www/htdocs} -PHPUSER=${PHPUSER:-root} -PHPGROUP=${PHPGROUP:-apache} +#DOCROOT=${DOCROOT:-/var/www/htdocs} +#PHPUSER=${PHPUSER:-root} +#PHPGROUP=${PHPGROUP:-apache} ZABBIXUSER=${ZABBIXUSER:-zabbix} ZABBIXGROUP=${ZABBIXGROUP:-zabbix} ZABBIXUID=${ZABBIXUID:-228} ZABBIXGID=${ZABBIXGID:-228} -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -93,6 +103,7 @@ find -L . \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ +PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig \ ./configure \ --prefix=/usr \ --sysconfdir=/etc/zabbix \ @@ -103,13 +114,20 @@ CXXFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --enable-server \ --with-mysql \ - --with-jabber \ --with-libcurl \ --with-net-snmp \ - --with-ssh2 \ + --with-ssh \ --with-ldap \ - --with-ipv6 \ + --enable-ipv6 \ --with-libxml2 \ + --with-openssl \ + --enable-ipv6 \ + --with-unixodbc \ + --with-libpcre2 \ + --with-zlib \ + --with-libpthread \ + --with-libevent \ + --with-iconv \ --build=$ARCH-slackware-linux make @@ -121,11 +139,6 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -# Install "frontend" to $DOCROOT/zabbix -mkdir -p $PKG/$DOCROOT/$PRGSHORT -cp -a frontends/php/* $PKG/$DOCROOT/$PRGSHORT/ -chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/$PRGSHORT - # Database scripts mkdir -p $PKG/usr/share/$PRGNAM/database/mysql cp -a database/mysql $PKG/usr/share/$PRGNAM/database/ @@ -146,7 +159,11 @@ sed -e "s,# PidFile=/tmp/,PidFile=/var/run/$PRGSHORT/," \ -e "s,# DBSocket=/tmp/,DBSocket=/var/run/mysql/," \ -e "s,LogFile=/tmp/,LogFile=/var/log/$PRGSHORT/," \ $PKG/etc/$PRGSHORT/$PRGNAM.conf > $PKG/etc/$PRGSHORT/$PRGNAM.conf.new -rm -f $PKG/etc/$PRGSHORT/$PRGNAM.conf +rm -f $PKG/etc/$PRGSHORT/$PRGNAM.conf +rm -rf $PKG/etc/$PRGSHORT/$PRGNAM.conf.d +rm -rf $PKG/etc/$PRGSHORT/alertscripts/ +rm -rf $PKG/etc/$PRGSHORT/externalscripts/ + # Init script mkdir -p $PKG/etc/rc.d @@ -154,7 +171,7 @@ cat $CWD/rc.$PRGNAM > $PKG/etc/rc.d/rc.$PRGNAM.new # Documentation mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog NEWS README $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE @@ -164,4 +181,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |