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

# Provide DEB_HOST_* and DEB_BUILD_* variables
include /usr/share/dpkg/architecture.mk

%:
	dh $@ 

override_dh_auto_install:
	dh_auto_install
	# Move the library
	install -d debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
	mv debian/tmp/usr/lib/libgrok.so debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libgrok.so.1

override_dh_install:
	dh_install
	chmod 644 debian/grok/usr/share/grok/patterns/base

override_dh_installchangelogs:
	dh_installchangelogs -- CHANGELIST

override_dh_installexamples:
	dh_installexamples
	sed -i s,patterns/base,/usr/share/grok/patterns/base, debian/grok/usr/share/doc/grok/examples/*.grok

override_dh_strip:
	dh_strip --dbg-package=grok-dbg
