fstools: update to git HEAD
[openwrt/openwrt.git] / package / devel / strace / Makefile
1 #
2 # Copyright (C) 2006-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=strace
12 PKG_VERSION:=5.18
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
17 PKG_HASH:=60293ea79ac9253d600cdc9be077ad2988ca22284a439c9e66be5150db3d1187
18
19 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
20 PKG_LICENSE:=LGPL-2.1-or-later
21 PKG_LICENSE_FILES:=COPYING
22 PKG_CPE_ID:=cpe:/a:paul_kranenburg:strace
23
24 PKG_FIXUP:=autoreconf
25 PKG_INSTALL:=1
26
27 PKG_CONFIG_DEPENDS := \
28 CONFIG_STRACE_LIBDW \
29 CONFIG_STRACE_LIBUNWIND
30
31 include $(INCLUDE_DIR)/package.mk
32
33 HOST_CFLAGS += -I$(LINUX_DIR)/user_headers/include
34
35 CONFIGURE_VARS+= \
36 LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
37 CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
38 CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
39 CC_FOR_BUILD="$(HOST_CC)"
40
41 define Package/strace
42 SECTION:=utils
43 CATEGORY:=Utilities
44 TITLE:=System call tracer
45 URL:=https://strace.io/
46 DEPENDS:=+STRACE_LIBDW:libdw +STRACE_LIBUNWIND:libunwind
47 endef
48
49 define Package/strace/description
50 A useful diagnostic, instructional, and debugging tool. Allows you to track what
51 system calls a program makes while it is running.
52 endef
53
54 define Package/strace/config
55 choice
56 prompt "stack tracing support"
57 default STRACE_NONE
58
59 config STRACE_NONE
60 bool "None"
61
62 config STRACE_LIBDW
63 bool "libdw"
64
65 config STRACE_LIBUNWIND
66 bool "libunwind (experimental)"
67 endchoice
68 endef
69
70 CONFIGURE_ARGS += \
71 --with-libdw=$(if $(CONFIG_STRACE_LIBDW),yes,no) \
72 --with-libunwind=$(if $(CONFIG_STRACE_LIBUNWIND),yes,no) \
73 --enable-mpers=no \
74 --without-libselinux
75
76 MAKE_FLAGS := \
77 CCOPT="$(TARGET_CFLAGS)"
78
79 define Package/strace/install
80 $(INSTALL_DIR) $(1)/usr/bin
81 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/strace $(1)/usr/bin/
82 endef
83
84 $(eval $(call BuildPackage,strace))