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

# debian/rules for TLP

# 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

build:
	# do nothing
	
clean: 
	dh_testdir
	dh_testroot
	# add here commands to clean up after the build process.
	# $(MAKE) clean
	dh_clean 

tlp: 
	dh_testdir
	dh_testroot
	dh_prep  

	# install into debian/tlp.
	$(MAKE) DESTDIR=$(CURDIR)/debian/$@ install-tlp

	dh_installchangelogs -p$@
	dh_installdocs -p$@
	dh_installinit -p$@ --no-start -- defaults 98 01
	dh_installman -p$@
	dh_link -p$@
	dh_strip -p$@
	dh_compress -p$@
	dh_fixperms -p$@
	dh_installdeb -p$@
	dh_shlibdeps -p$@
	dh_gencontrol -p$@
	dh_md5sums -p$@
	dh_builddeb -p$@

tlp-rdw: 
	dh_testdir
	dh_testroot
	dh_prep  

	# install into debian/tlp-rdw.
	$(MAKE) DESTDIR=$(CURDIR)/debian/$@ install-rdw

	dh_installchangelogs -p$@
	dh_installdocs -p$@
	dh_link -p$@
	dh_strip -p$@
	dh_compress -p$@
	dh_fixperms -p$@
	dh_installdeb -p$@
	dh_shlibdeps -p$@
	dh_gencontrol -p$@
	dh_md5sums -p$@
	dh_builddeb -p$@

# Build architecture-independent files here.
binary-indep: tlp tlp-rdw
	
# Build architecture-dependent files here.
binary-arch: 
	# do nothing

binary: binary-indep binary-arch

# Run targets that don't result in corresponding files
.PHONY: clean tlp tlp-rdw binary-indep binary-arch binary 
