#!/usr/bin/make -f
#
# Univention License
#  rules file for the debian package
#
# SPDX-FileCopyrightText: 2004-2025 Univention GmbH
# SPDX-License-Identifier: AGPL-3.0-only

CFLAGS += -I/usr/include/samba-4.0
LDFLAGS += -Wl,--as-needed

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

%:
	dh $@ --buildsystem=makefile --with ucr

override_dh_auto_configure:
	CFLAGS="$(CFLAGS)" ./configure \
		--prefix=/usr \
		--disable-rpath-install \
		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
		--with-modulesdir=/usr/lib/$(DEB_HOST_MULTIARCH)/samba
