# vim: set syn=sh: # Packager: Phill Watkins pkgname=mpt-status pkgver=1.2.0 pkgrel=1pw #arch=noarch source=("http://www.drugphish.ch/~ratz/mpt-status/mpt-status-$pkgver.tar.bz2" "mpt-status-cron.gz") sourcetemplate=http://people.salixos.org/pwatk/packages/13.37/ap/$pkgname docs=("AUTHORS" "COPYING" "Changelog" "DeveloperNotes" "FAQ" "INSTALL" "README" "ReleaseNotes" "THANKS" "TODO") url=http://www.drugphish.ch/~ratz/mpt-status dotnew=('etc/mpt-status.conf') options=('nosrcpack' 'noautodotnew') slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "mpt-status (Status monitor for LSI RAID controllers)" "The mpt-status software is a query tool to access the running" "configuration and status of LSI SCSI HBAs. mpt-status allows you to" "monitor the health and status of your RAID setup." "" "Note: A cron job is created by this package to monitor any supported" "RAID controller(s) on a regular basis. Use the configuration file" "'/etc/mpt-status.conf' to disable the job and/or change settings." ) build() { set -e cd $startdir/src/mpt-status-$pkgver # fix CFLAGS and compiler.h error sed -e "/^CFLAGS/s|-O2|$CFLAGS -I\${KERNEL_PATH}/include|" -i Makefile # use headers from pciutils package sed -e '/^#include/s|"pci.h"||' -i mpt-status.h make -j $numjobs install -Dm 0755 mpt-status $startdir/pkg/usr/sbin/mpt-status install -Dm 0644 man/mpt-status.8 $startdir/pkg/usr/man/man8/mpt-status.8 install -Dm 0755 $startdir/src/mpt-status-cron $startdir/pkg/etc/cron.hourly/mpt-status install -d $startdir/pkg/var/log/mpt-status cat <<- EOF > $startdir/pkg/etc/mpt-status.conf # Status monitor for LSI RAID controllers (mpt-status) # # Cron configuration file # Enable RAID monitoring: # * Use '1' to enable, anything else to disable ENABLE=1 # Who to email in the event of an error: # * Leave empty to disable # * Requires 'mailx' to send email MAILTO=root # Seconds to wait before sending a reminder: # * Default: 24 hours REMIND=86400 # Controller ID(s): # * Manually probe available devices with 'mpt-status -p' # * Seperate multiple devices with a space e.g. ID="1 6" # * Leave empty for auto-detection (may not find all devices) ID= EOF chmod 644 $startdir/pkg/etc/mpt-status.conf set +e }