You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2016 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:=qemu
  9. PKG_VERSION:=2.5.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=http://wiki.qemu-project.org/download/
  13. PKG_SOURCE_MD5SUM:=f469f2330bbe76e3e39db10e9ac4f8db
  14. PKG_LICENSE:=GPL-2.0
  15. PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
  16. PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/qemu-ga
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. TITLE:=QEMU Guest Agent
  22. URL:=http://www.qemu.org
  23. DEPENDS:=+glib2 +libpthread +libstdcpp +librt
  24. endef
  25. define Package/qemu-ga/description
  26. This package contains the QEMU Guest Agent daemon
  27. endef
  28. # QEMU configure script does not recognize these options
  29. CONFIGURE_ARGS:=$(filter-out \
  30. --target=% \
  31. --host=% \
  32. --build=% \
  33. --program-prefix=% \
  34. --program-suffix=% \
  35. --exec-prefix=% \
  36. --disable-nls \
  37. , $(CONFIGURE_ARGS))
  38. # Building qemu-ga alone does not require zlib, pixman
  39. #
  40. # --disable-tools to disable building pixman which will fail at the moment on
  41. # octeon mips64 target.
  42. CONFIGURE_ARGS += \
  43. --cross-prefix=$(TARGET_CROSS) \
  44. --host-cc="$(HOSTCC)" \
  45. --target-list='' \
  46. --disable-zlib-test \
  47. --disable-tools \
  48. --without-pixman
  49. ifneq ($(CONFIG_PACKAGE_qemu-ga),)
  50. CONFIGURE_ARGS += --enable-guest-agent
  51. endif
  52. MAKE_VARS += V=s
  53. define Build/Compile
  54. $(if $(CONFIG_PACKAGE_qemu-ga),$(call Build/Compile/Default,qemu-ga))
  55. endef
  56. define Package/qemu-ga/install
  57. $(INSTALL_DIR) $(1)/usr/bin
  58. $(INSTALL_BIN) $(PKG_BUILD_DIR)/qemu-ga $(1)/usr/bin
  59. $(INSTALL_DIR) $(1)/etc/init.d
  60. $(INSTALL_BIN) ./files/qemu-ga.init $(1)/etc/init.d/qemu-ga
  61. $(INSTALL_DIR) $(1)/etc/hotplug.d/virtio-ports
  62. $(INSTALL_BIN) ./files/virtio-ports.hotplug $(1)/etc/hotplug.d/virtio-ports/qemu-ga
  63. endef
  64. $(eval $(call BuildPackage,qemu-ga))