381cc9df677ea22c6c633059db0d438431862859
[openwrt.git] / package / devel / strace / Makefile
1 #
2 # Copyright (C) 2006-2012 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
13 PKG_VERSION:=4.11
14 PKG_RELEASE:=1
15 PKG_MD5SUM:=a15d2555a7febb56d00c6e1a51c655dc
16
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
18 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
19
20 PKG_LICENSE:=BSD-3c
21 PKG_LICENSE_FILES:=COPYRIGHT
22
23 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
24
25 PKG_FIXUP:=autoreconf
26 PKG_INSTALL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 HOST_CFLAGS += -I$(LINUX_DIR)/user_headers/include
31
32 CONFIGURE_VARS+= \
33         LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
34         CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
35         CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
36         CC_FOR_BUILD="$(HOST_CC)"
37
38 define Package/strace
39   SECTION:=utils
40   CATEGORY:=Utilities
41   TITLE:=System call tracer
42   URL:=http://strace.sourceforge.net/
43 endef
44
45 define Package/strace/description
46 A useful diagnostic, instructional, and debugging tool. Allows you to track what
47 system calls a program makes while it is running.
48 endef
49
50 MAKE_FLAGS := \
51         CCOPT="$(TARGET_CFLAGS)"
52
53 define Package/strace/install
54         $(INSTALL_DIR) $(1)/usr/bin
55         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/strace $(1)/usr/bin/
56 endef
57
58 $(eval $(call BuildPackage,strace))