#!/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

export DH_OPTIONS
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifneq (,$(filter os_version=%,$(DEB_BUILD_OPTIONS)))
	OS_VERSION = $(patsubst os_version=%,%,$(filter os_version=%,$(DEB_BUILD_OPTIONS)))
endif

clean:
	rm -f debian/yandex-webmaster-libhtnorm.install
	rm -f dict.dict
	dh clean

prepare:
	./generate.sh $(OS_VERSION) $(DEB_HOST_ARCH)
	./download-dict.sh

build: prepare
	# Do nothing

build-arch: prepare
	# Do nothing

override_dh_shlibs:
	# Do nothing

override_dh_strip:
	# Do nothing

override_dh_makeshlibs:
	# Do nothing

override_dh_shlibdeps:
	# Do nothing

%:
	dh_testdir
	dh_installdirs
	dh --after dh_auto_install  $@
