From 6aac668a24b0754152c53db3774003ef47662620 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 12 Jul 2012 09:43:14 +0200 Subject: added Debian packaging --- debian/README.source | 7 +++ debian/changelog | 5 ++ debian/compat | 1 + debian/conffiles | 0 debian/control | 15 ++++++ debian/copyright | 24 +++++++++ debian/docs | 4 ++ debian/postinst | 40 +++++++++++++++ debian/postrm | 41 +++++++++++++++ debian/prerm | 40 +++++++++++++++ debian/rules | 103 ++++++++++++++++++++++++++++++++++++++ debian/shlibs | 0 packaging/nagios-plugin-curl.spec | 59 ---------------------- redhat/nagios-plugin-curl.spec | 59 ++++++++++++++++++++++ 14 files changed, 339 insertions(+), 59 deletions(-) create mode 100644 debian/README.source create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/conffiles create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/postinst create mode 100644 debian/postrm create mode 100644 debian/prerm create mode 100755 debian/rules create mode 100644 debian/shlibs delete mode 100644 packaging/nagios-plugin-curl.spec create mode 100644 redhat/nagios-plugin-curl.spec diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..806ff51 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,7 @@ +nagios-plugin-curl for Debian +------------------ + +All debian specific build files are in 'debian/.'. + +Changes should always be done to the main GIT repository at +git://github.com:andreasbaumann/nagios-plugin-curl diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..0320cc7 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +nagios-plugin-curl (0.0.4-1) unstable; urgency=low + + * Initial release + + -- Andreas Baumann Thu, 12 Jul 2012 17:48:00 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/conffiles b/debian/conffiles new file mode 100644 index 0000000..e69de29 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..3a35526 --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: nagios-plugin-curl +Section: unknown +Priority: extra +Maintainer: Andreas Baumann +Build-Depends: debhelper (>= 4.1.16), pkg-config, + libcurl-dev +Standards-Version: 3.8.3 +Homepage: https://github.com/andreasbaumann/nagios-plugin-curl + +Package: nagios-plugin-curl +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: nagios-plugin-curl + Nagios plugin with similar command line options and functionality + as 'check_http', but based on the cURL web library. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..7fad600 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,24 @@ +This work was packaged for Debian by: + + Andreas Baumann 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 + +Copyright: + + + +License: + + GPLv3 + +The Debian packaging is: + + Copyright (C) 2012 Andreas Baumann + + and is licensed under the GPL version 3, + see `/usr/share/common-licenses/GPL-3'. diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..0b58b4e --- /dev/null +++ b/debian/docs @@ -0,0 +1,4 @@ +AUTHORS +COPYING +README +TODOS diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..8eebcc4 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,40 @@ +#!/bin/sh + +# Debian postinst script for nagios-plugin-curl + +# Author: Andreas Baumann + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +# bail out on any error +set -e + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..4337495 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,41 @@ +#!/bin/sh + +# Debian postrm script for nagios-plugin-curl + +# Author: Andreas Baumann + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +# bail out on any error +set -e + +case "$1" in + remove|purge) + ;; + + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..bae0677 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,40 @@ +#!/bin/sh + +# Debian prerm script for nagios-plugin-curl + +# Author: Andreas Baumann + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +# bail out on any error +set -e + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..18595a5 --- /dev/null +++ b/debian/rules @@ -0,0 +1,103 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. +# +# Modified to make a template file for a multi-binary package with separated +# build-arch and build-indep targets by Bill Allombert 2001 + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +export DH_COMPAT=4 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +export PGFUSE_PARAMS= + +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + PGFUSE_PARAMS += -j$(NUMJOBS) +endif + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + $(MAKE) $(PGFUSE_PARAMS) all + + # --- end custom part for compiling + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + $(MAKE) $(PGFUSE_PARAMS) clean || true + # --- end custom part for cleaning up + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package + # The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/ + + # main package + $(MAKE) install $(PGFUSE_PARAMS) \ + DESTDIR=/usr/src/packages/BUILD/debian/wolframe + + # --- end custom part for installing + +# Build architecture-independent files here. +binary-indep: build install + # We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs +# dh_installexamples +# dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime + dh_installinit +# dh_installcron + dh_installman +# dh_installinfo +# dh_undocumented + dh_installchangelogs +# dh_link + dh_strip + dh_compress + dh_fixperms + dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/shlibs b/debian/shlibs new file mode 100644 index 0000000..e69de29 diff --git a/packaging/nagios-plugin-curl.spec b/packaging/nagios-plugin-curl.spec deleted file mode 100644 index 105c8bf..0000000 --- a/packaging/nagios-plugin-curl.spec +++ /dev/null @@ -1,59 +0,0 @@ -Summary: curl-based web monitoring plugin for Nagios -Name: nagios-plugin-curl -Version: 0.0.4 -Release: 0.1 -License: GPL -Group: Applications/System -Source: %{name}-%{version}.tar - -#TODO: publish -#URL: - -BuildRoot: %{_tmppath}/%{name}-root - -# usually too old versions packaged in the distributions!! -#BuildRequires: gengetopt -BuildRequires: curl-devel -Requires: curl - -Distribution: rhel5 -Packager: Andreas Baumann - - -%description -Nagios plugin with similar command line options and functionality -as 'check_http', but based on the cURL web library. - -%prep -%setup - - -%build -make - -%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/plugins/ -/%{_libdir}/nagios/plugins/check_curl - -%changelog -* Wed Mar 07 2012 Andreas Baumann 0.0.4-0.1 -- added handling of cookies (for instance for JSESSIONID) -- added POST parameters - -* Mon Sep 28 2009 Andreas Baumann 0.0.3-0.1 -- added client certificate and self-signed SSL chain handling - -* Wed Dec 17 2008 Andreas Baumann 0.0.2-0.1 -- fixes for 64-bit, upgrade to 0.0.2 - -* Thu Sep 25 2008 Andreas Baumann 0.0.1-0.1 -- first preliminary packaged release diff --git a/redhat/nagios-plugin-curl.spec b/redhat/nagios-plugin-curl.spec new file mode 100644 index 0000000..105c8bf --- /dev/null +++ b/redhat/nagios-plugin-curl.spec @@ -0,0 +1,59 @@ +Summary: curl-based web monitoring plugin for Nagios +Name: nagios-plugin-curl +Version: 0.0.4 +Release: 0.1 +License: GPL +Group: Applications/System +Source: %{name}-%{version}.tar + +#TODO: publish +#URL: + +BuildRoot: %{_tmppath}/%{name}-root + +# usually too old versions packaged in the distributions!! +#BuildRequires: gengetopt +BuildRequires: curl-devel +Requires: curl + +Distribution: rhel5 +Packager: Andreas Baumann + + +%description +Nagios plugin with similar command line options and functionality +as 'check_http', but based on the cURL web library. + +%prep +%setup + + +%build +make + +%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/plugins/ +/%{_libdir}/nagios/plugins/check_curl + +%changelog +* Wed Mar 07 2012 Andreas Baumann 0.0.4-0.1 +- added handling of cookies (for instance for JSESSIONID) +- added POST parameters + +* Mon Sep 28 2009 Andreas Baumann 0.0.3-0.1 +- added client certificate and self-signed SSL chain handling + +* Wed Dec 17 2008 Andreas Baumann 0.0.2-0.1 +- fixes for 64-bit, upgrade to 0.0.2 + +* Thu Sep 25 2008 Andreas Baumann 0.0.1-0.1 +- first preliminary packaged release -- cgit v1.2.3-54-g00ecf