#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2009-2011 Sergio Talens-Oliag <sto@debian.org>

%:
	dh --with quilt --with python2 $@

# Remove the dh_auto_clean, dh_auto_build and dh_auto_install step
override_dh_auto_clean:
override_dh_auto_build:
override_dh_auto_install:

override_dh_installdirs:
	dh_installdirs
	# Generate .mo files instead of using the pre-generated ones, useful if
	# we add patches later.
	for po in `ls po/childsplay_sp_*.po`; do \
		lang=`echo $$po | sed -e 's%^po/childsplay_sp_%%;s%.po$$%%'`; \
		mkdir -p debian/childsplay/usr/share/locale/$$lang/LC_MESSAGES/; \
		msgfmt $$po -o debian/childsplay/usr/share/locale/$$lang/LC_MESSAGES/childsplay_sp.mo; \
	done

override_dh_link:
	# Remove DejaVu files (the font is replaced by a link)
	rm -f debian/childsplay/usr/share/childsplay_sp/SPData/DejaVu*
	dh_link
