#!/bin/bash # # munin.SlackBuild is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # munin.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # default settings PACKAGE="munin" PACKAGE_EXT="gz" VERSION=${VERSION:=2.0.30} BUILD=${BUILD:=1} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi # Check for munin account here if ! grep ^munin: /etc/group 2>&1 > /dev/null; then groupadd -g 301 munin fi if ! grep ^munin: /etc/passwd 2>&1 > /dev/null; then useradd -d /var/lib/munin -s /bin/bash -u 301 -g 301 -c "Munin" munin fi check_required SRC="munin-$VERSION.tar.$PACKAGE_EXT" URL="http://downloads.munin-monitoring.org/munin/stable/${VERSION}/${SRC}" get_source $SRC $URL unpack_source $SRC munin-$VERSION sed -i -e 's#/sbin/ip6tables#/usr/sbin/ip6tables#' plugins/node.d.linux/ip_.in cp $CWD/Makefile.config . # multithreading wrecks havoc on the build, should probably report this make -j1 PREFIX='' DOCDIR=/usr/doc/munin-${VERSION} LIBDIR=${LIBDIR}/munin make DESTDIR="$PKG" DOCDIR=$PKG/usr/doc/munin-${VERSION} LIBDIR=${PKG}${LIBDIR}/munin install-master-prime install -D -m644 $CWD/munin-cron-entry "$PKG"/etc/munin/munin-cron-entry install -D -m644 $CWD/logrotate.munin "$PKG"/etc/logrotate.d/munin #install -D -m644 $CWD/08-munin-font-dir.conf "$PKG"/etc/fonts/conf.avail/08-munin-font-dir.conf mv $PKG/etc/munin/munin.conf $PKG/etc/munin/munin.conf.new mkdir -p $DOCS cp -a Announce-2.0 COPYING ChangeLog Checklist HACKING.pod INSTALL README* UPGRADING* $DOCS fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi