#!/usr/bin/make -f
export DH_VERBOSE=1
export DEB_BUILD_OPTIONS=nocheck

PYBUILD_NAME=holland

%:
	 dh $@ --with=python3 --buildsystem=pybuild


override_dh_auto_build:
	dh_auto_build -O--with=python3
	dh_auto_build -O--with=python3 -Dplugins/holland.lib.common
	dh_auto_build -O--with=python3 -Dplugins/holland.lib.mysql
	dh_auto_build -O--with=python3 -Dplugins/holland.lib.lvm
	dh_auto_build -O--with=python3 -Dplugins/holland.backup.mysqldump
	dh_auto_build -O--with=python3 -Dplugins/holland.backup.mysql_lvm
	dh_auto_build -O--with=python3 -Dplugins/holland.backup.pgdump
	dh_auto_build -O--with=python3 -Dplugins/holland.backup.mongodump
	dh_auto_build -O--with=python3 -Dplugins/holland.backup.xtrabackup
	dh_auto_build -O--with=python3 -Dplugins/holland.backup.mariabackup
	dh_auto_build -O--with=python3 -Dplugins/holland.backup.mariadb_dump
	dh_auto_build -O--with=python3 -Dplugins/holland.backup.mysqlsh
	dh_auto_build -O--with=python3 -Dplugins/holland.backup.command
	dh_auto_build -O--with=python3 -Dcontrib/holland-commvault
        
override_dh_auto_install:
	dh_auto_install -O--with=python3
	dh_auto_install -O--with=python3  -Dplugins/holland.lib.common 
	dh_auto_install -O--with=python3  -Dplugins/holland.lib.mysql
	dh_auto_install -O--with=python3  -Dplugins/holland.lib.lvm
	dh_auto_install -O--with=python3  -Dplugins/holland.backup.mysqldump
	dh_auto_install -O--with=python3  -Dplugins/holland.backup.mysql_lvm
	dh_auto_install -O--with=python3  -Dplugins/holland.backup.pgdump
	dh_auto_install -O--with=python3  -Dplugins/holland.backup.mongodump
	dh_auto_install -O--with=python3  -Dplugins/holland.backup.xtrabackup
	dh_auto_install -O--with=python3  -Dplugins/holland.backup.mariabackup
	dh_auto_install -O--with=python3  -Dplugins/holland.backup.mariadb_dump
	dh_auto_install -O--with=python3  -Dplugins/holland.backup.mysqlsh
	dh_auto_install -O--with=python3  -Dplugins/holland.backup.command
	dh_auto_install -O--with=python3  -Dcontrib/holland-commvault
	find debian/holland/ \( -name '*.pth' -or -name 'namespace_packages.txt' \) -delete

override_dh_compress:
	dh_compress -X.txt

override_dh_installman:
	dh_auto_build -O--buildsystem=makefile -Ddocs -- man
	dh_installman

