ripgrep: adapt new rust build standard
authorTianling Shen <cnsztl@immortalwrt.org>
Sun, 19 Mar 2023 06:17:58 +0000 (14:17 +0800)
committerTianling Shen <cnsztl@gmail.com>
Thu, 23 Mar 2023 18:08:47 +0000 (02:08 +0800)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
utils/ripgrep/Makefile

index fe449bc2d8bb8f03ffd804044d665f6b9cd61367..56658540f99f2fe6f2eab9add65dd44c39c2003b 100644 (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))