Code

rules: disable a couple of Linux-only plugins on kFreeBSD
[pkg-collectd.git] / debian / rules
index fca492c9b3d482e6613583f5a2e8bb38db04eb44..d34f88fa6a45381419d333cb7c726dcc2d295c85 100755 (executable)
@@ -85,11 +85,19 @@ confflags += --disable-write_mongodb
 # xmms1 is required for the xmms plugin.
 confflags += --disable-xmms
 
+# protobuf-compiler >= 3.0.0 and libgrpc++ are required for the grpc plugin.
+confflags += --disable-grpc
+
 # These plugins are Linux-specific.
 ifneq (,$(filter kfreebsd-i386 kfreebsd-amd64, $(DEB_BUILD_ARCH)))
        confflags += \
+               --disable-barometer \
                --disable-cgroups \
+               --disable-cpusleep \
+               --disable-drbd \
                --disable-ethstat \
+               --disable-fhcount \
+               --disable-ipc \
                --disable-iptables \
                --disable-ipvs \
                --disable-lvm \
@@ -111,6 +119,10 @@ ifeq (,$(filter kfreebsd-i386 kfreebsd-amd64, $(DEB_BUILD_ARCH)))
                --disable-pf
 endif
 
+# This plugin is Solaris-specific.
+confflags += \
+               --disable-zone
+
 # These plugins have not been ported to FreeBSD yet.
 ifneq (,$(filter kfreebsd-i386 kfreebsd-amd64, $(DEB_BUILD_ARCH)))
        # Work-around an incomplete check for kvm functionality
@@ -122,7 +134,6 @@ ifneq (,$(filter kfreebsd-i386 kfreebsd-amd64, $(DEB_BUILD_ARCH)))
                --disable-conntrack \
                --disable-contextswitch \
                --disable-cpufreq \
-               --disable-disk \
                --disable-entropy \
                --disable-fscache \
                --disable-irq \
@@ -149,6 +160,12 @@ ifeq (,$(filter amd64 i386, $(DEB_BUILD_ARCH)))
                --disable-turbostat
 endif
 
+# This plugin is x86 and arm specific.
+ifeq (,$(filter amd64 arm64 armhf i386, $(DEB_BUILD_ARCH)))
+       confflags += \
+               --disable-xencpu
+endif
+
 # libatasmart isn't available on these platforms.
 ifneq (,$(filter hurd-i386 kfreebsd-i386 kfreebsd-amd64, $(DEB_BUILD_ARCH)))
        confflags += --disable-smart
@@ -217,7 +234,7 @@ install-indep:
                        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; \
+                               sed -r -i -e "s,(include\s+)\".*\<$$libname\",\1\"$$fullpath\"," $$dir/*.h; \
                        done; \
                done )