#!/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-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-gtk_toolbox.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/gtk_toolbox.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-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/theonering.png"
	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/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/share/osso-rtcom/"
	cp -a "theonering.profile" "$(CURDIR)/debian/telepathy-theonering/usr/share/osso-rtcom/theonering.profile"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/share/icons/hicolor/64x64/hildon/"
	cp -a "64x64-theonering.png" "$(CURDIR)/debian/telepathy-theonering/usr/share/icons/hicolor/64x64/hildon/theonering.png"
	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/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-text.py" "$(CURDIR)/debian/telepathy-theonering/usr/lib/theonering/channel/text.py"
	mkdir -p "$(CURDIR)/debian/telepathy-theonering/usr/share/icons/hicolor/scalable/hildon/"
	cp -a "scale-theonering.png" "$(CURDIR)/debian/telepathy-theonering/usr/share/icons/hicolor/scalable/hildon/theonering.png"
	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
