nuke $Id$ in /packages as well
[packages.git] / devel / oprofile / Makefile
1 #
2 # Copyright (C) 2009 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
10 PKG_NAME:=oprofile
11 PKG_VERSION:=0.9.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/oprofile/
16 PKG_MD5SUM:=82b059379895cf125261d7d773465915
17 PKG_INSTALL:=1
18 PKG_BUILD_DEPENDS:=libbfd
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/kernel.mk
22
23 define KernelPackage/oprofile
24   SUBMENU:=Other modules
25   TITLE:=OProfile profiling support
26   KCONFIG:=CONFIG_OPROFILE
27   FILES:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/oprofile/oprofile.$(LINUX_KMOD_SUFFIX)
28   DEPENDS:=@KERNEL_PROFILING
29 endef
30
31 define KernelPackage/oprofile/description
32   Kernel module for support for oprofile system profiling.
33 endef
34
35 define Package/oprofile
36   SECTION:=devel
37   CATEGORY:=Development
38   TITLE:=OProfile System Profiler
39   URL:=http://oprofile.sourceforge.net
40   DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
41 endef
42
43 define Package/oprofile/description
44  A transparent low-overhead system-wide profiler.
45 endef
46
47 define Build/Configure
48         $(call Build/Configure/Default, \
49                 --with-kernel-support \
50                 --without-x \
51         )
52 endef
53
54 define Package/oprofile/install
55         $(INSTALL_DIR) $(1)/usr/bin
56         $(INSTALL_BIN) \
57                 $(PKG_INSTALL_DIR)/usr/bin/* \
58                 $(1)/usr/bin
59
60         $(INSTALL_DIR) $(1)/usr/lib/oprofile
61         $(CP) \
62                 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
63                 $(1)/usr/lib/oprofile/
64
65         $(INSTALL_DIR) $(1)/usr/share/oprofile
66         $(CP) \
67                 $(PKG_INSTALL_DIR)/usr/share/oprofile/* \
68                 $(1)/usr/share/oprofile/
69 endef
70
71 $(eval $(call BuildPackage,oprofile))
72 $(eval $(call KernelPackage,oprofile))