#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
#

include /usr/share/cdbs/1/rules/debhelper.mk

# work around #262408
DEB_DH_INSTALL_SOURCEDIR := $(DEB_DESTDIR)

BINDIR = $(DEB_DESTDIR)/usr/bin
SYSBINDIR = $(DEB_DESTDIR)/bin
LIBDIR = $(DEB_DESTDIR)/lib

PKGLIBDIR = $(LIBDIR)/elho

common-install-indep::
	mkdir -p $(DEB_DESTDIR)
	install --directory $(BINDIR)
	install --directory $(SYSBINDIR)

	install --mode=755 catsignature $(BINDIR)
	install --mode=755 iconvdiff $(BINDIR)
	install --mode=755 ipofif $(SYSBINDIR)
	install --mode=755 kernelhz $(SYSBINDIR)
	install --mode=755 urlescape $(BINDIR)
	install --mode=755 waitreachable $(SYSBINDIR)

	install --directory $(PKGLIBDIR)
	install --mode=644 shell-tools $(PKGLIBDIR)

binary-post-install/elho-tools::
	ln -s urlescape $(BINDIR)/urldecode
	ln -s urlescape $(BINDIR)/urlencode
