summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-07-12 15:03:38 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-07-12 15:03:38 +0200
commit01d3d91e4d0b0cf50217245e3cf0d8dbfcc57eab (patch)
tree6126e484035f7f95e30db315441edb4b3b236466
parentf46befc3af192f94d9f4503a6c2b3c69913e33c6 (diff)
downloadnagios-plugin-curl-01d3d91e4d0b0cf50217245e3cf0d8dbfcc57eab.tar.gz
nagios-plugin-curl-01d3d91e4d0b0cf50217245e3cf0d8dbfcc57eab.tar.bz2
some OSC platform probing for pkgconfig and libcurl
-rw-r--r--redhat/nagios-plugin-curl.spec86
1 files changed, 85 insertions, 1 deletions
diff --git a/redhat/nagios-plugin-curl.spec b/redhat/nagios-plugin-curl.spec
index b77cbf7..c8d6e89 100644
--- a/redhat/nagios-plugin-curl.spec
+++ b/redhat/nagios-plugin-curl.spec
@@ -2,6 +2,69 @@
#
# Copyright (C) 2012
+%define rhel 0
+%define rhel5 0
+%define rhel6 0
+%if 0%{?rhel_version} >= 500 && 0%{?rhel_version} <= 599
+%define dist rhel5
+%define rhel 1
+%define rhel5 1
+%endif
+%if 0%{?rhel_version} >= 600 && 0%{?rhel_version} <= 699
+%define dist rhel6
+%define rhel 1
+%define rhel6 1
+%endif
+
+%define centos 0
+%if 0%{?centos_version} >= 500 && 0%{?centos_version} <= 599
+%define dist centos5
+%define centos 1
+%define rhel5 1
+%endif
+
+%if 0%{?centos_version} >= 600 && 0%{?centos_version} <= 699
+%define dist centos6
+%define centos 1
+%define rhel6 1
+%endif
+
+%define fedora 0
+%define fc14 0
+%if 0%{?fedora_version} == 14
+%define dist fc14
+%define fc14 1
+%define fedora 1
+%endif
+%define fc15 0
+%if 0%{?fedora_version} == 15
+%define dist fc15
+%define fc15 1
+%define fedora 1
+%endif
+%define fc16 0
+%if 0%{?fedora_version} == 16
+%define dist fc16
+%define fc16 1
+%define fedora 1
+%endif
+
+%define suse 0
+%if 0%{?suse_version} == 1140
+%define dist osu114
+%define suse 1
+%endif
+%if 0%{?suse_version} > 1140
+%define dist osu121
+%define suse 1
+%endif
+
+%define sles 0
+%if 0%{?sles_version} == 11
+%define dist sle11
+%define sles 1
+%endif
+
Summary: curl-based web monitoring plugin for Nagios
Name: nagios-plugin-curl
Version: 0.0.4
@@ -14,10 +77,31 @@ URL: https://github.com/andreasbaumann/nagios-plugin-curl
BuildRoot: %{_tmppath}/%{name}-root
+# Build dependencies
+###
+
+%if %{rhel} || %{centos} || %{fedora}
+BuildRequires: pkgconfig
+%endif
+%if %{suse} || %{sles}
+BuildRequires: pkg-config
+%endif
+
+%if %{rhel} || %{centos} || %{fedora}
BuildRequires: curl-devel
Requires: curl
+%endif
+
+%if %{suse} || %{sles}
+BuildRequires: libcurl-devel
+Requires: libcurl
+%endif
+
+# Check if 'Distribution' is really set by OBS (as mentioned in bacula)
+%if ! 0%{?opensuse_bs}
+Distribution: %{dist}
+%endif
-Distribution: rhel5
Packager: Andreas Baumann <abaumann@yahoo.com>