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