[OpenWrt-Devel] [PATCH v2 02/12] tools/lvm2: new package

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Nov 21 08:23:12 PST 2019


lvm2 for the host will be needed as a dependency to build cryptsetup
for the host.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
 tools/Makefile      |  1 +
 tools/lvm2/Makefile | 47 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 tools/lvm2/Makefile

diff --git a/tools/Makefile b/tools/Makefile
index 2f57d25525..26e2d19fee 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -78,6 +78,7 @@ $(curdir)/wrt350nv2-builder/compile := $(curdir)/zlib/compile
 $(curdir)/lzma-old/compile := $(curdir)/zlib/compile
 $(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile
 $(curdir)/cbootimage/compile += $(curdir)/automake/compile
+$(curdir)/lvm2/compile := $(curdir)/pkg-config/compile $(curdir)/libaio/compile
 
 ifneq ($(HOST_OS),Linux)
   $(curdir)/squashfskit4/compile += $(curdir)/coreutils/compile
diff --git a/tools/lvm2/Makefile b/tools/lvm2/Makefile
new file mode 100644
index 0000000000..8b37cbaa6c
--- /dev/null
+++ b/tools/lvm2/Makefile
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2010-2015 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:=lvm2
+PKG_VERSION:=2.02.180
+PKG_HASH:=24997e26dfc916151707c9da504d38d0473bec3481a8230b676bc079041bead6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=LVM2.$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2/old
+
+HOST_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_CONFIGURE_ARGS += \
+        --enable-write_install \
+        --enable-pkgconfig \
+        --disable-cmdlib \
+        --disable-dmeventd \
+        --disable-applib \
+        --disable-fsadm \
+        --disable-readline \
+        --disable-selinux
+
+# lvm2 unpacks in the wrong folder
+define Host/Prepare
+	$(call Host/Prepare/Default)
+	mv $(HOST_BUILD_DIR)/../LVM2.$(PKG_VERSION)/* $(HOST_BUILD_DIR)/
+	rmdir $(HOST_BUILD_DIR)/../LVM2.$(PKG_VERSION)
+endef
+
+define Host/Compile
+	$(call Host/Compile/Default,device-mapper)
+endef
+
+define Host/Install
+	$(call Host/Compile/Default,install_device-mapper)
+endef
+
+$(eval $(call HostBuild))
-- 
2.23.0




More information about the openwrt-devel mailing list