You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.6 KiB

  1. #
  2. # Copyright (C) 2018 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=gptfdisk
  9. PKG_VERSION:=1.0.4
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/$(PKG_NAME)
  13. PKG_HASH:=b663391a6876f19a3cd901d862423a16e2b5ceaa2f4a3b9bb681e64b9c7ba78d
  14. PKG_MAINTAINER:=Alif M. Ahmad <alive4ever@live.com>
  15. PKG_LICENSE:=GPL-2.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/uclibc++.mk
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/gptfdisk/Default
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. SUBMENU:=Disc
  24. URL:=https://www.rodsbooks.com/gdisk
  25. DEPENDS:=$(CXX_DEPENDS)
  26. endef
  27. define Package/gdisk
  28. $(call Package/gptfdisk/Default)
  29. TITLE:=GPT aware disk manipulation utility for interactive use
  30. DEPENDS+= +libuuid
  31. endef
  32. define Package/gdisk/description
  33. gdisk is GPT aware disk partitioning tool, with interactive UI.
  34. endef
  35. define Package/cgdisk
  36. $(call Package/gptfdisk/Default)
  37. TITLE:=GPT aware disk manipulation utility for interactive use
  38. DEPENDS+= +libuuid +libncursesw
  39. endef
  40. define Package/cgdisk/description
  41. cgdisk is GPT aware disk partitioning tool, with interactive ncurses based UI.
  42. endef
  43. define Package/sgdisk
  44. $(call Package/gptfdisk/Default)
  45. TITLE:=GPT aware disk manipulation utility for scripting use
  46. DEPENDS+= +libuuid +libpopt
  47. endef
  48. define Package/sgdisk/description
  49. sgdisk is GPT-aware disk partitioning tool for scripting use.
  50. endef
  51. define Package/fixparts
  52. $(call Package/gptfdisk/Default)
  53. TITLE:=A utility to fix corrupted MBR partitions
  54. DEPENDS+=
  55. endef
  56. define Package/fixparts/description
  57. a text-mode menu-driven program for repairing certain types of problems with
  58. Master Boot Record (MBR) partition tables
  59. endef
  60. TARGET_CXXFLAGS += -std=c++11 -ffunction-sections -fdata-sections -fno-rtti -flto
  61. TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lm) -Wl,--gc-sections,--as-needed
  62. ifeq ($(CONFIG_USE_UCLIBCXX),y)
  63. TARGET_LDFLAGS += -nodefaultlibs
  64. endif
  65. define Package/gdisk/install
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(INSTALL_BIN) $(PKG_BUILD_DIR)/gdisk $(1)/usr/bin/
  68. endef
  69. define Package/cgdisk/install
  70. $(INSTALL_DIR) $(1)/usr/bin
  71. $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgdisk $(1)/usr/bin/
  72. endef
  73. define Package/sgdisk/install
  74. $(INSTALL_DIR) $(1)/usr/bin
  75. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sgdisk $(1)/usr/bin/
  76. endef
  77. define Package/fixparts/install
  78. $(INSTALL_DIR) $(1)/usr/bin
  79. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fixparts $(1)/usr/bin/
  80. endef
  81. $(eval $(call BuildPackage,gdisk))
  82. $(eval $(call BuildPackage,cgdisk))
  83. $(eval $(call BuildPackage,sgdisk))
  84. $(eval $(call BuildPackage,fixparts))