Description: Makefile support for DESTDIR and ROOT_DESTDIR
Author: Kamal Mostafa <kamal@debian.org>

Allow Makefile's install directory DESTDIR (e.g. "/tmp/build_root/") to be set
independently from ROOT_DESTDIR (e.g. "/usr") which will get embedded in the
executable.

Index: ebook2cw-0.8.3/Makefile
===================================================================
--- ebook2cw-0.8.3.orig/Makefile
+++ ebook2cw-0.8.3/Makefile
@@ -3,13 +3,14 @@
 # $Id$
 
 VERSION=0.8.3
-DESTDIR ?= /usr
+ROOT_DESTDIR?=/usr
+override DESTDIR:=$(DESTDIR)$(ROOT_DESTDIR)
 
 # Set to NO to compile without Lame/Ogg-vorbis support
 USE_LAME?=YES
 USE_OGG?=YES
 
-CFLAGS:=$(CFLAGS) -D DESTDIR=\"$(DESTDIR)\" -D VERSION=\"$(VERSION)\"
+CFLAGS:=$(CFLAGS) -D DESTDIR=\"$(ROOT_DESTDIR)\" -D VERSION=\"$(VERSION)\"
 
 ifeq ($(USE_LAME), YES)
 		CFLAGS:=$(CFLAGS) -D LAME
