#!/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

BUILDROOT := $(shell pwd)

%:
	dh $@ 

override_dh_install:
	install -d -m 0755 debian/tmp/lib/udev/rules.d
	mv debian/tmp/lib/udev/rules.d/51-dlm.rules debian/tmp/lib/udev/rules.d/45-dlm.rules

	cp init/dlm.init $(BUILDROOT)/debian/dlm.init

	dh_install --sourcedir=debian/tmp --list-missing

	# install the modules loader to ensure that the dlm modules are loaded
	# at system startup.
	install -D -m 644 debian/local/modules-load.conf debian/dlm/etc/modules-load.d/dlm.conf
