aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libtracefs
diff options
context:
space:
mode:
authorNick Hainke <vincent@systemli.org>2022-07-02 21:49:37 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2022-08-06 19:58:46 +0200
commit6d84e78cd9633578d33a46b914a9cc5bae082f6b (patch)
treefb359de2b81abd78ef7ed85cff840f953abb4212 /package/libs/libtracefs
parentb108810601ff1976a0c33f9c20186e50f5a74e7d (diff)
downloadupstream-6d84e78cd9633578d33a46b914a9cc5bae082f6b.tar.gz
upstream-6d84e78cd9633578d33a46b914a9cc5bae082f6b.tar.bz2
upstream-6d84e78cd9633578d33a46b914a9cc5bae082f6b.zip
libtracefs: add Linux kernel trace file system library
Needed by trace-cmd. Signed-off-by: Nick Hainke <vincent@systemli.org>
Diffstat (limited to 'package/libs/libtracefs')
-rw-r--r--package/libs/libtracefs/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/package/libs/libtracefs/Makefile b/package/libs/libtracefs/Makefile
new file mode 100644
index 0000000000..412c5fd122
--- /dev/null
+++ b/package/libs/libtracefs/Makefile
@@ -0,0 +1,49 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libtracefs
+PKG_VERSION:=1.4.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/
+PKG_HASH:=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+PKG_MAINTAINER:=Nick Hainke <vincent@systemli.org>
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libtracefs
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Linux kernel trace file system library
+ URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git
+ DEPENDS+=+libpthread +libtraceevent
+ ABI_VERSION:=0
+endef
+
+define Package/libtracefs/description
+The libtracefs library provides APIs to access kernel trace file system.
+endef
+
+CONFIGURE_ARGS+= \
+ --enable-shared \
+ --enable-static \
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/lib/libtracefs.{a,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/libtracefs.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libtracefs/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/lib/libtracefs.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libtracefs))