--- exifprobe-2.0.1.orig/Makefile
+++ exifprobe-2.0.1/Makefile
@@ -22,9 +22,10 @@
 #CFLAGS += -DNATIVE_BYTEORDER_BIGENDIAN     # or add to ./byteorder.h
 
 # On Solaris, you may need to use 'gmake', or edit the next line.
-PREFIX ?= /usr/local
-BINDIR=$(PREFIX)/bin
-MANDIR=$(PREFIX)/man/man1
+INSTALL = install -d -m 644
+PREFIX ?= $(DESTDIR)/usr
+BINDIR=$(PREFIX)/bin/local
+MANDIR=$(PREFIX)/share/man/man1
 
 
 INCLUDES=defs.h extern.h misc.h tifftags.h exiftags.h \
@@ -71,10 +72,13 @@
 	$(CC) -o exifprobe $(CFLAGS) $(OBJS) comptime.c -lm
 
 install: all
-	cp exifprobe $(BINDIR)
-	cp exifgrep $(BINDIR)
-	cp exifprobe.1 $(MANDIR)
-	cp exifgrep.1 $(MANDIR)
+	install -d $(PREFIX)/bin
+	install -d $(PREFIX)/share/man/man1
+	install -c -m 755 exifprobe $(PREFIX)/bin
+	install -c -m 755 exifgrep $(PREFIX)/bin
+	install -c -m 644  exifprobe.1 $(PREFIX)/share/man/man1
+	install -c -m 644  exifgrep.1 $(PREFIX)/share/man/man1
+	
 
 # if you want HTML man pages, pick a target; I prefer man2html
 rman: exifprobe.1 exifgrep.1
