Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #
  2. # Copyright (C) 2006-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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=kexec-tools
  9. PKG_VERSION:=2.0.1
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/horms/kexec-tools
  13. PKG_MD5SUM:=67c1a396fdf67b984dad939a59a01571
  14. PKG_FIXUP:=libtool
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/kexec-tools
  17. SECTION:=utils
  18. CATEGORY:=Utilities
  19. DEPENDS:=@armeb||@i386||@powerpc64||@mipsel||@mips +zlib
  20. TITLE:=Kernel boots kernel
  21. URL:=http://kernel.org/pub/linux/kernel/people/horms/kexec-tools/
  22. MENU:=1
  23. endef
  24. define Package/kexec-tools/description
  25. kexec is a set of systems call that allows you to load
  26. another kernel from the currently executing Linux kernel.
  27. endef
  28. define Package/kexec-tools/config
  29. source "$(SOURCE)/kexec-config.in"
  30. endef
  31. KEXEC_TARGET_NAME:=$(call qstrip,$(CONFIG_KEXEC_TOOLS_TARGET_NAME))-linux-$(TARGET_SUFFIX)
  32. CONFIGURE_ARGS = \
  33. --target=$(KEXEC_TARGET_NAME) \
  34. --host=$(REAL_GNU_TARGET_NAME) \
  35. --build=$(GNU_HOST_NAME) \
  36. --program-prefix="" \
  37. --program-suffix="" \
  38. --prefix=/usr \
  39. --exec-prefix=/usr \
  40. --bindir=/usr/bin \
  41. --sbindir=/usr/sbin \
  42. --libexecdir=/usr/lib \
  43. --sysconfdir=/etc
  44. CONFIGURE_VARS += \
  45. BUILD_CC="$(HOSTCC)" \
  46. TARGET_CC="$(TARGET_CC)"
  47. kexec-extra-sbin-$(CONFIG_KEXEC_TOOLS_kdump) += kdump
  48. define Build/Compile
  49. $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
  50. endef
  51. define Package/kexec-tools/install
  52. $(INSTALL_DIR) $(1)/usr/sbin
  53. $(INSTALL_BIN) \
  54. $(addprefix $(PKG_INSTALL_DIR)/usr/sbin/, \
  55. $(kexec-extra-sbin-y)) \
  56. $(kexec-extra-bin-y) \
  57. $(PKG_INSTALL_DIR)/usr/sbin/kexec \
  58. $(1)/usr/sbin
  59. # make a link for compatability with other distros
  60. $(INSTALL_DIR) $(1)/sbin
  61. ln -s /usr/sbin/kexec $(1)/sbin/kexec
  62. endef
  63. $(eval $(call BuildPackage,kexec-tools))