gdisk: enabled more utils and changed package name 3355/head
authorAlberto Bursi <starshipeleven@outlook.com>
Tue, 18 Oct 2016 07:54:57 +0000 (09:54 +0200)
committerAlberto Bursi <starshipeleven@outlook.com>
Tue, 18 Oct 2016 07:54:57 +0000 (09:54 +0200)
I needed also sgdisk (script-friendly) and while I was at it I added also
cgdisk (uses ncurses interface), all as separate packages.
re-arranged the package folder and set /usr/sbin for install folder
as most tools seem to go in there and not in /sbin.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
utils/gdisk/Makefile [deleted file]
utils/gptfdisk/Makefile [new file with mode: 0644]

diff --git a/utils/gdisk/Makefile b/utils/gdisk/Makefile
deleted file mode 100644 (file)
index b55a7a9..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (C) 2016 Daniel Engberg <daniel.engberg.lists@pyret.net>
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=gdisk
-PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
-PKG_LICENSE:=GPL-2.0
-
-PKG_SOURCE:=gptfdisk-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/gptfdisk
-PKG_MD5SUM:=d7f3d306b083123bcc6f5941efade586
-PKG_SOURCE_SUBDIR:=gptfdisk-$(PKG_VERSION)
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/gdisk
-  SECTION:=utils
-  CATEGORY:=Utilities
-  SUBMENU:=disc
-  DEPENDS:=+libstdcpp +libpopt +libuuid
-  TITLE:=Partition utility that supports GPT
-  URL:=http://www.rodsbooks.com/gdisk
-  MAINTAINER:=Daniel Engberg <daniel.engberg.lists@pyret.net>
-endef
-
-define Package/gdisk/description
- Partition table manipulation utility with GPT support
-endef
-
-define Package/gdisk/install
-       $(INSTALL_DIR) $(1)/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/gdisk $(1)/sbin/
-endef
-
-$(eval $(call BuildPackage,gdisk))
diff --git a/utils/gptfdisk/Makefile b/utils/gptfdisk/Makefile
new file mode 100644 (file)
index 0000000..900a9dc
--- /dev/null
@@ -0,0 +1,87 @@
+#
+# Copyright (C) 2016 Daniel Engberg <daniel.engberg.lists@pyret.net>
+#
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gptfdisk
+PKG_VERSION:=1.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/gptfdisk
+PKG_MD5SUM:=d7f3d306b083123bcc6f5941efade586
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/gptfdisk/default
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=disc
+  URL:=http://www.rodsbooks.com/gdisk
+  MAINTAINER:=Daniel Engberg <daniel.engberg.lists@pyret.net>
+endef
+
+define Package/gdisk
+  $(call Package/gptfdisk/default)
+  TITLE:=GPT partition table manipulation utility
+  DEPENDS:=+libstdcpp +libuuid +libpopt
+endef
+
+define Package/gdisk/description
+ GPT partition table manipulation utility with an interface
+ similar to fdisk. It can read and convert MBR partitions in GPT
+ but is otherwise unable to generate or modify MBR partitions.
+endef
+
+define Package/sgdisk
+  $(call Package/gptfdisk/default)
+  TITLE:=script-friendly GPT partition table manipulation utility
+  DEPENDS:=+libstdcpp +libuuid +libpopt
+endef
+
+define Package/sgdisk/description
+ Script-friendly GPT partition table manipulation utility.
+ It can read and convert MBR partitions in GPT but is otherwise
+ unable to generate or modify MBR partitions.
+ To the contrary of gdisk, its interface is geared towards scripts,
+ so it takes command line arguments instead of being interactive.
+ It will NOT ask confirmation before carrying out the operations.
+ It has a slightly smaller footprint than gdisk tool.
+endef
+
+define Package/cgdisk
+ $(call Package/gptfdisk/default)
+ TITLE:=ncurses-based GPT partition table manipulation utility
+ DEPENDS:=+libstdcpp +libuuid +libncurses +libpopt
+endef
+
+define Package/cgdisk/description
+ncurses-based partition table manipulation utility with GPT support.
+Similar to sfdisk, but works with GPT partitions. Shares the same limitations
+of the gdisk partition utility. While it can read and convert MBR partitions
+in GPT, it cannot modify MBR partitions on its own.
+endef
+
+define Package/gdisk/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/gdisk $(1)/usr/sbin
+endef
+
+define Package/sgdisk/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/sgdisk $(1)/usr/sbin
+endef
+
+define Package/cgdisk/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgdisk $(1)/usr/sbin
+endef
+
+$(eval $(call BuildPackage,gdisk))
+$(eval $(call BuildPackage,sgdisk))
+$(eval $(call BuildPackage,cgdisk))