[sane-devel] [PATCH] scanbd: Makefile-001 ensure target dirs exist

Martin Dengler martin at martindengler.com
Fri Mar 2 16:31:08 UTC 2012


Hi,

I am packaging scanbd for Fedora (someone stop me if it's done) and I
came across two things I would like to add to the Makefile:

1) 'make install' should not assume all its target dirs exist (it
   doesn't for two of the three dirs it targets but it assumes
   /etc/dbus-1/system.d exists)

and

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).

The first patch follows and the second will be set as a reply (with
changed subject) to this mail.

Thanks,
Martin

Index: Makefile
===================================================================
--- Makefile	(revision 77)
+++ Makefile	(working copy)
@@ -160,11 +174,12 @@
 	cp scanadf.script $(SCANBD_DIR)
 	cp test.script $(SCANBD_DIR)
 	echo "Copy scanbd to $(BIN_DIR)"
+	mkdir -p "$(BIN_DIR)"
 	cp scanbd $(BIN_DIR)
 	echo "Copy scanbuttond backends to $(SCANBD_DIR)/scanbuttond/backends"
 	mkdir -p "$(SCANBD_DIR)/scanbuttond/backends"
-	-cp scanbuttond/backends/*.so "$(SCANBD_DIR)/scanbuttond/backends"
+	-cp scanbuttond/backends/*.so "$(SCANBD_DIR)/scanbuttond/backends" || /bin/true
 	echo "Copy scanbd_dbus.conf to /etc/dbus-1/system.d/"	
 	cp scanbd_dbus.conf "$(DBUS_PREFIX)/etc/dbus-1/system.d"
-	-cp scanbuttond/backends/meta.conf "$(SCANBD_DIR)/scanbuttond/backends"
+	-cp scanbuttond/backends/meta.conf "$(SCANBD_DIR)/scanbuttond/backends" || /bin/true
 	echo "Edit /etc/inetd.conf"
-------------- 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/2096b74f/attachment.pgp>


More information about the sane-devel mailing list