--- Makefile.in.orig	2019-09-30 14:39:22 UTC
+++ Makefile.in
@@ -573,7 +573,7 @@ install: install-shared install-archive libpcap.pc pca
 		    $(DESTDIR)$(includedir)/$$i; done
 	[ -d $(DESTDIR)$(bindir) ] || \
 	    (mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
-	$(INSTALL_PROGRAM) pcap-config $(DESTDIR)$(bindir)/pcap-config
+	$(BSD_INSTALL_SCRIPT) pcap-config $(DESTDIR)$(bindir)/pcap-config
 	[ -d $(DESTDIR)$(libdir)/pkgconfig ] || \
 	    (mkdir -p $(DESTDIR)$(libdir)/pkgconfig; chmod 755 $(DESTDIR)$(libdir)/pkgconfig)
 	$(INSTALL_DATA) libpcap.pc $(DESTDIR)$(libdir)/pkgconfig/libpcap.pc
@@ -581,49 +581,13 @@ install: install-shared install-archive libpcap.pc pca
 		$(INSTALL_DATA) $(srcdir)/$$i \
 		    $(DESTDIR)$(mandir)/man1/$$i; done
 	for i in $(MAN3PCAP_NOEXPAND); do \
+		j=$$(echo $$i | sed -e 's/3pcap/3/') ; \
 		$(INSTALL_DATA) $(srcdir)/$$i \
-		    $(DESTDIR)$(mandir)/man3/$$i; done
+		    $(DESTDIR)$(mandir)/man3/$$j; done
 	for i in $(MAN3PCAP_EXPAND:.in=); do \
+		j=$$(echo $$i | sed -e 's/3pcap/3/') ; \
 		$(INSTALL_DATA) $$i \
-		    $(DESTDIR)$(mandir)/man3/$$i; done
-	(cd $(DESTDIR)$(mandir)/man3 && \
-	rm -f pcap_datalink_val_to_description.3pcap && \
-	$(LN_S) pcap_datalink_val_to_name.3pcap \
-		 pcap_datalink_val_to_description.3pcap && \
-	rm -f pcap_datalink_val_to_description_or_dlt.3pcap && \
-	$(LN_S) pcap_datalink_val_to_name.3pcap \
-		 pcap_datalink_val_to_description_or_dlt.3pcap && \
-	rm -f pcap_dump_fopen.3pcap && \
-	$(LN_S) pcap_dump_open.3pcap pcap_dump_fopen.3pcap && \
-	rm -f pcap_freealldevs.3pcap && \
-	$(LN_S) pcap_findalldevs.3pcap pcap_freealldevs.3pcap && \
-	rm -f pcap_perror.3pcap && \
-	$(LN_S) pcap_geterr.3pcap pcap_perror.3pcap && \
-	rm -f pcap_sendpacket.3pcap && \
-	$(LN_S) pcap_inject.3pcap pcap_sendpacket.3pcap && \
-	rm -f pcap_free_datalinks.3pcap && \
-	$(LN_S) pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap && \
-	rm -f pcap_free_tstamp_types.3pcap && \
-	$(LN_S) pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap && \
-	rm -f pcap_dispatch.3pcap && \
-	$(LN_S) pcap_loop.3pcap pcap_dispatch.3pcap && \
-	rm -f pcap_minor_version.3pcap && \
-	$(LN_S) pcap_major_version.3pcap pcap_minor_version.3pcap && \
-	rm -f pcap_next.3pcap && \
-	$(LN_S) pcap_next_ex.3pcap pcap_next.3pcap && \
-	rm -f pcap_open_dead_with_tstamp_precision.3pcap && \
-	$(LN_S) pcap_open_dead.3pcap \
-		 pcap_open_dead_with_tstamp_precision.3pcap && \
-	rm -f pcap_open_offline_with_tstamp_precision.3pcap && \
-	$(LN_S) pcap_open_offline.3pcap pcap_open_offline_with_tstamp_precision.3pcap && \
-	rm -f pcap_fopen_offline.3pcap && \
-	$(LN_S) pcap_open_offline.3pcap pcap_fopen_offline.3pcap && \
-	rm -f pcap_fopen_offline_with_tstamp_precision.3pcap && \
-	$(LN_S) pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap && \
-	rm -f pcap_tstamp_type_val_to_description.3pcap && \
-	$(LN_S) pcap_tstamp_type_val_to_name.3pcap pcap_tstamp_type_val_to_description.3pcap && \
-	rm -f pcap_getnonblock.3pcap && \
-	$(LN_S) pcap_setnonblock.3pcap pcap_getnonblock.3pcap)
+		    $(DESTDIR)$(mandir)/man3/$$j; done
 	for i in $(MANFILE); do \
 		$(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \
 		    $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
