Makefile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=libtraceevent
  3. PKG_VERSION:=1.7.2
  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:=a8b4bf8f05c06d1d6405f6d0038467a87e7ab218f0d8b0608d08bca5d1fc112a
  8. PKG_MAINTAINER:=Nick Hainke <vincent@systemli.org>
  9. PKG_FIXUP:=autoreconf
  10. PKG_INSTALL:=1
  11. include $(INCLUDE_DIR)/package.mk
  12. define Package/libtraceevent
  13. SECTION:=libs
  14. CATEGORY:=Libraries
  15. TITLE:=Linux kernel trace event library
  16. URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git
  17. ABI_VERSION:=0
  18. endef
  19. define Package/libtraceevent/description
  20. The libtraceevent library provides APIs to access kernel tracepoint events, located in
  21. the tracefs file system under the events directory.
  22. endef
  23. define Package/libtraceevent-extra
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=Extra plugins for libtraceevent
  27. DEPENDS:=
  28. endef
  29. CONFIGURE_ARGS+= \
  30. --enable-shared \
  31. --enable-static
  32. PLUGINS_DIR := $(PKG_BUILD_DIR)/plugins
  33. PLUGINS_MAIN := function hrtimer mac80211 sched_switch
  34. define Build/InstallDev
  35. $(INSTALL_DIR) $(1)/usr/include
  36. $(CP) $(PKG_BUILD_DIR)/include/traceevent $(1)/usr/include/
  37. $(INSTALL_DIR) $(1)/usr/lib
  38. $(CP) $(PKG_BUILD_DIR)/lib/libtraceevent.{a,so*} $(1)/usr/lib/
  39. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  40. $(CP) $(PKG_BUILD_DIR)/libtraceevent.pc $(1)/usr/lib/pkgconfig/
  41. endef
  42. define Package/libtraceevent/install
  43. $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins
  44. $(CP) $(PKG_BUILD_DIR)/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))