#!/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
export DH_OPTIONS=-v
export PYBUILD_NAME=nevow
export PYBUILD_DISABLE_python3=test

%:
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_build:
	make -C doc/ html
	make -C doc/ man
	dh_auto_build

override_dh_auto_install:
	dh_auto_install
	rm -rf debian/python3-nevow/usr/doc/
	chmod -x debian/python3-nevow/usr/lib/python*/dist-packages/nevow/Canvas.fla
	chmod -x debian/python3-nevow/usr/lib/python*/dist-packages/nevow/canvas.as

override_dh_builddeb:

	# Make package compatible with older version

	dh_builddeb -- -Zgzip -Srle
