#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk

# Disable bundlebuilder, use distutils instead.
DEB_PYTHON_SETUP_CMD = setup.py --no-sugar

# Add here any variable or target overrides you need.

#makebuilddir::
#	mkdir $(CURDIR)/debian/turtleart
#	ln -f turtleart.py turtleart
#	chmod +x turtleart

common-install-prehook-impl::
	mkdir locale locale/es locale/es/LC_MESSAGES
	msgfmt po/es.po -o locale/es/LC_MESSAGES/org.laptop.TurtleArtActivity.mo
	$(DEB_DH_PREP) $(call cdbs_add_dashx,$(DEB_CLEAN_EXCLUDE))
	dh_installdirs -A $(DEB_INSTALL_DIRS_ALL)

clean::
	rm -f build
	rm -f turtleart

manpages:
	 help2man -N --version-string==$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p') --source='Sugar Labs' --include='./debian/help2man.include' --name='a LOGO-like tool for teaching programming' ./turtleart.py > ./debian/turtleart.1
