1
0

Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ubox
  3. PKG_RELEASE:=2
  4. PKG_SOURCE_PROTO:=git
  5. PKG_SOURCE_URL=$(PROJECT_GIT)/ubox.git
  6. PKG_SOURCE_DATE:=2022-08-13
  7. PKG_SOURCE_VERSION:=4c7b720b9c63b826fb9404e454ae54f2ef5649d5
  8. PKG_MIRROR_HASH:=35178148034dfef36c5fda2bc8217617920bc1a3b86f72efbe87e85048a6a2a8
  9. CMAKE_INSTALL:=1
  10. PKG_LICENSE:=GPL-2.0
  11. PKG_LICENSE_FILES:=
  12. PKG_MAINTAINER:=John Crispin <john@phrozen.org>
  13. include $(INCLUDE_DIR)/package.mk
  14. include $(INCLUDE_DIR)/cmake.mk
  15. define Package/ubox
  16. SECTION:=base
  17. CATEGORY:=Base system
  18. DEPENDS:=+libubox +ubusd +ubus +libubus +libuci
  19. TITLE:=libreCMC system helper toolbox
  20. ALTERNATIVES:=\
  21. 100:/sbin/rmmod:/sbin/kmodloader \
  22. 100:/sbin/insmod:/sbin/kmodloader \
  23. 100:/sbin/lsmod:/sbin/kmodloader \
  24. 100:/sbin/modinfo:/sbin/kmodloader \
  25. 100:/sbin/modprobe:/sbin/kmodloader
  26. endef
  27. define Package/ubox/conffiles
  28. /etc/modules.conf
  29. endef
  30. define Package/getrandom
  31. SECTION:=base
  32. CATEGORY:=Base system
  33. TITLE:=libreCMC getrandom system helper
  34. endef
  35. define Package/logd
  36. SECTION:=base
  37. CATEGORY:=Base system
  38. DEPENDS:=+libubox +libubus +libblobmsg-json
  39. TITLE:=libreCMC system log implementation
  40. USERID:=logd=514:logd=514
  41. endef
  42. define Package/getrandom/install
  43. $(INSTALL_DIR) $(1)/usr/bin
  44. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getrandom $(1)/usr/bin/
  45. endef
  46. define Package/ubox/install
  47. $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib $(1)/usr/bin $(1)/etc
  48. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/
  49. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib
  50. $(INSTALL_DATA) ./files/modules.conf $(1)/etc/modules.conf
  51. endef
  52. define Package/logd/install
  53. $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/
  54. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/
  55. $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
  56. endef
  57. $(eval $(call BuildPackage,ubox))
  58. $(eval $(call BuildPackage,getrandom))
  59. $(eval $(call BuildPackage,logd))