mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] cryptsetup: Add package
@ 2012-05-28 12:42 Bart vdr. Meulen
  2012-05-30 16:37 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Bart vdr. Meulen @ 2012-05-28 12:42 UTC (permalink / raw)
  To: ptxdist

From: "Bart vdr. Meulen" <bartvdrmeulen@gmail.com>

Add cryptsetup package, which can be used to conveniently setup up
dm-crypt managed device-mapper mappings

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 rules/cryptsetup.in     |   12 ++++++++++
 rules/cryptsetup.make   |   61 +++++++++++++++++++++++++++++++++++++++++++++++
 rules/libdevmapper.in   |   10 ++++++++
 rules/libdevmapper.make |   20 ++++++++++++++++
 rules/lvm2.in           |   16 +++++++++++++
 rules/lvm2.make         |   15 +++++++++++-
 6 files changed, 133 insertions(+), 1 deletion(-)
 create mode 100644 rules/cryptsetup.in
 create mode 100644 rules/cryptsetup.make
 create mode 100644 rules/libdevmapper.in
 create mode 100644 rules/libdevmapper.make

diff --git a/rules/cryptsetup.in b/rules/cryptsetup.in
new file mode 100644
index 0000000..4319dbc
--- /dev/null
+++ b/rules/cryptsetup.in
@@ -0,0 +1,12 @@
+## SECTION=shell_and_console
+
+config CRYPTSETUP
+	tristate
+	prompt "cryptsetup"
+	select LIBGCRYPT
+	select LIBUUID
+	select LIBDEVMAPPER
+	select LIBPOPT
+	help
+	  cryptsetup is used to conveniently setup up dm-crypt managed
+	  device-mapper mappings
diff --git a/rules/cryptsetup.make b/rules/cryptsetup.make
new file mode 100644
index 0000000..0be2f51
--- /dev/null
+++ b/rules/cryptsetup.make
@@ -0,0 +1,61 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2011 by Bart vdr. Meulen <bartvdrmeulen@gmail.com>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_CRYPTSETUP) += cryptsetup
+
+#
+# Paths and names
+#
+CRYPTSETUP_VERSION	:= 1.1.3
+CRYPTSETUP		:= cryptsetup-$(CRYPTSETUP_VERSION)
+CRYPTSETUP_SUFFIX	:= tar.bz2
+CRYPTSETUP_URL		:= http://cryptsetup.googlecode.com/files/$(CRYPTSETUP).$(CRYPTSETUP_SUFFIX)
+CRYPTSETUP_SOURCE	:= $(SRCDIR)/$(CRYPTSETUP).$(CRYPTSETUP_SUFFIX)
+CRYPTSETUP_DIR		:= $(BUILDDIR)/$(CRYPTSETUP)
+CRYPTSETUP_LICENSE	:= GPLv2
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+$(CRYPTSETUP_SOURCE):
+	@$(call targetinfo)
+	@$(call get, CRYPTSETUP)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+CRYPTSETUP_CONF_TOOL	:= autoconf
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/cryptsetup.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, cryptsetup)
+	@$(call install_fixup, cryptsetup,PRIORITY,optional)
+	@$(call install_fixup, cryptsetup,SECTION,base)
+	@$(call install_fixup, cryptsetup,AUTHOR,"Bart vdr. Meulen <bartvdrmeulen@gmail.com>")
+	@$(call install_fixup, cryptsetup,DESCRIPTION,missing)
+
+	@$(call install_copy, cryptsetup, 0, 0, 0755, -, /usr/sbin/cryptsetup)
+	@$(call install_lib, cryptsetup, 0, 0, 644, libcryptsetup)
+
+	@$(call install_finish, cryptsetup)
+
+	@$(call touch)
+
+# vim: syntax=make
+
diff --git a/rules/libdevmapper.in b/rules/libdevmapper.in
new file mode 100644
index 0000000..4698ac2
--- /dev/null
+++ b/rules/libdevmapper.in
@@ -0,0 +1,10 @@
+## SECTION=system_libraries
+
+config LIBDEVMAPPER
+	tristate
+	select LVM2
+	select LVM2_LIBDEVMAPPER
+	help
+	  Helper to select the target packet containing libdevmapper.so
+	  library and its header.
+
diff --git a/rules/libdevmapper.make b/rules/libdevmapper.make
new file mode 100644
index 0000000..3f74e16
--- /dev/null
+++ b/rules/libdevmapper.make
@@ -0,0 +1,20 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2011 by Bart vdr. Meulen <bartvdrmeulen@gmail.com>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBDEVMAPPER) += libdevmapper
+
+# ----------------------------------------------------------------------------
+# Virtual fake package
+# ----------------------------------------------------------------------------
+
+# vim: syntax=make
diff --git a/rules/lvm2.in b/rules/lvm2.in
index db6e60c..1b5c80a 100644
--- a/rules/lvm2.in
+++ b/rules/lvm2.in
@@ -6,6 +6,7 @@ menuconfig LVM2
 	select GCCLIBS_GCC_S
 	select READLINE
 	select NCURSES
