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.

73 lines
1.7 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=uvol
  3. PKG_VERSION:=0.2
  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 the GPT partition for LVM and initialize it
  18. on first boot.
  19. endef
  20. define Package/uvol
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. SUBMENU:=Disc
  24. TITLE:=OpenWrt UBI/LVM volume abstraction
  25. PKGARCH=all
  26. endef
  27. define Package/uvol/description
  28. 'uvol' is tool to automate storage volume handling on embedded
  29. devices in a generic way.
  30. Also install the 'autopart' package to easily make use of 'uvol' on
  31. block-storage based devices.
  32. Examples:
  33. uvol create example_volume_1 256MiB rw
  34. uvol up example_volume_1
  35. uvol device example_volume_1
  36. uvol create example_volume_2 9812733 ro
  37. cat example_volume_2.squashfs | uvol write example_volume_2 9812733
  38. uvol up example_volume_2
  39. uvol device example_volume_2
  40. endef
  41. define Build/Prepare
  42. endef
  43. define Build/Configure
  44. endef
  45. define Build/Compile
  46. endef
  47. define Package/autopart/install
  48. $(INSTALL_DIR) $(1)/etc/uci-defaults
  49. $(INSTALL_BIN) ./files/autopart.defaults $(1)/etc/uci-defaults/30-autopart
  50. endef
  51. define Package/uvol/install
  52. $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/libexec/uvol
  53. $(INSTALL_BIN) ./files/uvol $(1)/usr/sbin
  54. $(INSTALL_BIN) ./files/ubi.sh $(1)/usr/libexec/uvol/20-ubi.sh
  55. $(INSTALL_BIN) ./files/lvm.sh $(1)/usr/libexec/uvol/50-lvm.sh
  56. endef
  57. $(eval $(call BuildPackage,autopart))
  58. $(eval $(call BuildPackage,uvol))