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