Code

rules: Fix failure to build twice in a row introduced by dh_autoreconf_clean.
[pkg-collectd.git] / debian / rules
index 0da5b2bebde227c405990e67a406900ca458dc4f..fca492c9b3d482e6613583f5a2e8bb38db04eb44 100755 (executable)
@@ -19,12 +19,6 @@ CPPFLAGS += -I$(CURDIR)/debian/include
 CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
 CFLAGS += -Wall -Wno-error=deprecated-declarations
 
-# There is no way to tell lt_dlopen() to use the RTLD_GLOBAL flag which is
-# however required by the perl plugin (which would otherwise be unable to find
-# symbols defined in libperl when loading perl modules that require such
-# symbols). This is a workaround for this issue.
-CPPFLAGS += -DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL'
-
 # Upstream defaults to ${sysconfdir}/collectd.conf. Setting ${sysconfdir} to
 # /etc/collectd would be wrong though.
 CPPFLAGS += -UCONFIGFILE
@@ -105,6 +99,10 @@ ifneq (,$(filter kfreebsd-i386 kfreebsd-amd64, $(DEB_BUILD_ARCH)))
                --disable-numa \
                --disable-sensors \
                --disable-vserver
+       # libsigrok >= 0.2.0 is required for the sigrok plugin,
+       # only available on Linux.
+       confflags += \
+               --disable-sigrok
 endif
 
 # This plugin is FreeBSD-specific.
@@ -163,9 +161,15 @@ ifneq (,$(filter hppa sparc, $(DEB_BUILD_ARCH)))
        confflags += --disable-java
 endif
 
-config.status: configure
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep: build-stamp
+
+build-stamp:
        dh_testdir
        
+       dh_autoreconf
+       
        # This is a work-around for #474087 (broken openipmi .pc files).
        mkdir debian/pkgconfig
        sed -re 's/^(Requires:.*) pthread(.*)$$/\1\2/' \
@@ -178,13 +182,6 @@ config.status: configure
                JAVA_LDFLAGS="$(JAVA_LDFLAGS)" \
                || ( status=$$?; cat config.log; exit $$status )
 
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-
-build-stamp: config.status
-       dh_testdir
-       
        $(MAKE)
        perl ./debian/bin/check_plugins.pl
        
@@ -202,6 +199,7 @@ clean:
        
        rm -rf debian/pkgconfig
        
+       dh_autoreconf_clean
        dh_clean
        debconf-updatepo