From e5569fc8d9f911f8b02543e0cdce0d2f0bb687f7 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 22 Feb 2009 15:16:57 +0100 Subject: [PATCH] Added libcollectdclient0 and libcollectdclient-dev binary packages. I'm now using dh_install and *.install files to specify which package some file belongs to. Thanks to Peter Palfrader, Ron Lee and Tollef Fog Heen for their suggestions about the package description. --- debian/collectd-dev.install | 3 +++ debian/collectd.install | 11 ++++++++++ debian/control | 27 ++++++++++++++++++++++++ debian/libcollectdclient-dev.install | 6 ++++++ debian/libcollectdclient0.install | 2 ++ debian/rules | 31 ++++++++-------------------- 6 files changed, 58 insertions(+), 22 deletions(-) create mode 100644 debian/collectd-dev.install create mode 100644 debian/collectd.install create mode 100644 debian/libcollectdclient-dev.install create mode 100644 debian/libcollectdclient0.install diff --git a/debian/collectd-dev.install b/debian/collectd-dev.install new file mode 100644 index 0000000..ea6252f --- /dev/null +++ b/debian/collectd-dev.install @@ -0,0 +1,3 @@ +src/liboconfig/oconfig.h usr/include/collectd/liboconfig +src/*.h usr/include/collectd + diff --git a/debian/collectd.install b/debian/collectd.install new file mode 100644 index 0000000..8a3c55c --- /dev/null +++ b/debian/collectd.install @@ -0,0 +1,11 @@ +../../contrib/migrate-3-4.px usr/lib/collectd/utils +../../contrib/rrd_filter.px usr/lib/collectd/utils +../collectd.conf ../collection.conf ../thresholds.conf etc/collectd/ +usr/bin +usr/lib/collectd/*.so +usr/sbin +usr/share/collectd +usr/share/man +usr/share/perl5 +var + diff --git a/debian/control b/debian/control index 6fb4d7c..d891a49 100644 --- a/debian/control +++ b/debian/control @@ -119,3 +119,30 @@ Description: statistics collection and monitoring daemon (development files) This package contains the development files needed to create your own plugins. +Package: libcollectdclient-dev +Section: libdevel +Architecture: any +Depends: libcollectdclient0 (>= ${source:Version}), ${misc:Depends} +Description: client library for collectd's control interface (development files) + libcollectdclient provides an API to access the control interface provided by + the unixsock plugin of collectd, a statistics collection and monitoring + daemon. It can be used to access values collected by collectd or dispatch new + values and notifications to the daemon. This allows for integration with + other applications such as monitoring solutions. + . + This package contains the header files and the static library. + +Package: libcollectdclient0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: collectd +Description: client library for collectd's control interface + libcollectdclient provides an API to access the control interface provided by + the unixsock plugin of collectd, a statistics collection and monitoring + daemon. It can be used to access values collected by collectd or dispatch new + values and notifications to the daemon. This allows for integration with + other applications such as monitoring solutions. + . + This package contains the shared library. + diff --git a/debian/libcollectdclient-dev.install b/debian/libcollectdclient-dev.install new file mode 100644 index 0000000..fd27cc5 --- /dev/null +++ b/debian/libcollectdclient-dev.install @@ -0,0 +1,6 @@ +usr/include/collectd/client.h usr/include/collectd +usr/include/collectd/lcc_features.h usr/include/collectd +usr/lib/pkgconfig/libcollectdclient.pc +usr/lib/libcollectdclient.la +usr/lib/libcollectdclient.so + diff --git a/debian/libcollectdclient0.install b/debian/libcollectdclient0.install new file mode 100644 index 0000000..7b98d64 --- /dev/null +++ b/debian/libcollectdclient0.install @@ -0,0 +1,2 @@ +usr/lib/libcollectdclient.so.* + diff --git a/debian/rules b/debian/rules index beebe96..bb1030d 100755 --- a/debian/rules +++ b/debian/rules @@ -81,7 +81,7 @@ clean: unpatch rm -f debian/README.Debian.plugins rm -f src/*.1 src/*.5 - dh_clean + dh_clean debconf-updatepo install-indep: @@ -89,35 +89,20 @@ install-indep: dh_testroot dh_clean -k dh_installdirs -i - - include_dir=debian/collectd-dev/usr/include/collectd/ \ - && mkdir -p $$include_dir/liboconfig \ - && cp src/*.h $$include_dir \ - && cp src/liboconfig/oconfig.h $$include_dir/liboconfig + dh_install -i install-arch: build dh_testdir dh_testroot - dh_clean -k + dh_clean -k dh_installdirs -a - $(MAKE) install DESTDIR=$(CURDIR)/debian/collectd - - rm -rf debian/collectd/usr/include/ - rm -f debian/collectd/usr/lib/collectd/*.la + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp - rm -f debian/collectd/etc/collectd.conf - install -D -m 0644 debian/collectd.conf \ - debian/collectd/etc/collectd/collectd.conf - install -m 0644 debian/collection.conf \ - debian/collectd/etc/collectd/collection.conf - install -m 0644 debian/thresholds.conf \ - debian/collectd/etc/collectd/thresholds.conf + rm -f debian/tmp/usr/lib/collectd/*.la + rm -f debian/tmp/etc/collectd.conf - mkdir -p debian/collectd/usr/lib/collectd/utils/ - for UTIL in rrd_filter.px migrate-3-4.px; do \ - cp contrib/$$UTIL debian/collectd/usr/lib/collectd/utils/; \ - done + dh_install -a --sourcedir=$(CURDIR)/debian/tmp --fail-missing perl ./debian/bin/gen_plugin_deps.pl @@ -158,11 +143,13 @@ binary-arch: build install-arch dh_strip -a --dbg-package=collectd-dbg dh_compress -a -Xexamples/ dh_fixperms -a + dh_makeshlibs -a dh_installdeb -a dpkg-shlibdeps -Tdebian/collectd.substvars \ -dDepends debian/collectd/usr/bin/* debian/collectd/usr/sbin/* \ debian/collectd/usr/lib/collectd/rrdtool.so \ -dRecommends debian/collectd/usr/lib/collectd/*.so + dh_shlibdeps -a -Ncollectd dh_gencontrol -a dh_md5sums -a dh_builddeb -a -- 2.30.2