+	select LVM2_LIBDEVMAPPER if LVM2_TOOLS
 	prompt "lvm2                          "
 	help
 	  LVM2 refers to a new userspace toolset that provide logical volume management
@@ -14,6 +15,21 @@ menuconfig LVM2
 
 if LVM2
 
+config LVM2_TOOLS
+	bool
+	prompt "Build/intstall LVM2 userland tools"
+	help
+	  Build and install userland tools of the LVM2 package
+
+config LVM2_LIBDEVMAPPER
+	bool
+	prompt "Build/install libdevmapper.so"
+	help
+	  Build and install the devmapper library
+endif
+
+if LVM2_TOOLS
+
 config LVM2_STARTSCRIPT
 	bool
 	default y
diff --git a/rules/lvm2.make b/rules/lvm2.make
index 1e96745..442f47d 100644
--- a/rules/lvm2.make
+++ b/rules/lvm2.make
@@ -49,10 +49,19 @@ LVM2_ENV := \
 #
 LVM2_CONF_TOOL	:= autoconf
 LVM2_CONF_OPT := \
-	$(CROSS_AUTOCONF_USR) \
+	$(CROSS_AUTOCONF_USR)
+
+ifdef PTXCONF_LVM2_TOOLS
+LVM2_CONF_OPT +=
 	--with-device-uid=$(PTXCONF_LVM2_DEVICE_UID) \
 	--with-device-gid=$(PTXCONF_LVM2_DEVICE_GID) \
 	--with-device-mode=$(PTXCONF_LVM2_DEVICE_MODE)
+endif
+
+ifndef PTXCONF_LVM2_TOOLS
+LVM2_MAKE_OPT = device-mapper
+LVM2_INSTALL_OPT = device-mapper_install
+endif
 
 # ----------------------------------------------------------------------------
 # Target-Install
@@ -67,6 +76,7 @@ $(STATEDIR)/lvm2.targetinstall:
 	@$(call install_fixup, lvm2,AUTHOR,"Bart vdr. Meulen <bartvdrmeulen@gmail.com>")
 	@$(call install_fixup, lvm2,DESCRIPTION,missing)
 
+ifdef PTXCONF_LVM2_TOOLS
 	@$(call install_copy, lvm2, 0, 0, 0755, -, /usr/sbin/dmsetup)
 	@$(call install_copy, lvm2, 0, 0, 0755, -, /usr/sbin/fsadm)
 	@$(call install_copy, lvm2, 0, 0, 0755, -, /usr/sbin/lvmdump)
@@ -117,8 +127,11 @@ $(STATEDIR)/lvm2.targetinstall:
 	@$(call install_link, lvm2, lvm, /usr/sbin/vgsplit)
 
 	@$(call install_alternative, lvm2, 0, 0, 0644, /etc/lvm/lvm.conf)
+endif
 
+ifdef PTXCONF_LVM2_LIBDEVMAPPER
 	@$(call install_lib, lvm2, 0, 0, 0644, libdevmapper)
+endif
 
 ifdef PTXCONF_LVM2_STARTSCRIPT
 	@$(call install_alternative, lvm2, 0, 0, 0755, /etc/init.d/lvm2)
-- 
1.7.9.5


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-30 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-28 12:42 [ptxdist] [PATCH] cryptsetup: Add package Bart vdr. Meulen
2012-05-30 16:37 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox