unixodbc: use 'install' when copying host binaries

'cp' fails with a text file busy error if it tries to overwrite an
executable file that is running.  'install' unlinks the file first, so
it will not cause the problem.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 47f98d7030)
This commit is contained in:
Eneas U de Queiroz 2021-08-11 11:04:50 -03:00 committed by Rosen Penev
parent 67f403b5e6
commit 865ae46492

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=unixodbc
PKG_VERSION:=2.3.7
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.unixodbc.org
@ -152,7 +152,7 @@ endef
define Host/Install
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
$(CP) $(HOST_BUILD_DIR)/exe/odbc_config $(STAGING_DIR_HOST)/bin
$(INSTALL_BIN) $(HOST_BUILD_DIR)/exe/odbc_config $(STAGING_DIR_HOST)/bin
endef
$(eval $(call BuildPackage,unixodbc))