#!/usr/bin/make -f

export DH_VERBOSE=1
export PYBUILD_VERBOSE=1
PACKAGES = core authentication build log permissions settings web

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

override_dh_auto_build:
{% if version.dist == "ubuntu2204" %}
	$(foreach PACKAGE,$(PACKAGES),cp src/build/rfl/build/scripts/setup src/$(PACKAGE)/setup.py;)
{% endif %}
	$(foreach PACKAGE,$(PACKAGES),dh_auto_build -- --dir src/$(PACKAGE) --name rfl-$(PACKAGE);)

override_dh_auto_install:
	$(foreach PACKAGE,$(PACKAGES),dh_auto_install -- --name rfl-$(PACKAGE);)
