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.

81 lines
2.2 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=uvol
  3. PKG_VERSION:=0.8
  4. PKG_RELEASE:=$(AUTORELEASE)
  5. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  6. PKG_LICENSE:=GPL-2.0-or-later
  7. include $(INCLUDE_DIR)/package.mk
  8. define Package/autopart
  9. SECTION:=utils
  10. CATEGORY:=Utilities
  11. SUBMENU:=Disc
  12. TITLE:=Automatically initialize LVM partition
  13. DEPENDS:=+lvm2 +partx-utils +sfdisk
  14. PKGARCH=all
  15. endef
  16. define Package/autopart/description
  17. Automatically allocate and initialize a partition for LVM on first boot.
  18. endef
  19. define Package/uvol
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. SUBMENU:=Disc
  23. TITLE:=OpenWrt UBI/LVM volume abstraction
  24. DEPENDS:=+blockd +ucode +ucode-mod-fs +ucode-mod-math +ucode-mod-uci
  25. PKGARCH=all
  26. endef
  27. define Package/uvol/description
  28. 'uvol' is a tool to automate storage volume handling on embedded
  29. devices in a generic way.
  30. Depending on what is available, 'uvol' will use either UBI or LVM2
  31. as storage backends and transparently offer identical operations on
  32. top of them.
  33. Also install the 'autopart' package to easily make use of 'uvol' on
  34. block-storage based devices.
  35. Examples:
  36. uvol create example_volume_1 268435456 rw
  37. uvol up example_volume_1
  38. uvol device example_volume_1
  39. uvol create example_volume_2 9812733 ro
  40. cat example_volume_2.squashfs | uvol write example_volume_2 9812733
  41. uvol up example_volume_2
  42. uvol device example_volume_2
  43. endef
  44. define Build/Prepare
  45. endef
  46. define Build/Configure
  47. endef
  48. define Build/Compile
  49. endef
  50. define Package/autopart/install
  51. $(INSTALL_DIR) $(1)/etc/uci-defaults
  52. $(INSTALL_BIN) ./files/autopart.defaults $(1)/etc/uci-defaults/30-autopart
  53. endef
  54. define Package/uvol/install
  55. $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/lib/uvol/backends $(1)/usr/sbin $(1)/etc/uci-defaults
  56. $(INSTALL_BIN) ./files/uvol.init $(1)/etc/init.d/uvol
  57. $(INSTALL_DATA) ./files/blockdev_common.uc $(1)/usr/lib/uvol/
  58. $(INSTALL_DATA) ./files/uci.uc $(1)/usr/lib/uvol/
  59. $(INSTALL_DATA) ./files/lvm.uc $(1)/usr/lib/uvol/backends/
  60. $(INSTALL_DATA) ./files/ubi.uc $(1)/usr/lib/uvol/backends/
  61. $(INSTALL_BIN) ./files/uvol $(1)/usr/sbin
  62. $(INSTALL_BIN) ./files/uvol.defaults $(1)/etc/uci-defaults/90-uvol-init
  63. endef
  64. $(eval $(call BuildPackage,autopart))
  65. $(eval $(call BuildPackage,uvol))