#!/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
version=0.9.0a1.3
repackv=1

%:
	dh  $@ --with quilt,autotools_dev
	
override_dh_auto_configure:
	dh_auto_configure -- \
		--libdir=/usr/lib/ \
		--enable-jp_JP \
		--enable-ko_KR \
		--enable-th_TH \
		--enable-vi_VN \
		--enable-zh_CN \
		--enable-zh_HK \
		--enable-zh_TW \
		--enable-zh_TW_hakka \
		--enable-zh_TW_taigi

override_dh_makeshlibs:

get-orig-source:
	rm -rf ../repack
	mkdir ../repack
	uscan --force-download --destdir ../repack --download-current-version
	( \
		cd ../repack ;\
		tar zxf openvanilla-modules-$(version).tar.gz ;\
		cd openvanilla-modules-$(version) ;\
		rm -rf DataTables/dayi3.cin DataTables/tp_hakka_hl.cin DataTables/tp_hakka_sy.cin ;\
		cd .. ;\
		GZIP="--best" tar -czf openvanilla-modules_$(version)+dfsg$(repackv).orig.tar.gz openvanilla-modules-$(version) ;\
		mv openvanilla-modules_$(version)+dfsg$(repackv).orig.tar.gz .. ;\
	)
	rm -rf ../repack

