#! /usr/bin/make -f
# debian/rules for Flight of the Amazon Queen using debhelper.
# Copyright © 2004, 2006, 2008 David Weinehall <tao@debian.org>

LINGUAS = sv

package = flight-of-the-amazon-queen

podir = $(CURDIR)/debian/po
localedir = /usr/share/locale

$(podir)/templates.pot:
	xgettext --language=Shell --copyright-holder="" --output=$(podir)/templates.pot $(CURDIR)/debian/queen

$(podir)/$(LINGUAS).mo: %.mo: %.po
	msgfmt -c -v --statistics -o $@ $<

.PHONY: build-stamp
build-stamp: $(podir)/templates.pot $(podir)/$(LINGUAS).mo
	touch build-stamp

.PHONY: build
build: build-stamp

.PHONY: clean
clean:
	dh_testdir
	dh_testroot
	dh_clean $(podir)/*.mo

.PHONY: langinstall
langinstall:
	dh_testdir
	dh_testroot
	for lang in $(LINGUAS); do					\
		dir=$(localedir)/$$lang/LC_MESSAGES/;			\
		dh_installdirs $$dir;					\
		cp $(podir)/$$lang.mo $(CURDIR)/debian/$(package)$$dir/queen.mo;	\
	done

.PHONY: binary
binary: binary-indep

.PHONY: binary-indep
binary-indep: langinstall
	dh_testdir
	dh_testroot
	dh_installdirs $(overridedir)
	dh_install
	dh_installdocs
	dh_installchangelogs
	dh_installman
	dh_installmenu
	dh_lintian
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

.PHONY: binary-arch
binary-arch:
