From cc98405e5a7eb1d07e91a63f5e80f47e2c498ebf Mon Sep 17 00:00:00 2001
From: Adam Duskett <adam.duskett@amarulasolutions.com>
Date: Wed, 22 Nov 2023 14:15:28 -0700
Subject: [PATCH] force symlink creation

Force symlink creation to avoid errors when reinstalling.
---
 libutempter/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libutempter/Makefile b/libutempter/Makefile
index 256f1f8..a12fa13 100644
--- a/libutempter/Makefile
+++ b/libutempter/Makefile
@@ -82,12 +82,12 @@ install:
 	$(INSTALL) -p -m2711 $(PROJECT) $(DESTDIR)$(libexecdir)/$(PROJECT)/
 	$(INSTALL) -p -m644 $(PROJECT).h $(DESTDIR)$(includedir)/
 	$(INSTALL) -p -m755 $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SHAREDLIB).$(VERSION)
-	ln -s $(SHAREDLIB).$(VERSION) $(DESTDIR)$(libdir)/$(SONAME)
-	ln -s $(SONAME) $(DESTDIR)$(libdir)/$(SHAREDLIB)
+	ln -sf $(SHAREDLIB).$(VERSION) $(DESTDIR)$(libdir)/$(SONAME)
+	ln -sf $(SONAME) $(DESTDIR)$(libdir)/$(SHAREDLIB)
 	$(INSTALL) -p -m644 $(PROJECT).3 $(DESTDIR)$(man3dir)/
 	for n in lib$(PROJECT) utempter_add_record utempter_remove_record \
 	    utempter_remove_added_record utempter_set_helper; do \
-		ln -s $(PROJECT).3 $(DESTDIR)$(man3dir)/$$n.3; \
+		ln -sf $(PROJECT).3 $(DESTDIR)$(man3dir)/$$n.3; \
 	done
 
 clean:
