Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ubox
  3. PKG_VERSION:=2015-11-22
  4. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  5. PKG_SOURCE_PROTO:=git
  6. PKG_SOURCE_URL:=git://nbd.name/luci2/ubox.git
  7. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  8. PKG_SOURCE_VERSION:=c086167a0154745c677f8730a336ea9cf7d71031
  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_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/
  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))