From: Marc Fournier Date: Mon, 6 Jul 2015 21:44:56 +0000 (+0200) Subject: update headers include path replacement X-Git-Tag: collectd-5.5.0-1~19 X-Git-Url: https://git.tokkee.org/?p=pkg-collectd.git;a=commitdiff_plain;h=4aee0c43aea80080fc7b1046a387bbf5abc29559 update headers include path replacement Now that part of the headers have been moved to the daemon/ subdirectory, this bit needs to be slightly more sophisticated. --- diff --git a/debian/changelog b/debian/changelog index c5cfc2f..138a119 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,7 +13,7 @@ collectd (5.5.0-1) UNRELEASED; urgency=medium - Removed bts770694_loglevel.dpatch; merged upstream. - Removed collection.cgi.dpatch; merged upstream. - Removed myplugin_api.dpatch; merged upstream. - * debian/collectd-dev.install, myplugin_includes.dpatch: + * debian/rules, debian/collectd-dev.install, myplugin_includes.dpatch: - Update path to header files moved to daemon/ subdirectory upstream. * debian/rules, debian/control: - Enable redis, write_redis plugins and add Build-depend on diff --git a/debian/rules b/debian/rules index 3346909..c38d9af 100755 --- a/debian/rules +++ b/debian/rules @@ -209,10 +209,15 @@ install-indep: dh_install -i # update include path for collectd header files - sed -r -i -e 's/include "(.*)"/include "collectd\/core\/\1"/' \ - $(CURDIR)/debian/collectd-dev/usr/include/collectd/core/* - sed -r -i -e 's/"collectd\/core\/(liboconfig\/.*)"/"collectd\/\1"/' \ - $(CURDIR)/debian/collectd-dev/usr/include/collectd/core/* + ( set -e; \ + cd $(CURDIR)/debian/collectd-dev/usr/include/collectd/; \ + for lib in $$(find . -type f -name '*.h'); do \ + libname=$$(basename $$lib); \ + fullpath=$$(echo $$lib | sed -r -e 's,^\./,collectd/,'); \ + for dir in $$(find . -mindepth 1 -type d); do \ + sed -r -i -e "s,(include\s+)\".*$$libname\",\1\"$$fullpath\"," $$dir/*.h; \ + done; \ + done ) install-arch: build dh_testdir