#!/bin/bash # # nagios.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. # # nagios.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="nagios-logos" PACKAGE_EXT="gz" VERSION=${VERSION:=1.0} BUILD=${BUILD:=1} ARCH=noarch if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required cd $TMP _TMP=$TMP rm -rf logos TMP=$TMP/logos mkdir -p $TMP mkdir -p $PKG/usr/share/nagios/share/images/logos PACKAGE_EXT="zip" SRC1="vendor-logos.zip" URL1="https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=846&cf_id=29" get_source $SRC1 $URL1 unpack_source $SRC1 vendor-logos # Remove logos we already have rm {aix,apple,beos,debian,irix,nagios,next,redhat,slackware,suse,turbolinux}.* cp -p *.{gif,jpg,png,gd2} $PKG/usr/share/nagios/share/images/logos cd $TMP PACKAGE_EXT="gz" SRC2="ivan.tar.gz" URL2="https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=1730&cf_id=24" get_source $SRC2 $URL2 unpack_source $SRC2 ivan cp -p *.* $PKG/usr/share/nagios/share/images/logos cd $TMP SRC3="raspberry.tar.gz" URL3="https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=6457&cf_id=24" get_source $SRC3 $URL3 unpack_source $SRC3 raspberry cp -p *.{gif,png,gd2} $PKG/usr/share/nagios/share/images/logos cd $TMP #convert $CWD/p1meter.png -resize 40x40 p1meter.png #convert $CWD/p1meter.png -resize 40x40 p1meter.jpg #convert $CWD/p1meter.png -resize 40x40 p1meter.gif #convert $CWD/p1meter.png -resize 40x40 p1meter.gd2 chmod 644 $PKG/usr/share/nagios/share/images/logos/* chown root:root $PKG/usr/share/nagios/share/images/logos/* TMP=$_TMP fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi