Fix init script install permission
[openwrt/svn-archive/archive.git] / utils / strace / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=strace
12 PKG_VERSION:=4.5.11
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=28335e15c83456a3db055a0a0efcb4fe
15
16 PKG_SOURCE_URL:=@SF/strace
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/strace
25 SECTION:=utils
26 CATEGORY:=Utilities
27 TITLE:=System call tracer
28 DESCRIPTION:=A useful diagnostic, instructional, and debugging tool. \\\
29 Allows you to track what system calls a program makes while it is \\\
30 running.
31 URL:=http://strace.sourceforge.net/
32 endef
33
34 define Build/Configure
35 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
36 $(TARGET_CONFIGURE_OPTS) \
37 CFLAGS="$(TARGET_CFLAGS)" \
38 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
39 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
40 ./configure \
41 --target=$(GNU_TARGET_NAME) \
42 --host=$(GNU_TARGET_NAME) \
43 --build=$(GNU_HOST_NAME) \
44 --program-prefix="" \
45 --program-suffix="" \
46 --prefix=/usr \
47 --exec-prefix=/usr \
48 --bindir=/usr/bin \
49 --datadir=/usr/share \
50 --includedir=/usr/include \
51 --infodir=/usr/share/info \
52 --libdir=/usr/lib \
53 --libexecdir=/usr/lib \
54 --localstatedir=/var \
55 --mandir=/usr/share/man \
56 --sbindir=/usr/sbin \
57 --sysconfdir=/etc \
58 $(DISABLE_NLS) \
59 $(DISABLE_LARGEFILE) \
60 );
61 endef
62
63 define Build/Compile
64 $(MAKE) -C $(PKG_BUILD_DIR) \
65 CC=$(TARGET_CC)
66 endef
67
68 define Package/strace/install
69 install -m0755 -d $(1)/usr/sbin
70 install -m0755 $(PKG_BUILD_DIR)/strace $(1)/usr/sbin/
71 endef
72
73 $(eval $(call BuildPackage,strace))