# -*- makefile -*-

all: installed.grammar-kit

VERSION = 4.3.1
FILENAME = grammar-kit-v$(VERSION).tar.gz
TARBALL = build/$(FILENAME)
TARBALL_URL = "https://github.com/jsk-ros-pkg/archives/raw/master/$(FILENAME)"
TARBALL_PATCH =
SOURCE_DIR = build/grammar-kit-$(VERSION)
UNPACK_CMD = tar xf
MD5SUM_DIR = $(CURDIR)/md5sum
MD5SUM_FILE = $(MD5SUM_DIR)/$(FILENAME).md5sum
include $(shell rospack find mk)/download_unpack_build.mk

INSTALL_DIR = `rospack find julius`

installed.grammar-kit: $(SOURCE_DIR)/unpacked
	rsync -a $(SOURCE_DIR)/model $(INSTALL_DIR)
	rsync -a $(SOURCE_DIR)/SampleGrammars $(INSTALL_DIR)
	rsync -a $(SOURCE_DIR)/SampleGrammars_en $(INSTALL_DIR)
	rsync -a $(SOURCE_DIR)/*conf $(INSTALL_DIR)/conf
	touch installed.grammar-kit

clean:
	rm -rf $(TARBALL)
	rm -rf $(SOURCE_DIR)
	rm -rf $(INSTALL_DIR)/SampleGrammars
	rm -rf $(INSTALL_DIR)/SampleGrammars_en
	rm -rf $(INSTALL_DIR)/model
	rm -rf $(INSTALL_DIR)/conf
	rm -rf installed.grammar-kit
