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

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

# shorewall version
export V=`grep "^VERSION=" install.sh | head -n 1 | cut -f 2 -d "="`

SRWL=$(CURDIR)/debian/shorewall-init

%:
	dh $@ 

override_dh_auto_configure:
	./configure

override_dh_auto_build:
	true

override_dh_auto_clean:
	rm -rf $(SRWL) shorewallrc

override_dh_install:
	DESTDIR=$(SRWL) BUILD=debian HOST=debian $(CURDIR)/install.sh
	find $(SRWL) -type d -empty -delete
	rm -f $(SRWL)/etc/rcS.d/S38shorewall-init

override_dh_fixperms:
	dh_fixperms -Xetc/shorewall-init -Xvar/lib/shorewall-init

override_dh_installinit:
	dh_installinit --onlyscripts --no-start -u"start 38 S . 02 0 6"

