1
0

Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ubox
  3. PKG_RELEASE:=3
  4. PKG_SOURCE_PROTO:=git
  5. PKG_SOURCE_URL=$(PROJECT_GIT)/ubox.git
  6. PKG_SOURCE_DATE:=2019-06-16
  7. PKG_SOURCE_VERSION:=4df34a4d0d5183135217fc8280faae8e697147bc
  8. PKG_MIRROR_HASH:=a4064a1aa29cf612735b0da180f5bdee62304e907f57730482cad97b04f2b189
  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. TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
  16. define Package/ubox
  17. SECTION:=base
  18. CATEGORY:=Base system
  19. DEPENDS:=+libubox +ubusd +ubus +libubus +libuci +USE_GLIBC:librt
  20. TITLE:=libreCMC system helper toolbox
  21. endef
  22. define Package/getrandom
  23. SECTION:=base
  24. CATEGORY:=Base system
  25. TITLE:=libreCMC getrandom system helper
  26. endef
  27. define Package/logd
  28. SECTION:=base
  29. CATEGORY:=Base system
  30. DEPENDS:=+libubox +libubus +libblobmsg-json +USE_GLIBC:librt
  31. TITLE:=libreCMC system log implementation
  32. endef
  33. define Package/getrandom/install
  34. $(INSTALL_DIR) $(1)/usr/bin
  35. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getrandom $(1)/usr/bin/
  36. endef
  37. define Package/ubox/install
  38. $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib $(1)/usr/bin
  39. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/
  40. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib
  41. $(LN) kmodloader $(1)/sbin/rmmod
  42. $(LN) kmodloader $(1)/sbin/insmod
  43. $(LN) kmodloader $(1)/sbin/lsmod
  44. $(LN) kmodloader $(1)/sbin/modinfo
  45. $(LN) kmodloader $(1)/sbin/modprobe
  46. endef
  47. define Package/logd/install
  48. $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/
  49. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/
  50. $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
  51. endef
  52. $(eval $(call BuildPackage,ubox))
  53. $(eval $(call BuildPackage,getrandom))
  54. $(eval $(call BuildPackage,logd))