#!/usr/bin/make -f

DEB_TAR_SRCDIR=.
THES_BASE=build-tree/

include /usr/share/cdbs/1/rules/tarball.mk
include /usr/share/cdbs/1/rules/debhelper.mk
#include /usr/share/cdbs/1/rules/simple-patchsys.mk

# Set env var for unzip to silently overwrite files
UNZIP=-n

export UNZIP

build/openoffice.org-thesaurus-it::
	cd $(THES_BASE)/thescoder-0.5 && gcc -o thescoder main.c wordtree.c
	$(THES_BASE)/thescoder-0.5/thescoder $(THES_BASE)/thesaurus.txt $(THES_BASE)/th_it_IT

install/openoffice.org-thesaurus-it::
	install -o root -g root -m 644 $(THES_BASE)/th_it_IT.dat debian/$(cdbs_curpkg)/usr/share/myspell/dicts
	install -o root -g root -m 644 $(THES_BASE)/th_it_IT.idx debian/$(cdbs_curpkg)/usr/share/myspell/dicts
	install -o root -g root -m 644 debian/dictinfo debian/$(cdbs_curpkg)/usr/share/myspell/infos/ooo/openoffice.org-thesaurus-it
