Index: libpam-google-authenticator-1.0/Makefile
===================================================================
--- libpam-google-authenticator-1.0.orig/Makefile	2012-05-15 07:02:36.000000000 +0530
+++ libpam-google-authenticator-1.0/Makefile	2016-03-18 16:00:06.284743897 +0530
@@ -43,26 +43,19 @@
 	    *.c *.h *.html Makefile FILEFORMAT README utc-time
 
 install: all
-	@dst="`find /lib*/security /lib*/*/security -maxdepth 1               \
-	            -name pam_unix.so -printf '%H' -quit 2>/dev/null`";       \
-	[ -d "$${dst}" ] || dst=/lib/security;                                \
-	[ -d "$${dst}" ] || dst=/usr/lib;                                     \
-	sudo=; if [ $$(id -u) -ne 0 ]; then                                   \
-	  echo "You need to be root to install this module.";                 \
-	  if [ -x /usr/bin/sudo ]; then                                       \
-	    echo "Invoking sudo:";                                            \
-	    sudo=sudo;                                                        \
-	  else                                                                \
-	    exit 1;                                                           \
-	  fi;                                                                 \
-	fi;                                                                   \
+	mkdir -p ${DESTDIR}/usr/lib/security 				      \
+	mkdir -p ${DESTDIR}/usr/sbin           				      \
+	@dst="${DESTDIR}/usr/lib/security";      			      \
+	[ -d "$${dst}" ] || dst=${DESTDIR}/lib/security;                      \
+	[ -d "$${dst}" ] || dst=${DESTDIR}/usr/lib/security;                  \
+	                                                                      \
 	echo cp pam_google_authenticator.so $${dst};                          \
-	tar fc - pam_google_authenticator.so | $${sudo} tar ofxC - $${dst};   \
+	tar fc - pam_google_authenticator.so | tar ofxC - $${dst};            \
 	                                                                      \
-	echo cp google-authenticator /usr/local/bin;                          \
-	tar fc - google-authenticator | $${sudo} tar ofxC - /usr/local/bin;   \
-	$${sudo} chmod 755 $${dst}/pam_google_authenticator.so                \
-	                   /usr/local/bin/google-authenticator
+	echo cp google-authenticator ${DESTDIR}/usr/sbin	;             \
+	tar fc - google-authenticator | tar ofxC - ${DESTDIR}/usr/sbin;       \
+		chmod 755 $${dst}/pam_google_authenticator.so                 \
+	                   ${DESTDIR}/usr/sbin/google-authenticator
 
 clean:
 	$(RM) *.o *.so core google-authenticator demo                         \
