summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/zstd/Makefile38
-rw-r--r--package/zstd/patches/patch-lib_Makefile11
-rw-r--r--package/zstd/patches/patch-programs_Makefile11
3 files changed, 60 insertions, 0 deletions
diff --git a/package/zstd/Makefile b/package/zstd/Makefile
new file mode 100644
index 000000000..79ac805b5
--- /dev/null
+++ b/package/zstd/Makefile
@@ -0,0 +1,38 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= zstd
+PKG_VERSION:= 1.5.5
+PKG_RELEASE:= 1
+PKG_HASH:= 98e9c3d949d1b924e28e01eccb7deed865eefebf25c2f21c702e5cd5b63b85e1
+PKG_DESCR:= zstandard compression application
+PKG_SECTION:= app/archive
+PKG_SITES:= https://github.com/facebook/zstd/archive/refs/tags/
+PKG_OPTS:= dev
+
+DISTFILES:= v$(PKG_VERSION).tar.gz
+
+include ${ADK_TOPDIR}/mk/host.mk
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,ZSTD,zstd,${PKG_VERSION}-${PKG_RELEASE}))
+$(eval $(call PKG_template,ZSTD,zstd,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
+
+HOST_CONFIG_STYLE:= manual
+HOST_INSTALL_STYLE:= auto
+CONFIG_STYLE:= manual
+ALL_TARGET:= default
+HOST_ALL_TARGET:= default
+
+zstd-install:
+ $(INSTALL_DIR) $(IDIR_ZSTD)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/libzstd*.so* \
+ $(IDIR_ZSTD)/usr/lib
+ $(INSTALL_DIR) $(IDIR_ZSTD)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/zstd \
+ $(IDIR_ZSTD)/usr/bin
+
+include ${ADK_TOPDIR}/mk/host-bottom.mk
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/zstd/patches/patch-lib_Makefile b/package/zstd/patches/patch-lib_Makefile
new file mode 100644
index 000000000..22128cbda
--- /dev/null
+++ b/package/zstd/patches/patch-lib_Makefile
@@ -0,0 +1,11 @@
+--- zstd-1.5.5.orig/lib/Makefile 2023-04-04 22:13:52.000000000 +0200
++++ zstd-1.5.5/lib/Makefile 2024-01-17 18:12:48.257111944 +0100
+@@ -259,7 +259,7 @@ DESTDIR ?=
+ # directory variables : GNU conventions prefer lowercase
+ # see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html
+ # support both lower and uppercase (BSD), use uppercase in script
+-prefix ?= /usr/local
++prefix ?= /usr
+ PREFIX ?= $(prefix)
+ exec_prefix ?= $(PREFIX)
+ EXEC_PREFIX ?= $(exec_prefix)
diff --git a/package/zstd/patches/patch-programs_Makefile b/package/zstd/patches/patch-programs_Makefile
new file mode 100644
index 000000000..b8f880ca0
--- /dev/null
+++ b/package/zstd/patches/patch-programs_Makefile
@@ -0,0 +1,11 @@
+--- zstd-1.5.5.orig/programs/Makefile 2023-04-04 22:13:52.000000000 +0200
++++ zstd-1.5.5/programs/Makefile 2024-01-17 18:13:11.620566871 +0100
+@@ -380,7 +380,7 @@ DESTDIR ?=
+ # directory variables : GNU conventions prefer lowercase
+ # see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html
+ # support both lower and uppercase (BSD), use uppercase in script
+-prefix ?= /usr/local
++prefix ?= /usr
+ PREFIX ?= $(prefix)
+ exec_prefix ?= $(PREFIX)
+ bindir ?= $(exec_prefix)/bin