summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD54
-rw-r--r--mingw-ga.patch24
4 files changed, 99 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bef76f868322
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = qemu-guest-agent-windows
+ pkgdesc = qemu-ga
+ pkgver = 2.10.0
+ pkgrel = 1
+ arch = any
+ license = GPL2
+ license = LGPL2.1
+ makedepends = python2
+ makedepends = mingw-w64-glib2
+ makedepends = msitools
+ source = https://download.qemu.org/qemu-2.10.0.tar.xz
+ source = mingw-ga.patch
+ md5sums = a89e3293cf69c32cf4be4188dfa25544
+ md5sums = 2e16b8e07ed9c82df1a568d311133def
+
+pkgname = qemu-guest-agent-windows
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..7e6b649a5540
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg/
+/src/
+qemu-*.tar.xz
+*.pkg*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..85135c398ef6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+pkgname=qemu-guest-agent-windows
+pkgver=2.10.0
+pkgrel=1
+pkgdesc="qemu-ga"
+pkgurl=http://wiki.qemu.org/
+license=(GPL2 LGPL2.1)
+depends=()
+arch=(any)
+makedepends=(python2 mingw-w64-glib2 msitools)
+source=(
+ https://download.qemu.org/qemu-$pkgver.tar.xz
+ mingw-ga.patch
+ # http://www.microsoft.com/en-us/download/details.aspx?id=23490 # need to download manually and extract this with wine??
+)
+
+ARCHS=(i686 x86_64)
+ARCHS_GA=(i386 x86_64)
+
+prepare() {
+ cd $srcdir/qemu-$pkgver
+ patch -p1 < $srcdir/mingw-ga.patch
+}
+
+build() {
+ cd $srcdir/qemu-$pkgver
+
+ for arch in "${ARCHS[@]}"; do
+ # can't use -mingw32-configure :(
+ LDFLAGS=
+ mingw_c_flags="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
+ export CFLAGS="$mingw_c_flags"
+ export CXXFLAGS="$mingw_c_flags"
+ ./configure \
+ --disable-system --disable-user \
+ --enable-guest-agent --enable-guest-agent-msi \
+ --python=$(which python2) \
+ --cross-prefix=$arch-w64-mingw32-
+ # --with-vss-sdk=$PATH_TO_SDK
+ make msi
+ done
+}
+
+package() {
+ installdir=/usr/share/qemu/
+ install -d $pkgdir$installdir
+
+ for arch in "${ARCHS_GA[@]}"; do
+ install -m 0644 $srcdir/qemu-$pkgver/qemu-ga-$arch.msi $pkgdir$installdir
+ done
+}
+
+# makepkg -g >> PKGBUILD
+md5sums=('a89e3293cf69c32cf4be4188dfa25544'
+ '2e16b8e07ed9c82df1a568d311133def')
diff --git a/mingw-ga.patch b/mingw-ga.patch
new file mode 100644
index 000000000000..4a9be7c70d7f
--- /dev/null
+++ b/mingw-ga.patch
@@ -0,0 +1,24 @@
+diff -ruN a/configure b/configure
+--- a/configure 2017-08-30 12:50:40.000000000 -0400
++++ b/configure 2017-09-26 18:27:30.217837292 -0400
+@@ -5138,7 +5138,7 @@
+ QEMU_GA_VERSION=$(cat $source_path/VERSION)
+ fi
+
+- QEMU_GA_MSI_MINGW_DLL_PATH="-D Mingw_dlls=$($pkg_config --variable=prefix glib-2.0)/bin"
++ QEMU_GA_MSI_MINGW_DLL_PATH="-D Mingw_dlls=$($pkg_config --variable=prefix glib-2.0)/bin -D Mingw_bin=$($pkg_config --variable=prefix glib-2.0)/bin"
+
+ case "$cpu" in
+ x86_64)
+diff -ruN a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs
+--- a/qga/installer/qemu-ga.wxs 2017-08-30 12:50:41.000000000 -0400
++++ b/qga/installer/qemu-ga.wxs 2017-09-26 18:35:30.851242393 -0400
+@@ -108,7 +108,7 @@
+ </Component>
+ <?endif?>
+ <Component Id="iconv" Guid="{35EE3558-D34B-4F0A-B8BD-430FF0775246}">
+- <File Id="iconv.dll" Name="iconv.dll" Source="$(var.Mingw_bin)/iconv.dll" KeyPath="yes" DiskId="1"/>
++ <File Id="libiconv-2.dll" Name="libiconv-2.dll" Source="$(var.Mingw_bin)/libiconv-2.dll" KeyPath="yes" DiskId="1"/>
+ </Component>
+ <Component Id="libgcc_arch_lib" Guid="{ADD4D07D-4515-4AB6-AF3E-C904961B4BB0}">
+ <File Id="libgcc_arch_lib" Name="$(var.ArchLib)" Source="$(var.Mingw_bin)/$(var.ArchLib)" KeyPath="yes" DiskId="1"/>