#!/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/pygtkeditor" install
	mkdir -p "$(CURDIR)/debian/pygtkeditor"

	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/"
	cp -a "cpp-mime.xml" "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/cpp-mime.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/"
	cp -a "cpp-mime.xml" "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/cpp-mime.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/"
	cp -a "glade-mime.xml" "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/glade-mime.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/"
	cp -a "latex-mime.xml" "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/latex-mime.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/"
	cp -a "perl-mime.xml" "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/perl-mime.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/"
	cp -a "python-mime.xml" "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/python-mime.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/"
	cp -a "ruby-mime.xml" "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/ruby-mime.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/"
	cp -a "sh-mime.xml" "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/sh-mime.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/"
	cp -a "sql-mime.xml" "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/sql-mime.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/"
	cp -a "xml-mime.xml" "$(CURDIR)/debian/pygtkeditor/usr/share/mime/packages/xml-mime.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/bin/"
	cp -a "pygtkeditor" "$(CURDIR)/debian/pygtkeditor/usr/bin/pygtkeditor"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/pixmaps/"
	cp -a "pygtkeditor.png" "$(CURDIR)/debian/pygtkeditor/usr/share/pixmaps/pygtkeditor.png"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/"
	cp -a "pge_buffer.py" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/pge_buffer.py"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/"
	cp -a "pge_defering.py" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/pge_defering.py"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/"
	cp -a "pge_editor.py" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/pge_editor.py"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/"
	cp -a "pge_help.py" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/pge_help.py"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/"
	cp -a "pge_main.py" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/pge_main.py"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/"
	cp -a "pge_preferences.py" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/pge_preferences.py"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/"
	cp -a "pge_recentchooser.py" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/pge_recentchooser.py"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/"
	cp -a "pge_window.py" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/pge_window.py"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/"
	cp -a "portrait.py" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/portrait.py"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/"
	cp -a "pygtkeditor.png" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/pygtkeditor.png"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/"
	cp -a "pygtkeditor.py" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/pygtkeditor.py"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/R.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/R.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/ada.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/ada.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/c.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/c.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/changelog.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/changelog.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/cpp.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/cpp.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/csharp.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/csharp.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/css.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/css.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/desktop.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/desktop.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/diff.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/diff.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/fortran.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/fortran.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/gtkrc.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/gtkrc.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/haskell.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/haskell.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/html.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/html.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/idl.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/idl.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/ini.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/ini.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/java.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/java.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/javascript.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/javascript.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/latex.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/latex.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/lua.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/lua.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/makefile.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/makefile.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/markdown.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/markdown.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/msil.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/msil.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/nemerle.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/nemerle.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/octave.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/octave.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/pascal.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/pascal.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/perl.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/perl.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/php.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/php.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/po.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/po.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/python.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/python.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/ruby.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/ruby.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/scheme.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/scheme.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/sh.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/sh.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/sql.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/sql.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/tcl.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/tcl.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/texinfo.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/texinfo.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/vbnet.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/vbnet.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/verilog.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/verilog.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/vhdl.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/vhdl.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax"
	cp -a "syntax/xml.xml" "$(CURDIR)/debian/pygtkeditor/opt/pygtkeditor/syntax/xml.xml"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/icons/hicolor/48x48/hildon/"
	cp -a "pygtkeditor-decrease_indent.png" "$(CURDIR)/debian/pygtkeditor/usr/share/icons/hicolor/48x48/hildon/pygtkeditor-decrease_indent.png"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/icons/hicolor/48x48/hildon/"
	cp -a "pygtkeditor-increase_indent.png" "$(CURDIR)/debian/pygtkeditor/usr/share/icons/hicolor/48x48/hildon/pygtkeditor-increase_indent.png"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/applications/hildon/"
	cp -a "pygtkeditor.desktop" "$(CURDIR)/debian/pygtkeditor/usr/share/applications/hildon/pygtkeditor.desktop"
	mkdir -p "$(CURDIR)/debian/pygtkeditor/usr/share/dbus-1/services/"
	cp -a "pygtkeditor.service" "$(CURDIR)/debian/pygtkeditor/usr/share/dbus-1/services/pygtkeditor.service"

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

# 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
