%global commit a84a263a6456ab91cf40040fe97ce3e87f097697 %global short_commit %(c=%{commit}; echo ${c:0:7}) %global commit_date 20170917 %global nagiospluginsdir %{_libdir}/nagios/plugins # No binaries in this package %global debug_package %{nil} Name: nagios-plugins-mountpoints Version: 2.2 Release: 1%{?dist} Summary: A Nagios plugin to check nfs/cifs/davfs mounts Group: Applications/System License: MPLv2.0 URL: https://github.com/echocat/nagios-plugin-check_mountpoints/ Source0: https://github.com/echocat/nagios-plugin-check_mountpoints/archive/%{short_commit}/%{name}-%{short_commit}.tar.gz Requires: nagios-plugins %description Check if all specified nfs/cifs/davfs mounts exist and if they are correct implemented. That means we check /etc/fstab, the mountpoints in the filesystem and if they are mounted. %prep %autosetup -n nagios-plugin-check_mountpoints-%{commit} # Fix interpreter sed "1s|#!%{_bindir}/env bash|#!/bin/bash|" check_mountpoints.sh >check_mountpoints.sh.new && \ touch -r check_mountpoints.sh check_mountpoints.sh.new && \ mv check_mountpoints.sh.new check_mountpoints.sh %build %install install -Dpm 0755 check_mountpoints.sh $RPM_BUILD_ROOT%{nagiospluginsdir}/check_mountpoints %files %{nagiospluginsdir}/check_mountpoints %changelog * Sat Oct 14 2017 Mohamed El Morabity - 2.2-1 - Update to 2.2 * Tue May 30 2017 Mohamed El Morabity - 2.0-1.20170517gitb33a83e - Initial RPM release