aboutsummaryrefslogtreecommitdiff
path: root/utils/xxhash/Makefile
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2023-02-17 12:02:58 +0800
committerJeffery To <jeffery.to@gmail.com>2023-04-24 16:18:13 +0800
commit2f4b161e2828a645ac1bfc2a77e9506fe3c8772d (patch)
treefcb81259e18e24c1f5895ce55cfbd910cdc69b7b /utils/xxhash/Makefile
parentfbbe30622a9c066c26c3debe3742ca92a7a48feb (diff)
xxhash: Fix pkg-config metadata file
Currently, Build/InstallDev installs libxxhash.pc.in, which is the template for libxxhash.pc and does not contain the correct information. (pkg-config also does not recognize this file name.) This uses PKG_INSTALL:=1 so that libxxhash.pc is generated (by 'make install'). This also removes the need to override Build/Prepare by setting the correct command in PKG_UNPACK. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'utils/xxhash/Makefile')
-rw-r--r--utils/xxhash/Makefile22
1 files changed, 11 insertions, 11 deletions
diff --git a/utils/xxhash/Makefile b/utils/xxhash/Makefile
index 04924b750..ff29be1de 100644
--- a/utils/xxhash/Makefile
+++ b/utils/xxhash/Makefile
@@ -12,7 +12,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=xxhash
PKG_VERSION:=0.8.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/Cyan4973/xxHash/archive/v$(PKG_VERSION)
@@ -24,8 +24,12 @@ PKG_LICENSE:=BSD-2-Clause,GPL-2.0-or-later
PKG_LICENSE_FILES:=LICENSE,cli/COPYING
PKG_MAINTAINER:=Julien Malik <julien.malik@paraiso.me>
+PKG_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
+PKG_UNPACK:=$(HOST_TAR) -C "$(PKG_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)"
+
define Package/xxhash/Default
TITLE:=Extremely fast hash algorithm
URL:=https://cyan4973.github.io/xxHash/
@@ -64,29 +68,25 @@ define Package/xxhash/description
This package contains the executables.
endef
-define Build/Prepare
- rm -rf $(PKG_BUILD_DIR)/
- mkdir -p $(PKG_BUILD_DIR)/
- $(TAR) -xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1
-endef
+MAKE_FLAGS += PREFIX=/usr
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_BUILD_DIR)/libxxhash.so* $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxxhash.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_BUILD_DIR)/libxxhash.pc.in $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxxhash.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libxxhash/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_BUILD_DIR)/libxxhash.so.* $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxxhash.so.* $(1)/usr/lib/
endef
define Package/xxhash/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/xxh*sum $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xxh*sum $(1)/usr/bin/
endef
$(eval $(call BuildPackage,libxxhash))