2 # debian/rules for collectd
4 # Written by Sebastian Harl <sh@tokkee.org>.
6 # Uncomment this to turn on verbose mode.
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
22 config.status: configure
24 CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
25 --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
26 --mandir=\$${prefix}/share/man \
27 --localstatedir=/var --sysconfdir=/etc
31 build-stamp: config.status
53 include_dir=$(CURDIR)/debian/collectd-dev/usr/include/collectd/ \
54 && mkdir -p $$include_dir \
55 && cp src/*.h $$include_dir
63 $(MAKE) install DESTDIR=$(CURDIR)/debian/collectd
65 rm -f $(CURDIR)/debian/collectd/usr/lib/collectd/*.la
67 rm -f $(CURDIR)/debian/collectd/etc/collectd.conf
68 install -D -m 0644 $(CURDIR)/debian/collectd.conf \
69 $(CURDIR)/debian/collectd/etc/collectd/collectd.conf
71 for PLUGIN in apache hddtemp mbmon mysql ping sensors; do \
72 plugin_dir=$(CURDIR)/debian/collectd-$$PLUGIN/usr/lib/collectd/; \
73 mkdir -p $$plugin_dir; \
74 mv $(CURDIR)/debian/collectd/usr/lib/collectd/$$PLUGIN.so \
78 binary-indep: install-indep
81 dh_installchangelogs -i ChangeLog
82 dh_installdocs -A -i debian/README.Debian AUTHORS README TODO
83 dh_installexamples -i debian/examples/myplugin.c
91 binary-arch: build install-arch
94 dh_installchangelogs -a ChangeLog
95 dh_installdocs -A -a debian/README.Debian AUTHORS README TODO
96 dh_installexamples -a contrib/collectd2html.pl contrib/collection.cgi
97 dh_installinit -a -- defaults 95
98 dh_installman -a src/collectd.1 src/collectd.conf.5
100 dh_strip -a --dbg-package=collectd-dbg
109 binary: binary-arch binary-indep
110 .PHONY: build clean binary-indep binary-arch binary install-indep install-arch