#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/ruby-pkg-tools/1/class/ruby-setup-rb.mk

clean::
	# Gems are packaged with a variant of tar which disregards
	# timestamps, leaving us with 1969 timestamps... So, touch all
	# of the files over 10 years old
	find . -mtime +3650 | xargs touch

makebuilddir/libgettext-rails-ruby::
	# Ukrainan language code is mistakenly shipped as ua instead
	# of UK - Bug report at
	# http://rubyforge.org/tracker/index.php?func=detail&aid=28277&group_id=855&atid=3377
	[ -d po/uk ] || mv po/ua po/uk
	[ -d data/locale/uk ] || mv data/locale/ua data/locale/uk

cleanbuilddir/libgettext-rails-ruby::
	# Move the Ukrainan files back, to avoid bloating the diff
	[ -d po/ua ] || mv po/uk po/ua
	[ -d data/locale/ua ] || mv data/locale/uk data/locale/ua
