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.

78 lines
2.1 KiB

  1. # SPDX-License-Identifier: GPL-2.0-only
  2. include $(TOPDIR)/rules.mk
  3. PKG_NAME:=parted
  4. PKG_VERSION:=3.4
  5. PKG_RELEASE:=$(AUTORELEASE)
  6. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  7. PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/parted/
  8. PKG_HASH:=e1298022472da5589b7f2be1d5ee3c1b66ec3d96dfbad03dc642afd009da5342
  9. PKG_BUILD_PARALLEL:=1
  10. PKG_INSTALL:=1
  11. PKG_LICENSE:=GPL-3.0-or-later
  12. PKG_LICENSE_FILES:=COPYING
  13. PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
  14. PKG_CONFIG_DEPENDS:= \
  15. CONFIG_PARTED_LVM2 \
  16. CONFIG_PARTED_READLINE
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/libparted
  19. SECTION:=libs
  20. CATEGORY:=Libraries
  21. TITLE:=GNU Parted library
  22. DEPENDS:=+libblkid +libuuid +PARTED_LVM2:libdevmapper
  23. endef
  24. define Package/libparted/description
  25. GNU Parted shared library
  26. endef
  27. define Package/parted
  28. SECTION:=utils
  29. CATEGORY:=Utilities
  30. TITLE:=GNU Parted
  31. SUBMENU:=Disc
  32. DEPENDS:=+libparted +PARTED_READLINE:libreadline +PARTED_READLINE:libncurses
  33. endef
  34. define Package/parted/description
  35. GNU Parted manipulates partition tables. This is useful for
  36. creating space for new operating systems, reorganizing
  37. disk usage, copying data on hard disks and disk imaging.
  38. endef
  39. define Package/parted/config
  40. source "$(SOURCE)/Config.in"
  41. endef
  42. CONFIGURE_ARGS += \
  43. $(if $(CONFIG_PARTED_READLINE),--with-readline,--without-readline) \
  44. $(if $(CONFIG_PARTED_LVM2),--enable-device-mapper,--disable-device-mapper)
  45. define Build/InstallDev
  46. $(INSTALL_DIR) $(1)/usr/include/parted $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so** $(1)/usr/lib/
  48. $(CP) $(PKG_INSTALL_DIR)/usr/include/parted/*.h $(1)/usr/include/parted/
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
  50. endef
  51. define Package/libparted/install
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so** $(1)/usr/lib/
  54. endef
  55. define Package/parted/install
  56. $(INSTALL_DIR) $(1)/sbin
  57. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/parted $(1)/sbin/
  58. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/partprobe $(1)/sbin/
  59. endef
  60. $(eval $(call BuildPackage,libparted))
  61. $(eval $(call BuildPackage,parted))