- dh_installdirs
-
- for PLUGIN in $(PLUGINS); do \
- mkdir -p $(CURDIR)/debian/collectd-$${PLUGIN}/usr/lib/collectd; \
- done
-
- # Add here commands to install the package into debian/collectd.
- $(MAKE) DESTDIR=$(CURDIR)/debian/collectd install
- rm $(CURDIR)/debian/collectd/usr/lib/collectd/*.a || true
- rm $(CURDIR)/debian/collectd/usr/lib/collectd/*.la || true
-
- for PLUGIN in $(PLUGINS); do \
- mv $(CURDIR)/debian/collectd/usr/lib/collectd/$${PLUGIN}.* $(CURDIR)/debian/collectd-$${PLUGIN}/usr/lib/collectd; \
- done
-
-# 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_installdirs -a
+
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/collectd
+
+ rm -f $(CURDIR)/debian/collectd/usr/lib/collectd/*.la
+
+ rm -f $(CURDIR)/debian/collectd/etc/collectd.conf
+ install -D -m 0644 $(CURDIR)/debian/collectd.conf \
+ $(CURDIR)/debian/collectd/etc/collectd/collectd.conf
+
+ for PLUGIN in apache hddtemp mbmon mysql ping sensors; do \
+ plugin_dir=$(CURDIR)/debian/collectd-$$PLUGIN/usr/lib/collectd/; \
+ mkdir -p $$plugin_dir; \
+ mv $(CURDIR)/debian/collectd/usr/lib/collectd/$$PLUGIN.so \
+ $$plugin_dir; \
+ done
+
+binary-indep: install-indep
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs -i ChangeLog
+ dh_installdocs -A -i debian/README.Debian AUTHORS README TODO
+ dh_installexamples -i debian/examples/myplugin.c
+ dh_compress -i
+ dh_fixperms -i
+ dh_installdeb -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
+
+binary-arch: build install-arch