Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ubox
  3. PKG_RELEASE:=1
  4. PKG_SOURCE_PROTO:=git
  5. PKG_SOURCE_URL=$(LEDE_GIT)/project/ubox.git
  6. PKG_SOURCE_DATE:=2017-01-15
  7. PKG_SOURCE_VERSION:=5649c028c426060616e2bd4e7ea83271cd333d21
  8. PKG_MIRROR_HASH:=ae77504a4397f92173a7646fa3555e5b51abd7ff1dd1c419770223359e41937a
  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) ../../sbin/kmodloader $(1)/usr/sbin/rmmod
  34. $(LN) ../../sbin/kmodloader $(1)/usr/sbin/insmod
  35. $(LN) ../../sbin/kmodloader $(1)/usr/sbin/lsmod
  36. $(LN) ../../sbin/kmodloader $(1)/usr/sbin/modinfo
  37. $(LN) ../../sbin/kmodloader $(1)/usr/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))