Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=trace-cmd
  3. PKG_VERSION:=v2.9.1
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/
  7. PKG_HASH:=9404fc3cf540ea795304608068c9db6cdb38b90584c7f3c43249785913d54b38
  8. PKG_LICENSE:=GPL-2.0-only
  9. PKG_LICENSE_FILES:=COPYING
  10. PKG_INSTALL:=1
  11. PKG_USE_MIPS16:=0
  12. PKG_BUILD_PARALLEL:=1
  13. include $(INCLUDE_DIR)/package.mk
  14. define Package/trace-cmd
  15. SECTION:=devel
  16. CATEGORY:=Development
  17. TITLE:=Linux trace command line utility
  18. DEPENDS:=
  19. endef
  20. define Package/trace-cmd-extra
  21. SECTION:=devel
  22. CATEGORY:=Development
  23. TITLE:=Extra plugins for trace-cmd
  24. DEPENDS:=
  25. endef
  26. MAKE_FLAGS += \
  27. NO_PYTHON=1 \
  28. NO_AUDIT=1 \
  29. prefix=/usr
  30. PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/traceevent/plugins
  31. PLUGINS_MAIN := function hrtimer mac80211 sched_switch
  32. TARGET_CFLAGS += --std=gnu99 -D_GNU_SOURCE
  33. define Package/trace-cmd/install
  34. $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/traceevent/plugins
  35. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trace-cmd $(1)/usr/bin/
  36. $(CP) \
  37. $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \
  38. $(1)/usr/lib/traceevent/plugins
  39. endef
  40. define Package/trace-cmd-extra/install
  41. $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins
  42. $(CP) \
  43. $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \
  44. $$(filter-out $(PLUGINS_MAIN), \
  45. $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \
  46. $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \
  47. $(1)/usr/lib/traceevent/plugins
  48. endef
  49. $(eval $(call BuildPackage,trace-cmd))
  50. $(eval $(call BuildPackage,trace-cmd-extra))