virt-viewer/data/Makefile.am
Daniel P. Berrangé 7bea22aece msi: record full build environment in MSI installer
For proper compliance with the GPL and other licenses we need to be
clear about exactly what toolchain and dependent packages we used in
order to build the MSI installer we distribute.

Historically we've done this by including a "deps.txt" file which
provides a list of all the mingw{32,64}-* RPMs on the host system.

This is not sufficient information, however, because the build system
will in fact use various native packages too from the toolchain too,
notably including any program run by "configure" which covers various
shell utilities, and pkg-config, and then of course make & msitools
itself.

Rather than try to figure out which subset of host RPMs are used,
just list every single host RPM that is installed.

A key implication of this is that formal release builds should always
be done in a pristine build root populated with the minimal content
required for the build.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-19 14:59:18 +00:00

101 lines
2.4 KiB
Makefile

NULL =
CLEANFILES =
MANUFACTURER = Virt Manager Project
EXTRA_DIST = \
virt-viewer.wxs.in \
$(NULL)
# this make sure those files are regenerated when they change
# (in maintainer-mode)
all-local: virt-viewer.wxs
if OS_WIN32
if HAVE_LIBVIRT
HaveLibvirt = True
else
HaveLibvirt = False
endif
if HAVE_OVIRT
HaveOVirt = True
else
HaveOVirt = False
endif
if HAVE_SPICE_GTK
HaveSpiceGtk = True
else
HaveSpiceGtk = False
endif
if HAVE_GTK_VNC
HaveGtkVnc = True
else
HaveGtkVnc = False
endif
buildenv.txt:
$(AM_V_GEN)rpm -qa | sort | unix2dos > $@
virt-viewer-$(WIXL_ARCH)-$(VERSION).msi: virt-viewer.wxs buildenv.txt
$(AM_V_GEN)DESTDIR=`mktemp -d` && \
make -C $(top_builddir) install DESTDIR=$$DESTDIR >/dev/null && \
find $$DESTDIR | wixl-heat -p $$DESTDIR$(prefix)/ \
--component-group CG.virt-viewer --var var.DESTDIR \
--directory-ref=INSTALLDIR > virt-viewer-files.wxs && \
MANUFACTURER="$(MANUFACTURER)" wixl -D SourceDir=$(prefix) \
-D DESTDIR=$$DESTDIR$(prefix) \
-D HaveSpiceGtk=$(HaveSpiceGtk) \
-D HaveGtkVnc=$(HaveGtkVnc) \
-D HaveLibvirt=$(HaveLibvirt) \
-D HaveOVirt=$(HaveOVirt) \
--arch $(WIXL_ARCH) \
-o $@ \
$< virt-viewer-files.wxs && \
rm -rf $$DESTDIR virt-viewer-files.wxs
msi: virt-viewer-$(WIXL_ARCH)-$(VERSION).msi
CLEANFILES += \
buildenv.txt \
virt-viewer-$(WIXL_ARCH)-$(VERSION).msi \
$(NULL)
else #!WIN32
desktopdir = $(datadir)/applications
DESKTOPFILES = remote-viewer.desktop.in
desktop_DATA = $(DESKTOPFILES:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
MIMEFILES = virt-viewer-mime.xml.in
mimedir = $(datadir)/mime/packages
mime_DATA = virt-viewer-mime.xml
@INTLTOOL_XML_RULE@
appdatadir = $(datadir)/appdata
APPDATAFILES = remote-viewer.appdata.xml.in
appdata_DATA = $(APPDATAFILES:.xml.in=.xml)
@INTLTOOL_XML_RULE@
install-data-hook:
if ENABLE_UPDATE_MIMEDB
@if $(AM_V_P); then set -x; else echo " INSTALL update-mime-database"; fi; \
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime";
endif
uninstall-hook:
if ENABLE_UPDATE_MIMEDB
@if $(AM_V_P); then set -x; else echo " UNINSTALL update-mime-database"; fi; \
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime";
endif
CLEANFILES += $(mime_DATA) $(desktop_DATA) $(appdata_DATA)
EXTRA_DIST += $(MIMEFILES) $(DESKTOPFILES) $(APPDATAFILES)
endif
-include $(top_srcdir)/git.mk