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




CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

configure: configure-stamp
configure-stamp:
	dh_testdir
	# Add here commands to configure the package.

	touch configure-stamp


build: build-stamp

build-stamp: configure-stamp
	dh_testdir
	touch build-stamp

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

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# ======================================================
	#$(MAKE) DESTDIR="$(CURDIR)/debian/telepathy-theonering" install
	mkdir -p "$(CURDIR)/debian/telepathy-theonering"

	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!__init__.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/__init__.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!aliasing.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/aliasing.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!autogv.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/autogv.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!capabilities.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/capabilities.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!channel_manager.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel_manager.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!connection.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/connection.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!connection_manager.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/connection_manager.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!constants.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/constants.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!contacts.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/contacts.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!debug.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/debug.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!handle.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/handle.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!location.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/location.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!presence.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/presence.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!requests.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/requests.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!simple_presence.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/simple_presence.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/"
	cp -a "src!theonering.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/theonering.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/share/icons/hicolor/26x26/hildon/"
	cp -a "26x26-theonering.png" "$(CURDIR)/debian/telepathy-theonering/usr/share/icons/hicolor/26x26/hildon/im-theonering.png"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/share/osso-rtcom/"
	cp -a "theonering.profile.fremantle" "$(CURDIR)/debian/telepathy-theonering/usr/share/osso-rtcom/theonering.profile"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/telepathy/"
	cp -a "telepathy-theonering" "$(CURDIR)/debian/telepathy-theonering/usr/lib/telepathy/telepathy-theonering"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/share/dbus-1/services/"
	cp -a "org.freedesktop.Telepathy.ConnectionManager.theonering.service" "$(CURDIR)/debian/telepathy-theonering/usr/share/dbus-1/services/org.freedesktop.Telepathy.ConnectionManager.theonering.service"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/"
	cp -a "src!channel!__init__.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/__init__.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/"
	cp -a "src!channel!call.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/call.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/"
	cp -a "src!channel!contact_list.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/contact_list.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/"
	cp -a "src!channel!debug_log.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/debug_log.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/"
	cp -a "src!channel!debug_prompt.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/debug_prompt.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/"
	cp -a "src!channel!text.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/text.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/"
	cp -a "src!util!__init__.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/__init__.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/"
	cp -a "src!util!algorithms.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/algorithms.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/"
	cp -a "src!util!concurrent.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/concurrent.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/"
	cp -a "src!util!coroutines.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/coroutines.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/"
	cp -a "src!util!go_utils.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/go_utils.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/"
	cp -a "src!util!io.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/io.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/"
	cp -a "src!util!linux.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/linux.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/"
	cp -a "src!util!misc.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/misc.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/"
	cp -a "src!util!overloading.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/overloading.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/"
	cp -a "src!util!tp_utils.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/util/tp_utils.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/"
	cp -a "src!tp!__init__.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/__init__.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/"
	cp -a "src!tp!channel.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/channel.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/"
	cp -a "src!tp!channelhandler.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/channelhandler.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/"
	cp -a "src!tp!channelmanager.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/channelmanager.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/"
	cp -a "src!tp!conn.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/conn.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/"
	cp -a "src!tp!connmgr.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/connmgr.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/"
	cp -a "src!tp!debug.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/debug.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/"
	cp -a "src!tp!handle.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/handle.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/"
	cp -a "src!tp!media.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/media.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/"
	cp -a "src!tp!properties.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/tp/properties.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/share/telepathy/managers/"
	cp -a "theonering.manager" "$(CURDIR)/debian/telepathy-theonering/usr/share/telepathy/managers/theonering.manager"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/"
	cp -a "src!gvoice!__init__.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/__init__.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/"
	cp -a "src!gvoice!addressbook.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/addressbook.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/"
	cp -a "src!gvoice!backend.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/backend.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/"
	cp -a "src!gvoice!browser_emu.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/browser_emu.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/"
	cp -a "src!gvoice!conversations.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/conversations.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/"
	cp -a "src!gvoice!session.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/session.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/"
	cp -a "src!gvoice!state_machine.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gvoice/state_machine.py"

	# ======================================================

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

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs debian/changelog
	dh_installdocs
	dh_installexamples
#	dh_install
#	dh_installmenu
#	dh_installdebconf
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_python
#	dh_installinit
#	dh_installcron
#	dh_installinfo
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_perl
#	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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