#!/bin/bash # # mysql-zrm.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. # # mysql-zrm.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="mysql-zrm" PACKAGE_EXT="gz" VERSION=${VERSION:=3.0} BUILD=${BUILD:=3} ARCH=noarch if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required SRC="MySQL-zrm-${VERSION}-release.tar.$PACKAGE_EXT" URL="https://www.zmanda.com/downloads/community/ZRM-MySQL/3.0/Source/$SRC" get_source $SRC $URL cd $TMP rm -rf mysql-zrm-src mkdir -p mysql-zrm-src cd mysql-zrm-src tar xfvz $CWD/$SRC # Fix for the newer gzip. # https://forums.zmanda.com/showthread.php?5457-compression-issue-with-backup patch -p0 < $CWD/gzip-fix.patch patch -p1 < $CWD/logrotate.patch cp -a etc $PKG cp -a usr $PKG cp -a var $PKG cd $TMP chown -R root:root package-mysql-zrm mv $PKG/usr/share/man $PKG/usr rm $PKG/usr/man/man1/mysql-zrm-manage-backup.1 mkdir -p $DOCS mv $PKG/usr/share/doc/MySQL-zrm-$VERSION/* $DOCS chmod 644 $DOCS/* rm -rf $PKG/usr/share/doc rm -rf $PKG/etc/xinetd.d ( cd $PKG/etc/mysql-zrm mv mysql-zrm.conf mysql-zrm.conf.new mv mysql-zrm-reporter.conf mysql-zrm-reporter.conf.new ) fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi