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

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	dh_clean 

build:
	echo "nothing to be done..."

install:
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs usr/sbin etc/acpi/events etc/acpi/actions etc/hibernate etc/init.d

	# Add here commands to install the package into debian/grml-samsung-x20.
	install -m 755 scripts/samsung_s3   debian/grml-samsung-x20/usr/sbin/
	install -m 755 scripts/samsung_s4   debian/grml-samsung-x20/usr/sbin/
	install -m 644 acpi/lidbtn          debian/grml-samsung-x20/etc/acpi/events/
	install -m 755 acpi/lidbtn.sh       debian/grml-samsung-x20/etc/acpi/actions/
	install -m 644 acpi/sleepbtn        debian/grml-samsung-x20/etc/acpi/events/
	install -m 755 acpi/sleepbtn.sh     debian/grml-samsung-x20/etc/acpi/actions/
	install -m 755 samsung_x20          debian/grml-samsung-x20/etc/init.d/samsung_x20

# Build architecture-independent files here.
binary-indep: install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
	dh_installexamples examples/*
	dh_installman man/samsungx20.8
	dh_link  /usr/share/man/man8/samsungx20.8.gz /usr/share/man/man8/samsung_s3.8.gz
	dh_link  /usr/share/man/man8/samsungx20.8.gz /usr/share/man/man8/samsung_s4.8.gz
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: clean binary-indep binary-arch binary install
