%define plugin check_raid
Summary: Nagios plugin to check current server's RAID status
Name: nagios-plugin-%{plugin}
-Version: 2.2.50
-Release: 1
+Version: 3.0
+Release: 0.1
License: GPL v2
Group: Networking
-Source0: https://github.com/glensc/nagios-plugin-check_raid/tarball/%{version}/%{plugin}-%{version}.tgz
-# Source0-md5: 7512ae0de0e62681f8b62550555c6429
+#Source0: https://github.com/glensc/nagios-plugin-check_raid/tarball/%{version}/%{plugin}-%{version}.tgz
+Source0: https://github.com/glensc/nagios-plugin-check_raid/tarball/master/%{plugin}-%{version}.tgz
+# Source0-md5: df0a73c32c4bec3a7faa1fc35cb26a06
URL: https://github.com/glensc/nagios-plugin-check_raid
Requires: nagios-common
Requires: perl-base >= 1:5.8.0
%setup -qc
mv *-nagios-plugin-check_raid-*/* .
+%build
+ver=$(./%{plugin}.pl -V)
+test "$(echo "$ver" | awk '{print $NF}')" = %{version}
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}