#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # Helps reproducible builds, and required by some tests (first day of week): export LANG=C.UTF-8 export LC_ALL=C.UTF-8 export TZ=UTC #tcl version we're building for TCL_VERS := $(shell dpkg -s tcl-dev | grep '^Depends' \ | sed 's,.*\.*,\1,') DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow # Bindings perls-shared and ruby need this: export ABS_TOP_SRCDIR=$(CURDIR) export ABS_TOP_BUILDDIR=$(CURDIR) %: dh $@ --with lua,python3,ruby override_dh_auto_configure: dh_auto_configure -- \ --disable-silent-rules \ --disable-rpath \ --disable-lua \ --disable-perl \ --disable-python \ --disable-ruby \ --with-tcllib=/usr/lib/$(DEB_HOST_MULTIARCH)/tcl$(TCL_VERS) \ RRDDOCDIR=/usr/share/doc/rrdtool dh_auto_configure --buildsystem=lua dh_auto_configure --sourcedirectory=bindings/perl-shared dh_auto_configure --sourcedirectory=bindings/perl-piped dh_auto_configure --buildsystem=pybuild --sourcedirectory=bindings/python dh_auto_configure --buildsystem=ruby override_dh_auto_clean: dh_auto_clean --buildsystem=lua dh_auto_clean --sourcedirectory=bindings/perl-shared dh_auto_clean --sourcedirectory=bindings/perl-piped dh_auto_clean --buildsystem=pybuild --sourcedirectory=bindings/python dh_auto_clean --buildsystem=ruby dh_auto_clean # Must be called last, after other debhelper's clean override_dh_auto_build: dh_auto_build dh_auto_build --buildsystem=lua dh_auto_build --sourcedirectory=bindings/perl-shared dh_auto_build --sourcedirectory=bindings/perl-piped dh_auto_build --buildsystem=pybuild --sourcedirectory=bindings/python dh_auto_build --buildsystem=ruby # Fix library path to tcl bindings: sed -i -e 's|lib/|lib/tcltk/|' -e 's|/tclrrd|/rrdtool-tcl/tclrrd|' bindings/tcl/pkgIndex.tcl override_dh_auto_test: dh_auto_test # rrdcached doesn't work on hurd yet: # sigwaitinfo exists, but returns ENOSYS (not implemented) test $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) = hurd \ || dh_auto_test -- TESTS_STYLE="rrdcached" dh_auto_test --buildsystem=lua LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(CURDIR)/src/.libs \ dh_auto_test --sourcedirectory=bindings/perl-shared dh_auto_test --sourcedirectory=bindings/perl-piped LD_LIBRARY_PATH=$(CURDIR)/src/.libs \ PYBUILD_SYSTEM=custom \ PYBUILD_BEFORE_TEST='cp -r {dir}/tests {build_dir}' \ PYBUILD_AFTER_TEST='rm -rf {build_dir}/tests' \ PYBUILD_TEST_ARGS='cd {build_dir}; {interpreter} -m unittest discover' \ dh_auto_test --buildsystem=pybuild --sourcedirectory=bindings/python dh_auto_test --buildsystem=ruby override_dh_auto_install: dh_auto_install dh_auto_install --buildsystem=lua dh_auto_install --sourcedirectory=bindings/perl-shared dh_auto_install --sourcedirectory=bindings/perl-piped dh_auto_install --buildsystem=pybuild --sourcedirectory=bindings/python dh_auto_install --buildsystem=ruby override_dh_install: # We don't install systemd files yet. (TODO) # Socket location changes, it should use default file. dh_install -X.la -X.txt -X.pod -Xsystemd override_dh_installdocs: dh_installdocs -A CONTRIBUTORS NEWS override_dh_missing: dh_missing -X.la -X.txt -X.pod -Xsystemd override_dh_strip: dh_strip --package=python3-rrdtool --dbgsym-migration='rrdtool-dbg (<< 1.7.2-4~)' dh_strip --no-package=python3-rrdtool --dbgsym-migration='rrdtool-dbg (<< 1.7.2-2~)' override_dh_gencontrol: tcltk-depends dh_gencontrol