$NetBSD: patch-src_bytes_Makefile,v 1.1 2021/03/18 08:30:43 jaapb Exp $

Install into DESTDIR, use BSD install commands

--- src/bytes/Makefile.orig	2021-03-16 11:43:01.000000000 +0000
+++ src/bytes/Makefile
@@ -19,9 +19,9 @@ opt:
 	$(OCAMLBUILD) $$files
 
 install: all
-	mkdir -p "$(prefix)$(OCAML_SITELIB)/bytes"
-	cd _build/ && cp ../META $(BYTE_FILES) "$(prefix)$(OCAML_SITELIB)/bytes"
-	cd _build/ && for f in $(NATIVE_FILES) $(NATIVE_FILES_DYNLINK); do if [ -f "$$f" ]; then cp $$f "$(prefix)$(OCAML_SITELIB)/bytes"; fi; done
+	$(BSD_INSTALL_LIB_DIR) -p "$(DESTDIR)$(prefix)$(OCAML_SITELIB)/bytes"
+	cd _build/ && $(BSD_INSTALL_DATA) ../META $(BYTE_FILES) "$(prefix)$(OCAML_SITELIB)/bytes"
+	cd _build/ && for f in $(NATIVE_FILES) $(NATIVE_FILES_DYNLINK); do if [ -f "$$f" ]; then $(BSD_INSTALL_LIB) $$f "$(DESTDIR)$(prefix)$(OCAML_SITELIB)/bytes"; fi; done
 
 uninstall: 
 	rm -rf "$(prefix)$(OCAML_SITELIB)/bytes"
