Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ubox
  3. PKG_VERSION:=2016-07-19
  4. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  5. PKG_SOURCE_PROTO:=git
  6. PKG_SOURCE_URL=$(OPENWRT_GIT)/project/ubox.git
  7. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  8. PKG_SOURCE_VERSION:=aead2c0cbffdda9b46d74a998a4c6aeef423b21a
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  10. CMAKE_INSTALL:=1
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_LICENSE_FILES:=
  13. PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
  14. include $(INCLUDE_DIR)/package.mk
  15. include $(INCLUDE_DIR)/cmake.mk
  16. TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
  17. define Package/ubox
  18. SECTION:=base
  19. CATEGORY:=Base system
  20. DEPENDS:=+libubox +ubusd +ubus +libubus +libuci +USE_GLIBC:librt
  21. TITLE:=OpenWrt system helper toolbox
  22. endef
  23. define Package/logd
  24. SECTION:=base
  25. CATEGORY:=Base system
  26. DEPENDS:=+libubox +libubus +libblobmsg-json +USE_GLIBC:librt
  27. TITLE:=OpenWrt system log implementation
  28. endef
  29. define Package/ubox/install
  30. $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/
  31. $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/ $(1)/usr/bin
  32. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/
  33. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getrandom $(1)/usr/bin/
  34. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib
  35. $(LN) ../../sbin/kmodloader $(1)/usr/sbin/rmmod
  36. $(LN) ../../sbin/kmodloader $(1)/usr/sbin/insmod
  37. $(LN) ../../sbin/kmodloader $(1)/usr/sbin/lsmod
  38. $(LN) ../../sbin/kmodloader $(1)/usr/sbin/modinfo
  39. $(LN) ../../sbin/kmodloader $(1)/usr/sbin/modprobe
  40. endef
  41. define Package/logd/install
  42. $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/
  43. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/
  44. $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
  45. endef
  46. $(eval $(call BuildPackage,ubox))
  47. $(eval $(call BuildPackage,logd))