> 2) 'make install' should respect $PREFIX and / or $DESTDIR if set,
>    DESTDIR being the conventional one RPM will set when doing mock
>    builds / installs for various purposes during the RPM packaging
>    process.
> 
> Would you please consider these two patches and let me know if they
> are acceptable or if I can improve them to make them so?  The patches
> were created by 'svn diff' against SVN trunk (checked out a few
> minutes ago).


Index: Makefile
===================================================================
--- Makefile    (revision 77)
+++ Makefile    (working copy)
@@ -29,14 +29,28 @@
 DBUS_INCLUDE=
 endif
 
+ifndef PREFIX
 PREFIX = /usr/local
+endif
+
+ifndef DESTDIR
 SCANBD_DIR = $(PREFIX)/etc/scanbd
+else
+PREFIX = $(DESTDIR)/usr
+SCANBD_DIR = $(DESTDIR)/etc/scanbd
+endif
+
 BIN_DIR = $(PREFIX)/bin
+
 ifeq ($(OSTYPE),FreeBSD)
 DBUS_PREFIX = /usr/local
 else
+ifndef DESTDIR
 DBUS_PREFIX = 
+else
+DBUS_PREFIX = $(DESTDIR)
 endif
+endif
 
 ifeq ($(OSTYPE),Linux)
 USE_LIBUDEV=yes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: 
<http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20120302/b127e1a8/attachment.pgp>

Reply via email to