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.

76 lines
1.9 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=uvol
  3. PKG_VERSION:=0.3
  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. DEPENDS:=+blockd
  26. PKGARCH=all
  27. endef
  28. define Package/uvol/description
  29. 'uvol' is tool to automate storage volume handling on embedded
  30. devices in a generic way.
  31. Also install the 'autopart' package to easily make use of 'uvol' on
  32. block-storage based devices.
  33. Examples:
  34. uvol create example_volume_1 256MiB rw
  35. uvol up example_volume_1
  36. uvol device example_volume_1
  37. uvol create example_volume_2 9812733 ro
  38. cat example_volume_2.squashfs | uvol write example_volume_2 9812733
  39. uvol up example_volume_2
  40. uvol device example_volume_2
  41. endef
  42. define Build/Prepare
  43. endef
  44. define Build/Configure
  45. endef
  46. define Build/Compile
  47. endef
  48. define Package/autopart/install
  49. $(INSTALL_DIR) $(1)/etc/uci-defaults
  50. $(INSTALL_BIN) ./files/autopart.defaults $(1)/etc/uci-defaults/30-autopart
  51. endef
  52. define Package/uvol/install
  53. $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/libexec/uvol $(1)/usr/sbin $(1)/lib/functions
  54. $(INSTALL_BIN) ./files/uvol.init $(1)/etc/init.d/uvol
  55. $(INSTALL_BIN) ./files/common.sh $(1)/lib/functions/uvol.sh
  56. $(INSTALL_BIN) ./files/ubi.sh $(1)/usr/libexec/uvol/20-ubi.sh
  57. $(INSTALL_BIN) ./files/lvm.sh $(1)/usr/libexec/uvol/50-lvm.sh
  58. $(INSTALL_BIN) ./files/uvol $(1)/usr/sbin
  59. endef
  60. $(eval $(call BuildPackage,autopart))
  61. $(eval $(call BuildPackage,uvol))