#!/usr/bin/make -f
# SPDX-FileCopyrightText: 2015-2026 Univention GmbH
# SPDX-License-Identifier: AGPL-3.0-only

TAR := crudesaml-1.9.tar.gz
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DH_VERBOSE=1

override_dh_auto_clean:
	$(RM) -r src
	install -d src
	tar -x -f $(TAR) -C src --strip-components 1
	cd src && QUILT_PATCHES=$(CURDIR)/patches quilt push -a
	dh_auto_clean

override_dh_auto_configure:
	cd src && autoreconf --install --force
	dh_auto_configure -- --with-pamlibdir=/lib/$(DEB_HOST_MULTIARCH)/security/

%:
	dh $@ --sourcedirectory=src
