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