Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > 5e85cf87519dbb60a84b13a57c720e95 > files > 7

opencryptoki-2.4.2-4.mga5.src.rpm

diff --git a/usr/Makefile.am b/usr/Makefile.am
index bced120..20352d5 100644
--- a/usr/Makefile.am
+++ b/usr/Makefile.am
@@ -5,6 +5,6 @@ endif
 SUBDIRS = lib $(DAEMONDIRS)
 
 install-data-hook:
-	$(MKDIR_P) $(lockdir)
-	$(CHGRP) pkcs11 $(lockdir)
-	$(CHMOD) 0770 $(lockdir)
+	$(MKDIR_P) $(DESTDIR)$(lockdir)
+	$(CHGRP) pkcs11 $(DESTDIR)$(lockdir)
+	$(CHMOD) 0770 $(DESTDIR)$(lockdir)
diff --git a/usr/Makefile.am b/usr/Makefile.am
index 20352d5..5d42b0f 100644
--- a/usr/Makefile.am
+++ b/usr/Makefile.am
@@ -6,5 +6,9 @@ SUBDIRS = lib $(DAEMONDIRS)
 
 install-data-hook:
 	$(MKDIR_P) $(DESTDIR)$(lockdir)
-	$(CHGRP) pkcs11 $(DESTDIR)$(lockdir)
-	$(CHMOD) 0770 $(DESTDIR)$(lockdir)
+	if test `id` = 0; then \
+	    $(CHGRP) pkcs11 $(DESTDIR)$(lockdir); \
+	    $(CHMOD) 0770 $(DESTDIR)$(lockdir); \
+	else \
+	    echo "Not running as root, you must set the correct group and mode manually!"; \
+	fi