1
0

Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=strace
  10. PKG_VERSION:=6.3
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
  14. PKG_HASH:=e17878e301506c1cc301611118ad14efee7f8bcef63b27ace5d290acce7bb731
  15. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  16. PKG_LICENSE:=LGPL-2.1-or-later
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_CPE_ID:=cpe:/a:strace_project:strace
  19. PKG_FIXUP:=autoreconf
  20. PKG_INSTALL:=1
  21. PKG_CONFIG_DEPENDS := \
  22. CONFIG_STRACE_LIBDW \
  23. CONFIG_STRACE_LIBUNWIND
  24. include $(INCLUDE_DIR)/package.mk
  25. include $(INCLUDE_DIR)/nls.mk
  26. HOST_CFLAGS += -I$(LINUX_DIR)/user_headers/include
  27. CONFIGURE_VARS+= \
  28. LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
  29. CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
  30. CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
  31. CC_FOR_BUILD="$(HOST_CC)"
  32. define Package/strace
  33. SECTION:=utils
  34. CATEGORY:=Utilities
  35. TITLE:=System call tracer
  36. URL:=https://strace.io/
  37. DEPENDS:=+STRACE_LIBDW:libdw +STRACE_LIBUNWIND:libunwind
  38. endef
  39. define Package/strace/description
  40. A useful diagnostic, instructional, and debugging tool. Allows you to track what
  41. system calls a program makes while it is running.
  42. endef
  43. define Package/strace/config
  44. choice
  45. prompt "stack tracing support"
  46. default STRACE_NONE
  47. config STRACE_NONE
  48. bool "None"
  49. config STRACE_LIBDW
  50. bool "libdw"
  51. config STRACE_LIBUNWIND
  52. bool "libunwind (experimental)"
  53. endchoice
  54. endef
  55. CONFIGURE_ARGS += \
  56. --with-libdw=$(if $(CONFIG_STRACE_LIBDW),yes,no) \
  57. --with-libunwind=$(if $(CONFIG_STRACE_LIBUNWIND),yes,no) \
  58. --enable-mpers=no \
  59. --without-libselinux
  60. MAKE_FLAGS := \
  61. CCOPT="$(TARGET_CFLAGS)"
  62. define Package/strace/install
  63. $(INSTALL_DIR) $(1)/usr/bin
  64. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/strace $(1)/usr/bin/
  65. endef
  66. $(eval $(call BuildPackage,strace))