--- LVM2.2.02.168.orig/make.tmpl.in	2016-12-01 00:17:30.000000000 +0100
+++ LVM2.2.02.168/make.tmpl.in	2017-03-27 20:32:53.000000000 +0200
@@ -437,7 +437,8 @@ $(LIB_SHARED): $(LIB_SHARED).$(LIB_VERSI
 CLEAN_TARGETS += $(LDDEPS) .exported_symbols_generated
 
 install_lib_shared: $(LIB_SHARED)
-	$(INSTALL_PROGRAM) -D $< $(libdir)/$(<F).$(LIB_VERSION)
+	$(INSTALL_DIR) $(libdir)
+	$(INSTALL_PROGRAM) $< $(libdir)/$(<F).$(LIB_VERSION)
 	$(INSTALL_DIR) $(usrlibdir)
 	$(LN_S) -f $(USRLIB_RELPATH)$(<F).$(LIB_VERSION) $(usrlibdir)/$(<F)
 
@@ -445,11 +446,13 @@ install_lib_shared: $(LIB_SHARED)
 #        and for compatibility links in libdir are created
 #        when the code is fixed links could be removed.
 install_dm_plugin: $(LIB_SHARED)
-	$(INSTALL_PROGRAM) -D $< $(libdir)/device-mapper/$(<F)
+	$(INSTALL_DIR) $(libdir)
+	$(INSTALL_PROGRAM) $< $(libdir)/device-mapper/$(<F)
 	$(LN_S) -f device-mapper/$(<F) $(libdir)/$(<F)
 
 install_lvm2_plugin: $(LIB_SHARED)
-	$(INSTALL_PROGRAM) -D $< $(libdir)/lvm2/$(<F)
+	$(INSTALL_DIR) $(libdir)
+	$(INSTALL_PROGRAM) $< $(libdir)/lvm2/$(<F)
 	$(LN_S) -f lvm2/$(<F) $(libdir)/$(<F)
 	$(LN_S) -f $(<F) $(libdir)/$(<F).$(LIB_VERSION)
 endif
