summaryrefslogtreecommitdiff
path: root/dist/redhat/nagios-plugin-curl.spec
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2015-10-31 10:53:09 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2015-10-31 10:53:09 +0100
commit4a871c0fcfc4afecd5514c992c40f707905078e4 (patch)
treed5acfae9c44e81f10f2d04e8c4dfdb2dcb5e3b1c /dist/redhat/nagios-plugin-curl.spec
parent856097e283eb5d4825bd2cf34ae66c47c9e0b7ba (diff)
downloadnagios-plugin-curl-4a871c0fcfc4afecd5514c992c40f707905078e4.tar.gz
nagios-plugin-curl-4a871c0fcfc4afecd5514c992c40f707905078e4.tar.bz2
some renames and synched package building with version used in pgfuse
Diffstat (limited to 'dist/redhat/nagios-plugin-curl.spec')
-rw-r--r--dist/redhat/nagios-plugin-curl.spec195
1 files changed, 195 insertions, 0 deletions
diff --git a/dist/redhat/nagios-plugin-curl.spec b/dist/redhat/nagios-plugin-curl.spec
new file mode 100644
index 0000000..bce2a28
--- /dev/null
+++ b/dist/redhat/nagios-plugin-curl.spec
@@ -0,0 +1,195 @@
+# Nagios Plugin Curl RPM spec file
+#
+# Copyright (C) 2012
+
+%define rhel 0
+%define rhel5 0
+%define rhel6 0
+%define rhel7 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
+%if 0%{?rhel_version} >= 700 && 0%{?rhel_version} <= 799
+%define dist rhel7
+%define rhel 1
+%define rhel7 1
+%endif
+
+%define centos 0
+%define centos5 0
+%define centos6 0
+%define centos7 0
+%if 0%{?centos_version} >= 500 && 0%{?centos_version} <= 599
+%define dist centos5
+%define centos 1
+%define centos5 1
+%endif
+%if 0%{?centos_version} >= 600 && 0%{?centos_version} <= 699
+%define dist centos6
+%define centos 1
+%define centos6 1
+%endif
+%if 0%{?centos_version} >= 700 && 0%{?centos_version} <= 799
+%define dist centos7
+%define centos 1
+%define centos7 1
+%endif
+
+%define scilin 0
+%define scilin5 0
+%define scilin6 0
+%define scilin7 0
+%if 0%{?scilin_version} >= 500 && 0%{?scilin_version} <= 599
+%define dist scilin5
+%define scilin 1
+%define scilin5 1
+%endif
+%if 0%{?scilin_version} >= 600 && 0%{?scilin_version} <= 699
+%define dist scilin6
+%define scilin 1
+%define scilin6 1
+%endif
+%if 0%{?scilin_version} >= 700 && 0%{?scilin_version} <= 799
+%define dist scilin7
+%define scilin 1
+%define scilin7 1
+%endif
+
+%define fedora 0
+%define fc21 0
+%define fc22 0
+%if 0%{?fedora_version} == 21
+%define dist fc21
+%define fc21 1
+%define fedora 1
+%endif
+%if 0%{?fedora_version} == 22
+%define dist fc22
+%define fc22 1
+%define fedora 1
+%endif
+
+%define suse 0
+%define osu131 0
+%define osu132 0
+%define osufactory 0
+%if 0%{?suse_version} == 1310
+%define dist osu131
+%define osu131 1
+%define suse 1
+%endif
+%if 0%{?suse_version} == 1320
+%define dist osu132
+%define osu132 1
+%define suse 1
+%endif
+%if 0%{?suse_version} > 1320
+%define dist osufactory
+%define osufactory 1
+%define suse 1
+%endif
+
+%define sles 0
+%define sles11 0
+%define sles12 0
+%if 0%{?suse_version} == 1110
+%define dist sle11
+%define sles11 1
+%define sles 1
+%endif
+%if 0%{?suse_version} == 1315
+%define dist sle12
+%define sles12 1
+%define sles 1
+%endif
+
+Summary: curl-based web monitoring plugin for Nagios
+Name: nagios-plugin-curl
+%define main_version 0.0.4
+Version: %{main_version}
+Release: 0.1
+License: GPLv3
+Group: Applications/System
+Source: %{name}_%{main_version}.tar.gz
+
+URL: https://github.com/andreasbaumann/nagios-plugin-curl
+
+BuildRoot: %{_tmppath}/%{name}-root
+
+# Build dependencies
+###
+
+%if %{rhel} || %{centos} || %{fedora} || %{scilin}
+BuildRequires: pkgconfig
+%endif
+%if %{suse} || %{sles}
+BuildRequires: pkg-config
+%endif
+
+%if %{rhel} || %{centos} || %{scilin}
+BuildRequires: curl-devel
+Requires: curl
+%endif
+
+%if %{fedora}
+BuildRequires: libcurl-devel
+Requires: libcurl
+%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
+
+Packager: Andreas Baumann <mail@andreasbaumann.cc>
+
+
+%description
+Nagios plugin with similar command line options and functionality
+as 'check_http', but based on the cURL web library.
+
+%prep
+%setup -n %{name}-%{main_version}
+
+%build
+make %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/%{_libdir}/nagios/plugins/
+install -D -m0755 src/check_curl $RPM_BUILD_ROOT/%{_libdir}/nagios/plugins/
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%dir /%{_libdir}/nagios/
+%dir /%{_libdir}/nagios/plugins/
+/%{_libdir}/nagios/plugins/check_curl
+
+%changelog
+* Wed Mar 07 2012 Andreas Baumann <mail@andreasbaumann.cc> 0.0.4-0.1
+- added handling of cookies (for instance for JSESSIONID)
+- added POST parameters
+
+* Mon Sep 28 2009 Andreas Baumann <mail@andreasbaumann.cc> 0.0.3-0.1
+- added client certificate and self-signed SSL chain handling
+
+* Wed Dec 17 2008 Andreas Baumann <mail@andreasbaumann.cc> 0.0.2-0.1
+- fixes for 64-bit, upgrade to 0.0.2
+
+* Thu Sep 25 2008 Andreas Baumann <mail@andreasbaumann.cc> 0.0.1-0.1
+- first preliminary packaged release