ripgrep: adapt new rust build standard

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2023-03-19 14:17:58 +08:00 committed by Tianling Shen
parent 094a1b4d14
commit bc4d9429de
1 changed files with 5 additions and 11 deletions

View File

@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ripgrep
PKG_VERSION:=13.0.0
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/BurntSushi/ripgrep/tar.gz/$(PKG_VERSION)?
@ -18,12 +18,10 @@ PKG_LICENSE_FILES:=LICENSE-MIT UNLICENSE
PKG_BUILD_DEPENDS:=rust/host
include ../../lang/rust/rust-package.mk
include $(INCLUDE_DIR)/package.mk
RUST_PKG_FEATURES:=pcre2
define Build/Compile
$(call Build/Compile/Cargo,, --features 'pcre2')
endef
include $(INCLUDE_DIR)/package.mk
include ../../lang/rust/rust-package.mk
define Package/ripgrep
SECTION:=utils
@ -38,9 +36,5 @@ define Package/ripgrep/description
while respecting your gitignore
endef
define Package/ripgrep/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/target/$(RUSTC_TARGET_ARCH)/stripped/rg $(1)/bin/rg
endef
$(eval $(call RustBinPackage,ripgrep))
$(eval $(call BuildPackage,ripgrep))