#!/usr/bin/make -f
#
# PACKAGES
#  rules file for the debian package
#
# Like what you see? Join us!
# https://www.univention.com/about-us/careers/vacancies/
#
# SPDX-FileCopyrightText: 2004-2025 Univention GmbH
# SPDX-License-Identifier: AGPL-3.0-only

export DH_VERBOSE=1

%:
	dh $@ --with python3,univention-l10n,umc,ucr,univention-join --buildsystem=pybuild

export PYBUILD_NAME=univention-appcenter

override_dh_auto_clean:
	dh_auto_clean --buildsystem=pybuild
	rm -rf build/
	dh_auto_clean
	make clean

override_dh_auto_build:
	dh_auto_build
	make
	dh_auto_build --buildsystem=pybuild

override_dh_auto_install:
	dh_auto_install --buildsystem=pybuild
	python3 setup_dev.py build --force -b build/python3-univention-appcenter-dev install --force --root=debian/python3-univention-appcenter-dev --install-layout=deb
	python3 setup_docker.py build --force -b build/python3-univention-appcenter-docker install --force --root=debian/python3-univention-appcenter-docker --install-layout=deb
	python3 setup_umc.py build --force -b build/univention-appcenter-umc install --force --root=debian/univention-management-console-module-appcenter --install-layout=deb
	dh_auto_install

override_dh_auto_test:
	dh_auto_test --buildsystem=pybuild
	dh_auto_test
