diff options
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | dist/archlinux/PKGBUILD | 29 | ||||
-rw-r--r-- | dist/debian/README.source (renamed from debian/README.source) | 0 | ||||
-rw-r--r-- | dist/debian/changelog | 5 | ||||
-rw-r--r-- | dist/debian/compat (renamed from debian/compat) | 0 | ||||
-rw-r--r-- | dist/debian/conffiles (renamed from debian/conffiles) | 0 | ||||
-rw-r--r-- | dist/debian/control (renamed from debian/control) | 2 | ||||
-rw-r--r-- | dist/debian/copyright (renamed from debian/copyright) | 6 | ||||
-rw-r--r-- | dist/debian/docs (renamed from debian/docs) | 0 | ||||
-rw-r--r-- | dist/debian/postinst (renamed from debian/postinst) | 2 | ||||
-rw-r--r-- | dist/debian/postrm (renamed from debian/postrm) | 2 | ||||
-rw-r--r-- | dist/debian/prerm (renamed from debian/prerm) | 2 | ||||
-rwxr-xr-x | dist/debian/rules (renamed from debian/rules) | 0 | ||||
-rw-r--r-- | dist/debian/shlibs (renamed from debian/shlibs) | 0 | ||||
-rwxr-xr-x | dist/obs/deploy_to_obs.sh | 54 | ||||
-rw-r--r-- | dist/obs/nagios-plugin-curl.dsc (renamed from tools/nagios-plugin-curl.dsc) | 4 | ||||
-rw-r--r-- | dist/redhat/nagios-plugin-curl.spec (renamed from redhat/nagios-plugin-curl.spec) | 135 | ||||
-rwxr-xr-x | tools/deploy_to_osc.sh | 16 |
18 files changed, 173 insertions, 89 deletions
diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 0320cc7..0000000 --- a/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -nagios-plugin-curl (0.0.4-1) unstable; urgency=low - - * Initial release - - -- Andreas Baumann <abaumann@yahoo.com> Thu, 12 Jul 2012 17:48:00 +0200 diff --git a/dist/archlinux/PKGBUILD b/dist/archlinux/PKGBUILD new file mode 100644 index 0000000..410c1a5 --- /dev/null +++ b/dist/archlinux/PKGBUILD @@ -0,0 +1,29 @@ +# Contributor: Andreas Baumann <mail@andreasbaumann.cc> +# Maintainer: Andreas Baumann <mail@andreasbaumann.cc> + +pkgname=nagios-plugin-curl +_mainpkgver=0.0.4 +pkgver=${_mainpkgver} +pkgrel=1 +pkgdesc="curl-based web monitoring plugin for Nagios" +url="https://github.com/andreasbaumann/nagios-plugin-curl" +license=('GPL3') +arch=('i686' 'x86_64') +depends=('curl') +makedepends=('pkg-config') +source=("${pkgname}_${_mainpkgver}.tar.gz") + +build() { + cd ${srcdir}/${pkgname}-${_mainpkgver} + + msg "Building..." + make +} + +package() { + cd ${srcdir}/${pkgname}-${_mainpkgver} + + msg "Installing.." + mkdir -p $pkgdir/usr/lib/nagios/plugins + install -D -m0755 src/check_curl $pkgdir/usr/lib/nagios/plugins +} diff --git a/debian/README.source b/dist/debian/README.source index 806ff51..806ff51 100644 --- a/debian/README.source +++ b/dist/debian/README.source diff --git a/dist/debian/changelog b/dist/debian/changelog new file mode 100644 index 0000000..a017ff5 --- /dev/null +++ b/dist/debian/changelog @@ -0,0 +1,5 @@ +nagios-plugin-curl (0.0.4-1) unstable; urgency=low + + * Initial release + + -- Andreas Baumann <mail@andreasbaumann.cc> Thu, 12 Jul 2012 17:48:00 +0200 diff --git a/debian/compat b/dist/debian/compat index 7f8f011..7f8f011 100644 --- a/debian/compat +++ b/dist/debian/compat diff --git a/debian/conffiles b/dist/debian/conffiles index e69de29..e69de29 100644 --- a/debian/conffiles +++ b/dist/debian/conffiles diff --git a/debian/control b/dist/debian/control index 1805b92..7f4626d 100644 --- a/debian/control +++ b/dist/debian/control @@ -1,7 +1,7 @@ Source: nagios-plugin-curl Section: unknown Priority: extra -Maintainer: Andreas Baumann <abaumann@yahoo.com> +Maintainer: Andreas Baumann <mail@andreasbaumann.cc> Build-Depends: debhelper (>= 4.1.16), pkg-config, libcurl4-openssl-dev Standards-Version: 3.8.3 diff --git a/debian/copyright b/dist/debian/copyright index 7fad600..72b8ebb 100644 --- a/debian/copyright +++ b/dist/debian/copyright @@ -1,12 +1,12 @@ This work was packaged for Debian by: - Andreas Baumann <abaumann@yahoo.com> on Thu, 12 Jul 2012 17:48:00 +0200 + Andreas Baumann <mail@andreasbaumann.cc> on Thu, 12 Jul 2012 17:48:00 +0200 It was downloaded from https://github.com/andreasbaumann/nagios-plugin-curl Upstream Author(s): - Andreas Baumann <abaumann@yahoo.com> + Andreas Baumann <mail@andreasbaumann.cc> Copyright: @@ -18,7 +18,7 @@ License: The Debian packaging is: - Copyright (C) 2012 Andreas Baumann <abaumann@yahoo.com> + Copyright (C) 2012 Andreas Baumann <mail@andreasbaumann.cc> and is licensed under the GPL version 3, see `/usr/share/common-licenses/GPL-3'. diff --git a/debian/docs b/dist/debian/docs index 0b58b4e..0b58b4e 100644 --- a/debian/docs +++ b/dist/debian/docs diff --git a/debian/postinst b/dist/debian/postinst index 8eebcc4..ce67e5c 100644 --- a/debian/postinst +++ b/dist/debian/postinst @@ -2,7 +2,7 @@ # Debian postinst script for nagios-plugin-curl -# Author: Andreas Baumann <abaumann@yahoo.com> +# Author: Andreas Baumann <mail@andreasbaumann.cc> # summary of how this script can be called: # * <postinst> `configure' <most-recently-configured-version> diff --git a/debian/postrm b/dist/debian/postrm index 4337495..0452e77 100644 --- a/debian/postrm +++ b/dist/debian/postrm @@ -2,7 +2,7 @@ # Debian postrm script for nagios-plugin-curl -# Author: Andreas Baumann <abaumann@yahoo.com> +# Author: Andreas Baumann <mail@andreasbaumann.cc> # summary of how this script can be called: # * <postrm> `remove' diff --git a/debian/prerm b/dist/debian/prerm index bae0677..4a35ed3 100644 --- a/debian/prerm +++ b/dist/debian/prerm @@ -2,7 +2,7 @@ # Debian prerm script for nagios-plugin-curl -# Author: Andreas Baumann <abaumann@yahoo.com> +# Author: Andreas Baumann <mail@andreasbaumann.cc> # summary of how this script can be called: # * <prerm> `remove' diff --git a/debian/rules b/dist/debian/rules index d788972..d788972 100755 --- a/debian/rules +++ b/dist/debian/rules diff --git a/debian/shlibs b/dist/debian/shlibs index e69de29..e69de29 100644 --- a/debian/shlibs +++ b/dist/debian/shlibs diff --git a/dist/obs/deploy_to_obs.sh b/dist/obs/deploy_to_obs.sh new file mode 100755 index 0000000..8dc3f81 --- /dev/null +++ b/dist/obs/deploy_to_obs.sh @@ -0,0 +1,54 @@ +#!/bin/sh + +PACKAGE_NAME=nagios-plugin-curl +PACKAGE_VERSION=0.0.4 +OSC_HOME=$HOME/home:andreas_baumann/$PACKAGE_NAME + +rm -f ${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz +make dist-gz + +# git commit count since last tagging is used for a build number of +# the package to make individual builds distinguishable + +GIT_COMMIT_COUNT=`git describe --long --tags | cut -f 2 -d -` + +# Redhat/SuSE + +cp ${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.tar.gz +cp dist/redhat/$PACKAGE_NAME.spec $OSC_HOME/$PACKAGE_NAME.spec +sed -i "s/Version:.*/Version: %{main_version}.${GIT_COMMIT_COUNT}/" $OSC_HOME/$PACKAGE_NAME.spec + +# Debian/Ubuntu + +cp ${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.orig.tar.gz + +SIZE=`stat -c '%s' $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.orig.tar.gz` +CHKSUM=`md5sum $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.orig.tar.gz | cut -f 1 -d' '` + +cp dist/obs/$PACKAGE_NAME.dsc $OSC_HOME/$PACKAGE_NAME.dsc +echo " $CHKSUM $SIZE ${PACKAGE_NAME}_${PACKAGE_VERSION}.orig.tar.gz" >> $OSC_HOME/$PACKAGE_NAME.dsc + +TMPDIR=/tmp +rm -f $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.debian.tar.gz +rm -rf $TMPDIR/debian +cp -r dist/debian $TMPDIR/. +sed -i "s/${PACKAGE_NAME} (\([0-9.]*\)-\([0-9]*\))/${PACKAGE_NAME} (\1-$GIT_COMMIT_COUNT)/" $TMPDIR/debian/changelog +OLDDIR=$PWD +cd $TMPDIR +tar zcf $TMPDIR/${PACKAGE_NAME}_${PACKAGE_VERSION}.debian.tar.gz debian +cd $OLDDIR +mv -f $TMPDIR/${PACKAGE_NAME}_${PACKAGE_VERSION}.debian.tar.gz $OSC_HOME/. +DEBIAN_SIZE=`stat -c '%s' $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.debian.tar.gz` +DEBIAN_CHKSUM=`md5sum $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.debian.tar.gz | cut -f 1 -d' '` +echo " $DEBIAN_CHKSUM $DEBIAN_SIZE ${PACKAGE_NAME}_${PACKAGE_VERSION}.debian.tar.gz" >> $OSC_HOME/$PACKAGE_NAME.dsc + +# Archlinux + +cp ${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz $OSC_HOME/${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz + +CHKSUM=`md5sum $OSC_HOME/${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz | cut -f 1 -d' '` + +cat dist/archlinux/PKGBUILD > $OSC_HOME/PKGBUILD +echo "md5sums=('$CHKSUM')" >> $OSC_HOME/PKGBUILD + +sed -i "s/^pkgver=.*/pkgver=\${_mainpkgver}.r${GIT_COMMIT_COUNT}/" $OSC_HOME/PKGBUILD diff --git a/tools/nagios-plugin-curl.dsc b/dist/obs/nagios-plugin-curl.dsc index 12157eb..6368122 100644 --- a/tools/nagios-plugin-curl.dsc +++ b/dist/obs/nagios-plugin-curl.dsc @@ -1,8 +1,8 @@ -Format: 1.0 +Format: 3.0 (quilt) Source: nagios-plugin-curl Version: 0.0.4 Binary: nagios-plugin-curl -Maintainer: Andreas Baumann <abaumann@yahoo.com> +Maintainer: Andreas Baumann <mail@andreasbaumann.cc> Architecture: any Build-Depends: debhelper (>= 4.1.16), pkg-config, libcurl4-openssl-dev diff --git a/redhat/nagios-plugin-curl.spec b/dist/redhat/nagios-plugin-curl.spec index a264b67..bce2a28 100644 --- a/redhat/nagios-plugin-curl.spec +++ b/dist/redhat/nagios-plugin-curl.spec @@ -5,6 +5,7 @@ %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 @@ -15,87 +16,108 @@ %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 rhel5 1 +%define centos5 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 +%define centos6 1 %endif -%define fc15 0 -%if 0%{?fedora_version} == 15 -%define dist fc15 -%define fc15 1 -%define fedora 1 +%if 0%{?centos_version} >= 700 && 0%{?centos_version} <= 799 +%define dist centos7 +%define centos 1 +%define centos7 1 %endif -%define fc16 0 -%if 0%{?fedora_version} == 16 -%define dist fc16 -%define fc16 1 -%define fedora 1 + +%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 -%define fc17 0 -%if 0%{?fedora_version} == 17 -%define dist fc17 -%define fc17 1 -%define fedora 1 +%if 0%{?scilin_version} >= 600 && 0%{?scilin_version} <= 699 +%define dist scilin6 +%define scilin 1 +%define scilin6 1 %endif -%define fc18 0 -%if 0%{?fedora_version} == 18 -%define dist fc18 -%define fc18 1 -%define fedora 1 +%if 0%{?scilin_version} >= 700 && 0%{?scilin_version} <= 799 +%define dist scilin7 +%define scilin 1 +%define scilin7 1 %endif -%define fc19 0 -%if 0%{?fedora_version} == 19 -%define dist fc19 -%define fc19 1 + +%define fedora 0 +%define fc21 0 +%define fc22 0 +%if 0%{?fedora_version} == 21 +%define dist fc21 +%define fc21 1 %define fedora 1 %endif -%define fc20 0 -%if 0%{?fedora_version} == 20 -%define dist fc20 -%define fc20 1 +%if 0%{?fedora_version} == 22 +%define dist fc22 +%define fc22 1 %define fedora 1 %endif %define suse 0 -%if 0%{?suse_version} == 1140 -%define dist osu114 +%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} > 1140 -%define dist osu121 +%if 0%{?suse_version} > 1320 +%define dist osufactory +%define osufactory 1 %define suse 1 %endif %define sles 0 -%if 0%{?sles_version} == 11 +%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 -Version: 0.0.4 +%define main_version 0.0.4 +Version: %{main_version} Release: 0.1 License: GPLv3 Group: Applications/System -Source: %{name}_%{version}.tar.gz +Source: %{name}_%{main_version}.tar.gz URL: https://github.com/andreasbaumann/nagios-plugin-curl @@ -104,27 +126,22 @@ BuildRoot: %{_tmppath}/%{name}-root # Build dependencies ### -%if %{rhel} || %{centos} || %{fedora} +%if %{rhel} || %{centos} || %{fedora} || %{scilin} BuildRequires: pkgconfig %endif %if %{suse} || %{sles} BuildRequires: pkg-config %endif -%if %{rhel} || %{centos} +%if %{rhel} || %{centos} || %{scilin} BuildRequires: curl-devel Requires: curl %endif %if %{fedora} -%if %{fc18} || %{fc19} -BuildRequires: curl-devel -Requires: curl -%else BuildRequires: libcurl-devel Requires: libcurl %endif -%endif %if %{suse} || %{sles} BuildRequires: libcurl-devel @@ -136,7 +153,7 @@ Requires: libcurl Distribution: %{dist} %endif -Packager: Andreas Baumann <abaumann@yahoo.com> +Packager: Andreas Baumann <mail@andreasbaumann.cc> %description @@ -144,7 +161,7 @@ Nagios plugin with similar command line options and functionality as 'check_http', but based on the cURL web library. %prep -%setup +%setup -n %{name}-%{main_version} %build make %{?_smp_mflags} @@ -164,15 +181,15 @@ rm -rf $RPM_BUILD_ROOT /%{_libdir}/nagios/plugins/check_curl %changelog -* Wed Mar 07 2012 Andreas Baumann <abaumann@yahoo.com> 0.0.4-0.1 +* 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 <abaumann@yahoo.com> 0.0.3-0.1 +* 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 <abaumann@yahoo.com> 0.0.2-0.1 +* 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 <abaumann@yahoo.com> 0.0.1-0.1 +* Thu Sep 25 2008 Andreas Baumann <mail@andreasbaumann.cc> 0.0.1-0.1 - first preliminary packaged release diff --git a/tools/deploy_to_osc.sh b/tools/deploy_to_osc.sh deleted file mode 100755 index 1e68cdf..0000000 --- a/tools/deploy_to_osc.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -PACKAGE_NAME=nagios-plugin-curl -PACKAGE_VERSION=0.0.4 -OSC_HOME=$HOME/home:andreas_baumann/$PACKAGE_NAME - -rm -f ${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz -make dist-gz -cp ${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.tar.gz -cp redhat/$PACKAGE_NAME.spec $OSC_HOME/$PACKAGE_NAME.spec - -SIZE=`stat -c '%s' $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.tar.gz` -CHKSUM=`md5sum $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.tar.gz | cut -f 1 -d' '` - -cat tools/$PACKAGE_NAME.dsc > $OSC_HOME/$PACKAGE_NAME.dsc -echo " $CHKSUM $SIZE ${PACKAGE_NAME}_${PACKAGE_VERSION}.tar.gz" >> $OSC_HOME/$PACKAGE_NAME.dsc |