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

#	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/appgeo_deneb.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/appgeo_deneb.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/appgeo_jupiter.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/appgeo_jupiter.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/appgeo_moon.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/appgeo_moon.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/appgeo_sun.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/appgeo_sun.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/apptopo_deneb.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/apptopo_deneb.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/apptopo_moon.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/apptopo_moon.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/apptopo_sun.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/apptopo_sun.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/astrom_antares.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/astrom_antares.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/astrom_mercury.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/astrom_mercury.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/astrom_neptune.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/astrom_neptune.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/moon_phases.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/moon_phases.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/riset_moon.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/riset_moon.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/riset_sun.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/riset_sun.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/risettran_moon.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/risettran_moon.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/usno/risettran_rigel.txt" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/usno/risettran_rigel.txt"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/__init__.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/__init__.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/__init__.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/__init__.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/__init__.pyo" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/__init__.pyo"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/_libastro.so" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/_libastro.so"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/cities.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/cities.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/cities.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/cities.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/stars.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/stars.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/stars.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/stars.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/doc/CHANGELOG.rst" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/CHANGELOG.rst"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/doc/angle.rst" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/angle.rst"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/doc/catalogs.rst" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/catalogs.rst"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/doc/coordinates.rst" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/coordinates.rst"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/doc/date.rst" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/date.rst"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/doc/examples.rst" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/examples.rst"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/doc/faq.rst" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/faq.rst"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/doc/index.rst" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/index.rst"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/doc/newton.rst" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/newton.rst"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/doc/quick.rst" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/quick.rst"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/doc/radec.rst" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/radec.rst"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/doc/tutorial.rst" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/doc/tutorial.rst"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/__init__.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/__init__.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/__init__.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/__init__.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/ephem_test.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/ephem_test.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/ephem_test.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/ephem_test.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/launchpad_236872.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/launchpad_236872.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/launchpad_236872.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/launchpad_236872.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/launchpad_244811.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/launchpad_244811.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/launchpad_244811.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/launchpad_244811.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_angles.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_angles.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_angles.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_angles.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_bodies.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_bodies.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_bodies.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_bodies.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_constants.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_constants.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_constants.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_constants.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_dates.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_dates.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_dates.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_dates.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_jpl.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_jpl.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_jpl.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_jpl.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_rst.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_rst.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_rst.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_rst.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_usno.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_usno.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_usno.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_usno.pyc"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_usno_equinoxes.py" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_usno_equinoxes.py"
	mkdir -p "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/"
	cp -a "pyephemsrc/usr/lib/python2.5/site-packages/ephem/tests/test_usno_equinoxes.pyc" "$(CURDIR)/debian/pyephem/usr/lib/python2.5/site-packages/ephem/tests/test_usno_equinoxes.pyc"

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

# 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
