#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

binary-indep: 
	true

binary: binary-arch 

binary-arch: build-arch install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

build: build-arch

build-arch:
	dh_testdir
	valac --pkg gio-2.0 mce_ledpattern.vala -o mceledpattern

install: build
	dh_testdir
	dh_testroot
	dh_installdirs

	mkdir -p $(CURDIR)/debian/mceledpattern/usr/bin
	cp mceledpattern $(CURDIR)/debian/mceledpattern/usr/bin/mceledpattern
	chmod a+x $(CURDIR)/debian/mceledpattern/usr/bin/mceledpattern
	mkdir -p $(CURDIR)/debian/mceledpattern/etc/sudoers.d
	cp mceledpattern.sudoers $(CURDIR)/debian/mceledpattern/etc/sudoers.d/mceledpattern.sudoers
	

clean:
	rm -rf $(CURDIR)/debian/mceledpattern/
	dh_clean

