Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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:=2018-02-14
  7. PKG_SOURCE_VERSION:=128bc35fa951ac3beff6e977bc3cced87c2e2600
  8. PKG_MIRROR_HASH:=f58dfb9a9bb69c6303cb69bbd850b14bd29ec59ea240bac4063fd74a7fce64aa
  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:=OpenWrt system helper toolbox
  21. endef
  22. define Package/logd
  23. SECTION:=base
  24. CATEGORY:=Base system
  25. DEPENDS:=+libubox +libubus +libblobmsg-json +USE_GLIBC:librt
  26. TITLE:=OpenWrt system log implementation
  27. endef
  28. define Package/ubox/install
  29. $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib $(1)/usr/bin
  30. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/
  31. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getrandom $(1)/usr/bin/
  32. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib
  33. $(LN) kmodloader $(1)/sbin/rmmod
  34. $(LN) kmodloader $(1)/sbin/insmod
  35. $(LN) kmodloader $(1)/sbin/lsmod
  36. $(LN) kmodloader $(1)/sbin/modinfo
  37. $(LN) kmodloader $(1)/sbin/modprobe
  38. endef
  39. define Package/logd/install
  40. $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/
  41. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/
  42. $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
  43. endef
  44. $(eval $(call BuildPackage,ubox))
  45. $(eval $(call BuildPackage,logd))