add a default for PKG_BUILD_DIR and PKG_INSTALL_DIR (will use KERNEL_BUILD_DIR if...
[openwrt/svn-archive/archive.git] / package / kexec-tools / 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:=kexec-tools
12 PKG_VERSION:=1.101
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.xmission.com/~ebiederm/files/kexec/
17 PKG_MD5SUM:=b4f7ffcc294d41a6a4c40d6e44b7734d
18 PKG_CAT:=zcat
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/kexec-tools
23 SECTION:=utils
24 CATEGORY:=Utilities
25 DEPENDS:=@LINUX_2_6_X86 +zlib
26 TITLE:=Kernel boots kernel
27 DESCRIPTION:=\
28 kexec is a set of systems call that allows you to load \\\
29 another kernel from the currently executing Linux kernel.
30 URL:=http://www.xmission.com/~ebiederm/files/kexec/README
31 endef
32
33 MAKE_FLAGS += \
34 DESTDIR="$(PKG_INSTALL_DIR)" \
35 EXTRA_CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
36 BUILD_CFLAGS="-O2" \
37 LIBS="$(TARGET_LDFLAGS) -lz" \
38 install
39
40 define Build/Compile
41 rm -rf $(PKG_INSTALL_DIR)
42 mkdir -p $(PKG_INSTALL_DIR)
43 $(call Build/Compile/Default,)
44 endef
45
46 define Package/kexec-tools/install
47 $(INSTALL_DIR) $(1)/usr/bin
48 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kexec $(1)/usr/bin/
49 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdump $(1)/usr/bin/
50 endef
51
52 $(eval $(call BuildPackage,kexec-tools))