summaryrefslogtreecommitdiff
blob: 27924562d82e770cb8f064d02dcb2c0f75992af0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- Makefile	2012-06-06 14:39:56.000000000 -0400
+++ Makefile.new	2012-06-06 14:40:05.000000000 -0400
@@ -28,6 +28,7 @@
 DEF_LDFLAGS := $(shell [ `uname` = SunOS ] && echo ' -mimpure-text') $(LDFLAGS)
 LDL_LDFLAGS := $(shell $(CC) -shared -ldl -xc -o /dev/null /dev/null          \
                        >/dev/null 2>&1 && echo ' -ldl')
+DESTDIR := 
 
 all: google-authenticator pam_google_authenticator.so demo                    \
      pam_google_authenticator_unittest
@@ -43,26 +44,11 @@
 	    *.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;                                                                   \
-	echo cp pam_google_authenticator.so $${dst};                          \
-	tar fc - pam_google_authenticator.so | $${sudo} tar ofxC - $${dst};   \
+	echo install -m 755 pam_google_authenticator.so ${DESTDIR};           \
+	install -m 755 pam_google_authenticator.so ${DESTDIR};                \
 	                                                                      \
-	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 install -m 755 google-authenticator ${DESTDIR};		      \
+	install -m 755 google-authenticator ${DESTDIR};			      \
 
 clean:
 	$(RM) *.o *.so core google-authenticator demo                         \