aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bzip2/Makefile
diff options
context:
space:
mode:
authorTony Butler <spudz76@gmail.com>2022-11-30 06:19:37 -0800
committerChristian Marangi <ansuelsmth@gmail.com>2023-04-18 15:25:21 +0200
commit36150ff6ffb252ccd4147ffb140d682f58fc19e8 (patch)
treea3e0c88f97681ca770a1fca806b78f16e1362c96 /tools/bzip2/Makefile
parentb691362d1dbe2c07e83c3e703f093dfd8e14145c (diff)
downloadupstream-36150ff6ffb252ccd4147ffb140d682f58fc19e8.tar.gz
upstream-36150ff6ffb252ccd4147ffb140d682f58fc19e8.tar.bz2
upstream-36150ff6ffb252ccd4147ffb140d682f58fc19e8.zip
tools/bzip2: add `bzip2` binaries
`bzip2` is the standard executable for bzip2 compression this includes development includes and both static and shared libs (libbz2) which can be used by other packages the initramfs generator offers the BZIP2 option but there was no executable to support it, and worked only via side effect of having a system-installed version of bzip2, which could be less predictable Signed-off-by: Tony Butler <spudz76@gmail.com> [ remove unintended change ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'tools/bzip2/Makefile')
-rw-r--r--tools/bzip2/Makefile52
1 files changed, 52 insertions, 0 deletions
diff --git a/tools/bzip2/Makefile b/tools/bzip2/Makefile
new file mode 100644
index 0000000000..0c5a92849a
--- /dev/null
+++ b/tools/bzip2/Makefile
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2022 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bzip2
+PKG_VERSION:=1.0.8
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://sourceware.org/pub/bzip2
+PKG_HASH:=ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269
+
+PKG_LICENSE:=bzip2-1.0.8
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:bzip:bzip2
+
+HOST_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+
+HOSTCC := $(HOSTCC_NOCACHE)
+HOST_CFLAGS += $(HOST_FPIC)
+
+HOST_MAKE_FLAGS+= \
+ CFLAGS="$(HOST_CFLAGS)" \
+ LDFLAGS="$(HOST_LDFLAGS)" \
+ ENABLE_BIN_SHARED=1 \
+ ENABLE_BIN_STATIC=0 \
+ ENABLE_LIB_SHARED=1 \
+ ENABLE_LIB_STATIC=1 \
+ ENABLE_DEV=1 \
+ ENABLE_DOCS=1 \
+ ENABLE_TESTS=0 \
+ PREFIX="$(HOST_BUILD_PREFIX)"
+
+define Host/Configure
+endef
+
+define Host/Uninstall
+ $(call Host/Compile/Default,uninstall)
+ $(call Host/Compile/Default,clean)
+endef
+
+define Host/Clean
+endef
+
+$(eval $(call HostBuild))