Sophie

Sophie

distrib > Mageia > 9 > armv7hl > by-pkgid > d88c6debf1e493258fd2b2cc2e63943e > files > 2

pam-google-authenticator-1.0-10.mga9.src.rpm

--- Makefile.orig	2012-08-20 20:44:51.309418748 +0200
+++ Makefile	2012-08-20 20:51:06.129924025 +0200
@@ -29,6 +29,10 @@
 LDL_LDFLAGS := $(shell $(CC) -shared -ldl -xc -o /dev/null /dev/null          \
                        >/dev/null 2>&1 && echo ' -ldl')
 
+DESTDIR=
+LIBSEC=/lib/security
+BINDIR=/usr/bin
+
 all: google-authenticator pam_google_authenticator.so demo                    \
      pam_google_authenticator_unittest
 
@@ -43,26 +47,8 @@
 	    *.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 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
+	install -D -m0755 pam_google_authenticator.so $(DESTDIR)$(LIBSEC)/pam_google_authentifactor.so ;\
+	install -D -m0755 google-authenticator $(DESTDIR)$(BINDIR)/google-authenticator
 
 clean:
 	$(RM) *.o *.so core google-authenticator demo                         \