Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=libtraceevent
  3. PKG_VERSION:=1.8.6
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/
  7. PKG_HASH:=812547d2f7b248485c183be2799b7041038ee44183000705609754b128c84c6f
  8. PKG_MAINTAINER:=Nick Hainke <[email protected]>
  9. PKG_FIXUP:=autoreconf
  10. PKG_INSTALL:=1
  11. include $(INCLUDE_DIR)/package.mk
  12. include $(INCLUDE_DIR)/meson.mk
  13. define Package/libtraceevent
  14. SECTION:=libs
  15. CATEGORY:=Libraries
  16. TITLE:=Linux kernel trace event library
  17. URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git
  18. ABI_VERSION:=0
  19. endef
  20. define Package/libtraceevent/description
  21. The libtraceevent library provides APIs to access kernel tracepoint events, located in
  22. the tracefs file system under the events directory.
  23. endef
  24. define Package/libtraceevent-extra
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. TITLE:=Extra plugins for libtraceevent
  28. DEPENDS:=+libtraceevent
  29. endef
  30. MESON_ARGS += \
  31. -Ddoc=false
  32. PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/traceevent/plugins
  33. PLUGINS_MAIN := function hrtimer mac80211 sched_switch
  34. define Build/InstallDev
  35. $(INSTALL_DIR) $(1)/usr/include
  36. $(CP) $(PKG_INSTALL_DIR)/usr/include/traceevent $(1)/usr/include/
  37. $(INSTALL_DIR) $(1)/usr/lib
  38. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtraceevent.{a,so*} $(1)/usr/lib/
  39. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  40. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtraceevent.pc $(1)/usr/lib/pkgconfig/
  41. endef
  42. define Package/libtraceevent/install
  43. $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtraceevent.so.* $(1)/usr/lib/
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(CP) \
  47. $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \
  48. $(1)/usr/lib/traceevent/plugins
  49. endef
  50. define Package/libtraceevent-extra/install
  51. $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins
  52. $(CP) \
  53. $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \
  54. $$(filter-out $(PLUGINS_MAIN), \
  55. $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \
  56. $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \
  57. $(1)/usr/lib/traceevent/plugins
  58. endef
  59. $(eval $(call BuildPackage,libtraceevent))
  60. $(eval $(call BuildPackage,libtraceevent-extra))