--- unix/Makefile.orig	Sun Jan 18 23:41:18 2009
+++ unix/Makefile	Tue Dec  3 21:58:13 2013
@@ -42,8 +42,8 @@
 # such as -DDOSWILD).
 
 # UnZip flags
-CC = cc#	try using "gcc" target rather than changing this (CC and LD
-LD = $(CC)#	must match, else "unresolved symbol:  ___main" is possible)
+#CC = cc#	try using "gcc" target rather than changing this (CC and LD
+#LD = $(CC)#	must match, else "unresolved symbol:  ___main" is possible)
 AS = as
 LOC = $(D_USE_BZ2) $(LOCAL_UNZIP)
 AF = $(LOC)
@@ -64,8 +64,8 @@ FL2 = $(LF2)
 
 # general-purpose stuff
 #CP = cp
-CP = ln
-LN = ln
+CP = ln -s
+LN = ln -sf
 RM = rm -f
 CHMOD = chmod
 BINPERMS = 755
@@ -448,19 +448,17 @@ svr4package:	unzips
 	@echo " "
 
 install:	$(MANS)
-	-$(INSTALL_D) $(BINDIR)
-	$(INSTALL_PROGRAM) $(UNZIPS) $(BINDIR)
-	$(INSTALL) unix/zipgrep $(BINDIR)
+	-$(BSD_INSTALL_PROGRAM_DIR) $(BINDIR)
+	$(BSD_INSTALL_PROGRAM) $(UNZIPS) $(BINDIR)
+	$(BSD_INSTALL_SCRIPT) unix/zipgrep $(BINDIR)
 	$(RM) $(BINDIR)/zipinfo$E
-	$(LN) $(BINDIR)/unzip$E $(BINDIR)/zipinfo$E
-	-$(INSTALL_D) $(MANDIR)
-	$(INSTALL) man/funzip.1 $(MANDIR)/funzip.$(manext)
-	$(INSTALL) man/unzip.1 $(MANDIR)/unzip.$(manext)
-	$(INSTALL) man/unzipsfx.1 $(MANDIR)/unzipsfx.$(manext)
-	$(INSTALL) man/zipgrep.1 $(MANDIR)/zipgrep.$(manext)
-	$(INSTALL) man/zipinfo.1 $(MANDIR)/zipinfo.$(manext)
-	$(CHMOD) $(BINPERMS) $(INSTALLEDBIN)
-	$(CHMOD) $(MANPERMS) $(INSTALLEDMAN)
+	$(LN) $(TRUEPREFIX)/bin/unzip$E $(BINDIR)/zipinfo$E
+	-$(BSD_INSTALL_MAN_DIR) $(MANDIR)
+	$(BSD_INSTALL_MAN) man/funzip.1 $(MANDIR)/funzip.$(manext)
+	$(BSD_INSTALL_MAN) man/unzip.1 $(MANDIR)/unzip.$(manext)
+	$(BSD_INSTALL_MAN) man/unzipsfx.1 $(MANDIR)/unzipsfx.$(manext)
+	$(BSD_INSTALL_MAN) man/zipgrep.1 $(MANDIR)/zipgrep.$(manext)
+	$(BSD_INSTALL_MAN) man/zipinfo.1 $(MANDIR)/zipinfo.$(manext)
 
 uninstall:
 	$(RM) $(INSTALLEDBIN) $(INSTALLEDMAN)
@@ -597,8 +595,6 @@ generic_shlib:	unix_make
 	$(MAKE) objsdll CC=gcc CFLAGS="-O3 -Wall -fPIC -DDLL"
 	gcc -shared -Wl,-soname,libunzip.so.0 -o libunzip.so.0.4 $(OBJSDLL)
 	$(RM) libunzip.so.0 libunzip.so
-	$(LN) -s libunzip.so.0.4 libunzip.so.0
-	$(LN) -s libunzip.so.0 libunzip.so
 	gcc -c -O unzipstb.c
 	gcc -o unzip_shlib unzipstb.o -L. -lunzip
 
