#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/dpkg/pkg-info.mk

%:
	dh $@

override_dh_auto_build:
	rollup -c
	ln -s bin/index.mjs ldap-rest
	help2man --version-string="$(DEB_VERSION_UPSTREAM)" --name=ldap-rest -o ldap-rest.1 -N ./ldap-rest
	rm -f ldap-rest

override_dh_fixperms:
	dh_fixperms
	for f in cleanup-external-users.mjs index.mjs sync-app-accounts.mjs sync-james.mjs; do \
		chmod +x debian/ldap-rest/usr/share/nodejs/ldap-rest/bin/$$f; \
	done
