#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-+]+).*,\1,p')

%:
	dh  $@

override_dh_auto_configure:
	./rds/configure --prefix=/usr/ \
		--rds-prefix=/usr/ \
		--samba-prefix=/var/lib/samba/ \
		--samba-provision=/usr/share/samba/setup/provision \
		--samba-net=/usr/sbin/samba-tool \
		--samba-sysvol=/var/lock/samba/sysvol/ \
		--samba-config=/etc/samba/smb.conf \
		--samba-util-path=/usr/bin/

get-orig-source:
	uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
