* [Buildroot] [PATCH] New package: gdisk
@ 2011-02-27 15:19 Malte Starostik
2011-04-25 21:23 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: Malte Starostik @ 2011-02-27 15:19 UTC (permalink / raw)
To: buildroot
This includes two separately configurable parition manipulation
utilities: gdsik and sgdisk are to GPT disks what fdisk and sfdisk are
in MBR land.
Signed-off-by: Malte Starostik <m-starostik@versanet.de>
---
package/Config.in | 1 +
package/gdisk/Config.in | 34 ++++++++++++++++++++++++++++++++++
package/gdisk/gdisk.mk | 33 +++++++++++++++++++++++++++++++++
3 files changed, 68 insertions(+), 0 deletions(-)
create mode 100644 package/gdisk/Config.in
create mode 100644 package/gdisk/gdisk.mk
diff --git a/package/Config.in b/package/Config.in
index f459c1b..8a754e2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -165,6 +165,7 @@ source "package/eeprog/Config.in"
source "package/fconfig/Config.in"
source "package/fis/Config.in"
source "package/gadgetfs-test/Config.in"
+source "package/gdisk/Config.in"
source "package/genext2fs/Config.in"
source "package/genromfs/Config.in"
source "package/gpsd/Config.in"
diff --git a/package/gdisk/Config.in b/package/gdisk/Config.in
new file mode 100644
index 0000000..a49bac6
--- /dev/null
+++ b/package/gdisk/Config.in
@@ -0,0 +1,34 @@
+config BR2_PACKAGE_GDISK
+ bool "gdisk"
+ depends on BR2_LARGEFILE && BR2_INSTALL_LIBSTDCPP
+ help
+ GPT fdisk (consisting of the gdisk and sgdisk programs) is a
+ text-mode partitioning tool that works on Globally Unique Identifier
+ (GUID) Partition Table (GPT) disks, rather than on the more common
+ (through 2010) Master Boot Record (MBR) partition tables.
+
+ http://www.rodsbooks.com/gdisk/
+
+config BR2_PACKAGE_GDISK_GDISK
+ bool "interactive gdisk"
+ depends on BR2_PACKAGE_GDISK
+ select BR2_PACKAGE_E2FSPROGS
+ select BR2_PACKAGE_E2FSPROGS_LIBUUID
+ help
+ Install the interactive GUID partition table (GPT) manipulator
+ /usr/sbin/gdsik which is modelled after and quite similar in use
+ to the traditional MBR based fdisk tool.
+
+config BR2_PACKAGE_GDISK_SGDISK
+ bool "command line sgdisk"
+ depends on BR2_PACKAGE_GDISK
+ select BR2_PACKAGE_E2FSPROGS
+ select BR2_PACKAGE_E2FSPROGS_LIBUUID
+ select BR2_PACKAGE_POPT
+ help
+ Install the command-line GUID partition table (GPT) manipulator
+ /usr/sbin/sgdisk which is named after the traditional MBR based
+ sfdisk tool albeit with an entirely different option syntax.
+
+comment "gdisk requires a toolchain with LARGEFILE and C++ support enabled"
+ depends on !BR2_LARGEFILE || !BR2_INSTALL_LIBSTDCPP
diff --git a/package/gdisk/gdisk.mk b/package/gdisk/gdisk.mk
new file mode 100644
index 0000000..dc8b580
--- /dev/null
+++ b/package/gdisk/gdisk.mk
@@ -0,0 +1,33 @@
+#############################################################
+#
+# gdisk
+#
+#############################################################
+
+GDISK_VERSION = 0.6.14
+GDISK_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/gptfdisk
+GDISK_SOURCE = gdisk-$(GDISK_VERSION).tgz
+
+GDISK_DEPENDENCIES += e2fsprogs
+ifeq ($(BR2_PACKAGE_GDISK_SGDISK),y)
+ GDISK_DEPENDENCIES += popt
+endif
+
+GDISK_TARGETS_$(BR2_PACKAGE_GDISK_GDISK) += gdisk
+GDISK_TARGETS_$(BR2_PACKAGE_GDISK_SGDISK) += sgdisk
+
+define GDISK_BUILD_CMDS
+ $(MAKE) CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" -C $(@D)
+endef
+
+define GDISK_INSTALL_TARGET_CMDS
+ for i in $(GDISK_TARGETS_y); do \
+ $(INSTALL) -D $(@D)/$$i $(TARGET_DIR)/usr/sbin/; \
+ done
+endef
+
+define GDISK_UNINSTALL_TARGET_CMDS
+ rm -f $(TARGET_DIR)/usr/sbin/gdisk $(TARGET_DIR)/usr/sbin/sgdisk
+endef
+
+$(eval $(call GENTARGETS,package,gdisk))
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] New package: gdisk
2011-02-27 15:19 [Buildroot] [PATCH] New package: gdisk Malte Starostik
@ 2011-04-25 21:23 ` Peter Korsgaard
0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2011-04-25 21:23 UTC (permalink / raw)
To: buildroot
>>>>> "Malte" == Malte Starostik <m-starostik@versanet.de> writes:
Hi,
Malte> This includes two separately configurable parition manipulation
Malte> utilities: gdsik and sgdisk are to GPT disks what fdisk and sfdisk are
Malte> in MBR land.
Thanks, and sorry for the slow response. Committed with some tweaks (see
below).
First of all, the gdisk sources have to be patched to not hardcode
/usr/include/uuid/uuid.h, and instead use the cross compiled one in
STAGING_DIR.
Malte> Signed-off-by: Malte Starostik <m-starostik@versanet.de>
Malte> ---
Malte> package/Config.in | 1 +
Malte> package/gdisk/Config.in | 34 ++++++++++++++++++++++++++++++++++
Malte> package/gdisk/gdisk.mk | 33 +++++++++++++++++++++++++++++++++
Malte> 3 files changed, 68 insertions(+), 0 deletions(-)
Malte> create mode 100644 package/gdisk/Config.in
Malte> create mode 100644 package/gdisk/gdisk.mk
Malte> diff --git a/package/Config.in b/package/Config.in
Malte> index f459c1b..8a754e2 100644
Malte> --- a/package/Config.in
Malte> +++ b/package/Config.in
Malte> @@ -165,6 +165,7 @@ source "package/eeprog/Config.in"
Malte> source "package/fconfig/Config.in"
Malte> source "package/fis/Config.in"
Malte> source "package/gadgetfs-test/Config.in"
Malte> +source "package/gdisk/Config.in"
Malte> source "package/genext2fs/Config.in"
Malte> source "package/genromfs/Config.in"
Malte> source "package/gpsd/Config.in"
Malte> diff --git a/package/gdisk/Config.in b/package/gdisk/Config.in
Malte> new file mode 100644
Malte> index 0000000..a49bac6
Malte> --- /dev/null
Malte> +++ b/package/gdisk/Config.in
Malte> @@ -0,0 +1,34 @@
Malte> +config BR2_PACKAGE_GDISK
Malte> + bool "gdisk"
Malte> + depends on BR2_LARGEFILE && BR2_INSTALL_LIBSTDCPP
Malte> + help
Malte> + GPT fdisk (consisting of the gdisk and sgdisk programs) is a
Malte> + text-mode partitioning tool that works on Globally Unique Identifier
Malte> + (GUID) Partition Table (GPT) disks, rather than on the more common
Malte> + (through 2010) Master Boot Record (MBR) partition tables.
Malte> +
Malte> + http://www.rodsbooks.com/gdisk/
Malte> +
Malte> +config BR2_PACKAGE_GDISK_GDISK
Malte> + bool "interactive gdisk"
Malte> + depends on BR2_PACKAGE_GDISK
Malte> + select BR2_PACKAGE_E2FSPROGS
Malte> + select BR2_PACKAGE_E2FSPROGS_LIBUUID
Malte> + help
Malte> + Install the interactive GUID partition table (GPT) manipulator
Malte> + /usr/sbin/gdsik which is modelled after and quite similar in use
s/gdsik/gdisk/
Malte> +++ b/package/gdisk/gdisk.mk
Malte> @@ -0,0 +1,33 @@
Malte> +#############################################################
Malte> +#
Malte> +# gdisk
Malte> +#
Malte> +#############################################################
Malte> +
Malte> +GDISK_VERSION = 0.6.14
Malte> +GDISK_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/gptfdisk
Malte> +GDISK_SOURCE = gdisk-$(GDISK_VERSION).tgz
Malte> +
You need to fix build when no sub option is selected, and only build the
selected sub options (otherwise linking fails because of missing popt).
Malte> +GDISK_DEPENDENCIES += e2fsprogs
Malte> +ifeq ($(BR2_PACKAGE_GDISK_SGDISK),y)
Malte> + GDISK_DEPENDENCIES += popt
Malte> +endif
Malte> +
Malte> +GDISK_TARGETS_$(BR2_PACKAGE_GDISK_GDISK) += gdisk
Malte> +GDISK_TARGETS_$(BR2_PACKAGE_GDISK_SGDISK) += sgdisk
Malte> +
Malte> +define GDISK_BUILD_CMDS
Malte> + $(MAKE) CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" -C $(@D)
You should use TARGET_CONFIGURE_OPTS to ensure CFLAGS/CXXFLAGS/LDFLAGS
are properly set.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-25 21:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-27 15:19 [Buildroot] [PATCH] New package: gdisk Malte Starostik
2011-04-25 21:23 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox