procd: make mDNS TXT record parsing more solid
[openwrt/openwrt.git] / package / devel / trace-cmd / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=trace-cmd
4 PKG_VERSION:=v2.9.1
5 PKG_RELEASE:=1
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
8 PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/
9 PKG_HASH:=9404fc3cf540ea795304608068c9db6cdb38b90584c7f3c43249785913d54b38
10
11 PKG_LICENSE:=GPL-2.0-only
12 PKG_LICENSE_FILES:=COPYING
13
14 PKG_INSTALL:=1
15 PKG_USE_MIPS16:=0
16 PKG_BUILD_PARALLEL:=1
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/trace-cmd
21 SECTION:=devel
22 CATEGORY:=Development
23 TITLE:=Linux trace command line utility
24 DEPENDS:=
25 endef
26
27 define Package/trace-cmd-extra
28 SECTION:=devel
29 CATEGORY:=Development
30 TITLE:=Extra plugins for trace-cmd
31 DEPENDS:=
32 endef
33
34 MAKE_FLAGS += \
35 NO_PYTHON=1 \
36 NO_AUDIT=1 \
37 prefix=/usr
38
39 PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/traceevent/plugins
40 PLUGINS_MAIN := function hrtimer mac80211 sched_switch
41
42 TARGET_CFLAGS += --std=gnu99 -D_GNU_SOURCE
43
44 define Package/trace-cmd/install
45 $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/traceevent/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/traceevent/plugins
50 endef
51
52 define Package/trace-cmd-extra/install
53 $(INSTALL_DIR) $(1)/usr/lib/traceevent/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/traceevent/plugins
60 endef
61
62 $(eval $(call BuildPackage,trace-cmd))
63 $(eval $(call BuildPackage,trace-cmd-extra))