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




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

	#touch configure-stamp


build: build-stamp
	#touch build-stamp

build-stamp: configure-stamp
	dh_testdir

	# Add here commands to compile the package.


clean:
	dh_testdir
	dh_testroot
#	rm -f build-stamp configure-stamp
	rm -rf debian/gcue2tracks
	rm -f debian/files
	rm -f *.pyc
	rm -f geany_run_script.sh
	dh_clean

install: build


	dh_testroot
#	dh_clean -k



	# Add here commands to install the package into debian/gcue2tracks.
	mkdir -p debian/gcue2tracks/usr/bin
	cp -r --remove-destination gcue2tracks debian/gcue2tracks/usr/bin/
	#cp  --remove-destination libmac2/mac debian/gcue2tracks/usr/bin
	#mkdir -p debian/gcue2tracks/usr/lib
	#cp --remove-destination libmac2/lib* debian/gcue2tracks/usr/lib
	mkdir -p debian/gcue2tracks/usr/share/applications
	cp --remove-destination gCue2tracks.desktop debian/gcue2tracks/usr/share/applications
	mkdir -p debian/gcue2tracks/usr/share/gcue2tracks
	cp --remove-destination gCue2tracks.glade debian/gcue2tracks/usr/share/gcue2tracks
	cp --remove-destination gCue2tracks.py debian/gcue2tracks/usr/share/gcue2tracks
	cp --remove-destination config.py debian/gcue2tracks/usr/share/gcue2tracks
	cp --remove-destination preference.py debian/gcue2tracks/usr/share/gcue2tracks
	cp --remove-destination decoder.py debian/gcue2tracks/usr/share/gcue2tracks
	cp --remove-destination gCue2tracks.png debian/gcue2tracks/usr/share/gcue2tracks
	mkdir -p debian/gcue2tracks/usr/share/locale/ru/LC_MESSAGES
	mkdir -p debian/gcue2tracks/usr/share/locale/es/LC_MESSAGES
	#cp --remove-destination po/gCue2tracks.mo debian/gcue2tracks/usr/share/locale/ru/LC_MESSAGES

	msgfmt po/es.po -o debian/gcue2tracks/usr/share/locale/es/LC_MESSAGES/gCue2tracks.mo
	msgfmt po/ru.po -o debian/gcue2tracks/usr/share/locale/ru/LC_MESSAGES/gCue2tracks.mo

	mkdir -p debian/gcue2tracks/usr/share/menu
	cp --remove-destination menu/gCue2tracks debian/gcue2tracks/usr/share/menu
	mkdir -p debian/gcue2tracks/usr/share/pixmaps
	cp --remove-destination gCue2tracks.png debian/gcue2tracks/usr/share/pixmaps

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


