Blob Blame History Raw
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..c88b745
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,83 @@
+AUTOMAKE_OPTIONS = 1.7
+
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
+SUBDIRS = 						\
+	libfwupd					\
+	po						\
+	data						\
+	docs						\
+	policy						\
+	src						\
+	plugins
+
+snapshot:
+	$(MAKE) dist distdir=$(PACKAGE)-$(VERSION)-`date +"%Y%m%d"`
+
+EXTRA_DIST =						\
+	COPYING						\
+	MAINTAINERS					\
+	AUTHORS						\
+	README.md					\
+	NEWS						\
+	autogen.sh					\
+	config.h
+
+MAINTAINERCLEANFILES =					\
+	$(srcdir)/INSTALL				\
+	$(srcdir)/ABOUT-NLS				\
+	$(srcdir)/aclocal.m4				\
+	$(srcdir)/autoscan.log				\
+	$(srcdir)/compile				\
+	$(srcdir)/config.guess				\
+	$(srcdir)/config.rpath				\
+	$(srcdir)/config.h.in				\
+	$(srcdir)/config.sub				\
+	$(srcdir)/configure.scan			\
+	$(srcdir)/depcomp				\
+	$(srcdir)/install-sh				\
+	$(srcdir)/ltmain.sh				\
+	$(srcdir)/missing				\
+	$(srcdir)/mkinstalldirs				\
+	$(srcdir)/omf.make				\
+	$(srcdir)/test-driver				\
+	$(srcdir)/xmldocs.make				\
+	$(srcdir)/gtk-doc.make				\
+	$(srcdir)/ChangeLog				\
+	$(srcdir)/po/Makefile.in.in~			\
+	$(srcdir)/fwupd-*.tar.*			\
+	`find "$(srcdir)" -type f -name Makefile.in -print`
+
+DISTCHECK_CONFIGURE_FLAGS =				\
+	--enable-colorhug				\
+	--enable-uefi					\
+	--enable-dell					\
+	--with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
+	--with-bootdir=$$dc_install_base/$(bootdir) \
+	--with-systemdunitdir=$$dc_install_base/$(systemdunitdir)
+
+GITIGNOREFILES =					\
+	.tx
+
+distclean-local:
+	if test $(srdcir) = .; then :; else \
+		rm -f ChangeLog; \
+	fi
+
+ChangeLog:
+	@echo Creating $@
+	@if test -d "$(srcdir)/.git"; then \
+	  (GIT_DIR=$(top_srcdir)/.git ./missing --run git log e197d80c8937c622f21f569457d1bbd05746d951.. --stat -M -C --name-status  --date=short --no-color) | fmt --split-only > $@.tmp \
+	  && mv -f $@.tmp $@ \
+	  || ($(RM) $@.tmp; \
+	      echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
+	      (test -f $@ || echo git-log is required to generate this file >> $@)); \
+	else \
+	  test -f $@ || \
+	  (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
+	  echo A git checkout and git-log is required to generate this file >> $@); \
+	fi
+
+.PHONY: ChangeLog
+
+-include $(top_srcdir)/git.mk
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..3032530
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Copyright (C) 2015 Richard Hughes <richard@hughsie.com>
+#
+# Run this to generate all the initial makefiles, etc.
+#
+# Licensed under the GNU General Public License Version 2
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
+
+olddir=`pwd`
+cd "$srcdir"
+
+AUTORECONF=`which autoreconf`
+if test -z $AUTORECONF; then
+        echo "*** No autoreconf found, please install it ***"
+        exit 1
+fi
+
+(cd $srcdir && autopoint --force) || exit 1
+(cd $srcdir && gtkdocize) || exit 1
+(cd $srcdir && autoreconf --force --install) || exit 1
+
+cd "$olddir"
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..d53cfa4
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,431 @@
+# Copyright (C) 2015 Richard Hughes <richard@hughsie.com>
+AC_PREREQ(2.63)
+
+m4_define([fwupd_major_version], [1])
+m4_define([fwupd_minor_version], [0])
+m4_define([fwupd_micro_version], [1])
+m4_define([fwupd_version],
+          [fwupd_major_version.fwupd_minor_version.fwupd_micro_version])
+
+AC_INIT([fwupd],[fwupd_version],[https://github.com/hughsie/fwupd])
+AC_CONFIG_SRCDIR(src)
+AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-xz tar-ustar foreign subdir-objects])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+AC_PROG_LIBTOOL
+
+m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [GOBJECT_INTROSPECTION_CHECK([0.9.8])])
+AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = xyes)
+GLIB_GSETTINGS
+
+# use this in fu-version.h
+FWUPD_MAJOR_VERSION=fwupd_major_version
+FWUPD_MINOR_VERSION=fwupd_minor_version
+FWUPD_MICRO_VERSION=fwupd_micro_version
+AC_SUBST(VERSION)
+AC_SUBST(FWUPD_MAJOR_VERSION)
+AC_SUBST(FWUPD_MINOR_VERSION)
+AC_SUBST(FWUPD_MICRO_VERSION)
+
+# libtool versioning - this applies to libfwupd
+#
+# See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details
+#
+# increment;
+# CURRENT	If the API or ABI interface has changed (reset REVISION to 0)
+# REVISION	If the API and ABI remains the same, but bugs are fixed.
+# AGE		Don't use.
+LT_CURRENT=2
+LT_REVISION=0
+LT_AGE=0
+AC_SUBST(LT_CURRENT)
+AC_SUBST(LT_REVISION)
+AC_SUBST(LT_AGE)
+
+# enable nice build output on automake1.11
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+
+# check for gtk-doc
+GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
+
+AS_ALL_LINGUAS
+AC_PROG_CC_C99
+AC_PROG_INSTALL
+LT_INIT
+AM_PROG_CC_C_O
+AC_PATH_PROG(XSLTPROC, xsltproc)
+
+WARN_CFLAGS_EXTRA="
+	-D_FORTIFY_SOURCE=2
+	-fstack-protector-strong
+	-Waggregate-return
+	-Wunused
+	-Warray-bounds
+	-Wcast-align
+	-Wclobbered
+	-Wdeclaration-after-statement
+	-Wempty-body
+	-Wextra
+	-Wformat=2
+	-Wformat-nonliteral
+	-Wformat-security
+	-Wformat-signedness
+	-Wignored-qualifiers
+	-Wimplicit-function-declaration
+	-Winit-self
+	-Winline
+	-Wmissing-declarations
+	-Wmissing-format-attribute
+	-Wmissing-include-dirs
+	-Wmissing-noreturn
+	-Wmissing-parameter-type
+	-Wmissing-prototypes
+	-Wnested-externs
+	-Wno-missing-field-initializers
+	-Wno-strict-aliasing
+	-Wno-suggest-attribute=format
+	-Wno-unused-parameter
+	-Wold-style-definition
+	-Woverride-init
+	-Wpointer-arith
+	-Wredundant-decls
+	-Wreturn-type
+	-Wshadow
+	-Wsign-compare
+	-Wstrict-aliasing
+	-Wstrict-prototypes
+	-Wswitch-default
+	-Wtype-limits
+	-Wundef
+	-Wuninitialized
+	-Wunused-but-set-variable
+	-Wwrite-strings"
+AX_APPEND_COMPILE_FLAGS([$WARN_CFLAGS_EXTRA], [WARN_CFLAGS])
+AC_SUBST(WARN_CFLAGS)
+
+# internationalization
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.19.8])
+AC_SUBST([GETTEXT_PACKAGE], [fwupd])
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
+
+# check for PIE (position independent executable) support
+if test x$with_pic != xno; then
+	AX_CHECK_COMPILE_FLAG([-fPIE],
+			      [AX_CHECK_LINK_FLAG([-fPIE -pie],
+						  [PIE_CFLAGS="-fPIE" PIE_LDFLAGS="-pie"])])
+	AC_SUBST(PIE_CFLAGS)
+	AC_SUBST(PIE_LDFLAGS)
+fi
+
+# check for full RELRO (relocation read-only) support
+AX_CHECK_LINK_FLAG([-Wl,-z,relro,-z,now],
+		   [RELRO_LDFLAGS="-Wl,-z,relro,-z,now"])
+AC_SUBST([RELRO_LDFLAGS])
+
+# use -lm
+LT_LIB_M
+AC_SUBST(LIBM)
+
+dnl ---------------------------------------------------------------------------
+dnl - Check library dependencies
+dnl ---------------------------------------------------------------------------
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.45.8 gobject-2.0 gthread-2.0 gio-2.0 >= 2.25.9 gio-unix-2.0 gmodule-2.0)
+PKG_CHECK_MODULES(GUDEV, gudev-1.0)
+PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.103)
+PKG_CHECK_MODULES(GCAB, libgcab-1.0)
+PKG_CHECK_MODULES(APPSTREAM_GLIB, appstream-glib >= 0.5.10)
+PKG_CHECK_MODULES(GUSB, gusb >= 0.2.9)
+PKG_CHECK_MODULES(SQLITE, sqlite3)
+PKG_CHECK_MODULES(ARCHIVE, libarchive)
+PKG_CHECK_MODULES(UUID, uuid)
+PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.51.92)
+PKG_CHECK_MODULES(VALGRIND, valgrind,
+		  has_valgrind=yes,
+		  has_valgrind=no)
+if test x$has_valgrind = xyes; then
+	AC_DEFINE(HAVE_VALGRIND,1,
+	          [Define as 1 if you have valgrind])
+else
+	has_valgrind=no
+fi
+
+PKG_CHECK_MODULES([GUDEV_232], [gudev-1.0 >= 232],
+                  [have_gudev_232=yes], [have_gudev_232=no])
+AS_IF([test "$have_gudev_232" = "yes"], [
+	AC_DEFINE([HAVE_GUDEV_232],[1],
+	          [Define as 1 if you have gudev >= 232])
+])
+
+AC_PATH_PROG(DOCBOOK2MAN, docbook2man)
+if test -z $DOCBOOK2MAN ; then
+	AC_MSG_ERROR([docbook2man program not found])
+fi
+
+AC_PATH_PROG(GCAB, [gcab], [no])
+if test -z $GCAB ; then
+	AC_MSG_ERROR([gcab program not found])
+fi
+
+# 0.114 introduced autocleanup functions for its types.
+PKG_CHECK_MODULES([POLKIT_0_114], [polkit-gobject-1 >= 0.114],
+                  [have_polkit_0_114=yes], [have_polkit_0_114=no])
+AS_IF([test "$have_polkit_0_114" = "yes"], [
+	AC_DEFINE([HAVE_POLKIT_0_114],[1],
+	          [Define as 1 if you have polkit >= 0.114])
+])
+
+# ColorHug support
+AC_ARG_ENABLE(colorhug,
+	      AS_HELP_STRING([--enable-colorhug],
+			     [Enable ColorHug support [default=auto]]),,
+	      enable_colorhug=maybe)
+if test x$enable_colorhug != xno; then
+	PKG_CHECK_MODULES(COLORHUG, colorhug >= 1.2.12,
+			  has_colorhug=yes,
+			  has_colorhug=no)
+fi
+if test x$has_colorhug = xyes; then
+	AC_DEFINE(HAVE_COLORHUG,1,[Use ColorHug support])
+else
+	has_colorhug=no
+	if test "x$enable_colorhug" = "xyes"; then
+		AC_MSG_ERROR([colorhug support requested but 'libcolorhug-dev' was not found])
+	fi
+fi
+AM_CONDITIONAL(HAVE_COLORHUG, test x$has_colorhug = xyes)
+
+# Thunderbolt support
+AC_ARG_ENABLE(thunderbolt,
+	      AS_HELP_STRING([--enable-thunderbolt],
+			     [Enable Thunderbolt support [default=auto]]),,
+	      enable_thunderbolt=yes)
+AM_CONDITIONAL(HAVE_THUNDERBOLT, test x$enable_thunderbolt = xyes)
+
+# USB fallback support
+AC_ARG_ENABLE(usb_fallback,
+	      AS_HELP_STRING([--enable-usb_fallback],
+			     [Enable USB fallback support [default=auto]]),,
+	      enable_usb_fallback=no)
+AM_CONDITIONAL(ENABLE_USB_FALLBACK, test x$enable_usb_fallback = xyes)
+
+# libelf support
+AC_ARG_ENABLE(libelf,
+	      AS_HELP_STRING([--enable-libelf],
+			     [Enable libelf support [default=auto]]),,
+	      enable_libelf=maybe)
+if test x$enable_libelf != xno; then
+	PKG_CHECK_MODULES(ELF, libelf,
+			  has_libelf=yes,
+			  has_libelf=no)
+fi
+if test x$has_libelf = xyes; then
+	AC_DEFINE(HAVE_LIBELF,1,[Use libelf support])
+else
+	has_libelf=no
+	if test "x$enable_libelf" = "xyes"; then
+		AC_MSG_ERROR([libelf support requested but 'libelf' was not found])
+	fi
+fi
+AM_CONDITIONAL(HAVE_LIBELF, test x$has_libelf = xyes)
+
+# PKCS7 support
+AC_ARG_ENABLE(pkcs7,
+	      AS_HELP_STRING([--enable-pkcs7],
+			     [Enable PKCS7 support [default=yes]]),,
+	      enable_pkcs7=yes)
+if test x$enable_pkcs7 != xno; then
+	PKG_CHECK_MODULES(GNUTLS, gnutls)
+	AC_DEFINE(ENABLE_PKCS7,1,[Use PKCS7 support])
+fi
+AM_CONDITIONAL(ENABLE_PKCS7, test x$enable_pkcs7 = xyes)
+
+# GPG support
+AC_ARG_ENABLE(gpg,
+	      AS_HELP_STRING([--enable-gpg],
+			     [Enable GPG support [default=yes]]),,
+	      enable_gpg=yes)
+if test x$enable_gpg != xno; then
+	AC_MSG_CHECKING([for gpgme])
+	if ! test -x "/usr/bin/gpgme-config"; then
+		AC_MSG_ERROR([Cannot locate gpgme])
+	else
+		AC_MSG_RESULT([yes])
+		GPGME_CFLAGS="`\"/usr/bin/gpgme-config\" --cflags`"
+		GPGME_LIBS="`\"/usr/bin/gpgme-config\" --libs`"
+		GPGME_CFLAGS+=" `\"/usr/bin/gpg-error-config\" --cflags`"
+		GPGME_LIBS+=" `\"/usr/bin/gpg-error-config\" --libs`"
+		AC_SUBST([GPGME_CFLAGS])
+		AC_SUBST([GPGME_LIBS])
+	fi
+	AC_DEFINE(ENABLE_GPG,1,[Use GPG support])
+fi
+AM_CONDITIONAL(ENABLE_GPG, test x$enable_gpg = xyes)
+
+# UEFI support
+AC_ARG_ENABLE(uefi,
+	      AS_HELP_STRING([--enable-uefi],
+	      [Enable UEFI support [default=auto]]),,
+	      enable_uefi=maybe)
+if test x$enable_uefi != xno; then
+	PKG_CHECK_MODULES(UEFI, fwup >= 0.5,
+			  has_fwup=yes,
+			  has_fwup=no)
+	PKG_CHECK_MODULES(EFIVAR, efivar,
+			  has_efivar=yes,
+			  has_efivar=no)
+fi
+if test x$has_fwup = xyes; then
+	AC_DEFINE(HAVE_UEFI,1,[Use UEFI support])
+	# check for ability to unlock
+	PKG_CHECK_MODULES(UEFI_UNLOCK, fwup >= 5,
+			  has_uefi_unlock=yes,
+			  has_uefi_unlock=no)
+	if test x$has_uefi_unlock = xyes; then
+		AC_DEFINE(HAVE_UEFI_UNLOCK,1,[Use UEFI unlock support])
+	fi
+else
+	has_fwup=no
+	if test "x$enable_uefi" = "xyes"; then
+		AC_MSG_ERROR([UEFI support requested but 'libfwup-dev' was not found])
+	fi
+fi
+AM_CONDITIONAL(HAVE_UEFI, test x$has_fwup = xyes)
+
+# Dell Non ESRT capsule support
+AC_ARG_ENABLE(dell,
+	      AS_HELP_STRING([--enable-dell],
+	      [Enable Dell non-ESRT capsule support]),,
+	      enable_dell=maybe)
+if test x$enable_dell != xno; then
+	PKG_CHECK_MODULES(LIBSMBIOS, libsmbios_c >= 2.3.0,
+			  has_libsmbios=yes,
+			  has_libsmbios=no)
+	PKG_CHECK_MODULES(EFIVAR, efivar,
+			  has_efivar=yes,
+			  has_efivar=no)
+fi
+if test x$has_libsmbios = xyes &&
+   test x$has_efivar = xyes &&
+   test x$has_fwup = xyes; then
+	AC_DEFINE(HAVE_DELL,1,[Use Dell non-ESRT capsule support])
+	has_dell=yes
+	# check for ability to change GUID
+	PKG_CHECK_MODULES(UEFI_GUID, fwup >= 5,
+			  has_uefi_guid=yes,
+			  has_uefi_guid=no)
+	if test x$has_uefi_guid = xyes; then
+		AC_DEFINE(HAVE_UEFI_GUID,1,[Use UEFI GUID override])
+	fi
+else
+	has_dell=no
+	if test "x$enable_dell" = "xyes"; then
+		if test x$enable_uefi = xno; then
+			AC_MSG_ERROR([Dell support requested but UEFI support explicitly disabled])
+		fi
+		if test x$has_libsmbios = xno; then
+			AC_MSG_ERROR([Dell support requested but 'libsmbios-dev' was not found])
+		fi
+		if test x$has_efivar = xno; then
+			AC_MSG_ERROR([Dell support requested but 'libefivar-dev' was not found])
+		fi
+		if test x$has_fwup = xno; then
+			AC_MSG_ERROR([Dell support requested but 'libfwup-dev' was not found])
+		fi
+	fi
+fi
+AM_CONDITIONAL(HAVE_DELL, test x$has_dell = xyes)
+
+# Synaptics mst support
+AC_ARG_ENABLE(synaptics,
+	      AS_HELP_STRING([--enable-synaptics],
+	      [Enable Synaptics MST hub support]),,
+	      enable_synaptics=yes)
+if test x$enable_synaptics != xno; then
+	AC_DEFINE(HAVE_SYNAPTICS,1,[Use Synaptics MST hub  support])
+fi
+AM_CONDITIONAL(HAVE_SYNAPTICS, test x$enable_synaptics = xyes)
+
+# systemd support
+AC_ARG_WITH([systemdunitdir],
+            AS_HELP_STRING([--with-systemdunitdir=DIR], [Directory for systemd service files]),
+            [],
+            [with_systemdunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+AC_SUBST([systemdunitdir], [$with_systemdunitdir])
+
+# EFI system partition location
+AC_ARG_WITH([bootdir],
+            AS_HELP_STRING([--with-bootdir=DIR], [Directory for EFI system partition]),
+            [],
+            [with_bootdir=/boot/efi])
+AC_SUBST([bootdir], [$with_bootdir])
+
+# udev rules
+AC_ARG_WITH([udevrulesdir],
+            AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules files]),
+            [],
+            [with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)/rules.d])
+AC_SUBST([udevrulesdir], [$with_udevrulesdir])
+
+dnl ---------------------------------------------------------------------------
+dnl - Makefiles, etc.
+dnl ---------------------------------------------------------------------------
+AC_CONFIG_FILES([
+Makefile
+libfwupd/fwupd-version.h
+libfwupd/fwupd.pc
+libfwupd/Makefile
+data/Makefile
+data/pki/Makefile
+data/builder/Makefile
+data/remotes.d/Makefile
+data/tests/Makefile
+data/tests/colorhug/Makefile
+docs/Makefile
+docs/libfwupd/Makefile
+policy/Makefile
+po/Makefile.in
+src/Makefile
+plugins/Makefile
+plugins/altos/Makefile
+plugins/amt/Makefile
+plugins/colorhug/Makefile
+plugins/dell/Makefile
+plugins/dfu/Makefile
+plugins/ebitdo/Makefile
+plugins/raspberrypi/Makefile
+plugins/raspberrypi/rpiupdate/Makefile
+plugins/steelseries/Makefile
+plugins/synapticsmst/Makefile
+plugins/test/Makefile
+plugins/thunderbolt/Makefile
+plugins/thunderbolt-power/Makefile
+plugins/udev/Makefile
+plugins/uefi/Makefile
+plugins/unifying/Makefile
+plugins/upower/Makefile
+plugins/usb/Makefile
+])
+AC_OUTPUT
+
+dnl ==========================================================================
+echo "
+                    fwupd $VERSION
+                  =================
+
+        prefix:                    ${prefix}
+        datadir:                   ${datadir}
+        compiler:                  ${CC}
+        cflags:                    ${CFLAGS}
+        cppflags:                  ${CPPFLAGS}
+
+	optional plugins
+	------------------
+	Colorhug:                  $has_colorhug
+	libelf:                    $has_libelf
+	UEFI:                      $has_fwup
+	Dell:                      $has_dell
+	Synaptics MST:             $enable_synaptics
+	Thunderbolt:               $enable_thunderbolt
+	USB fallback:              $enable_usb_fallback
+"
diff --git a/data/Makefile.am b/data/Makefile.am
new file mode 100644
index 0000000..59e34ac
--- /dev/null
+++ b/data/Makefile.am
@@ -0,0 +1,51 @@
+SUBDIRS = tests pki builder remotes.d
+
+dbusdir = $(sysconfdir)/dbus-1/system.d
+dist_dbus_DATA = org.freedesktop.fwupd.conf
+
+remotesdir = $(datadir)/fwupd/remotes.d/fwupd
+dist_remotes_DATA = metadata.xml
+
+dbusservicemaindir = $(datadir)/dbus-1/system-services
+dbusservicemain_in_files = org.freedesktop.fwupd.service.in
+dbusservicemain_DATA     = $(dbusservicemain_in_files:.service.in=.service)
+$(dbusservicemain_DATA): $(dbusservicemain_in_files) Makefile
+	@sed -e "s|\@servicedir\@|$(libexecdir)|" $< | \
+	sed -e "s|\@daemon_user\@|$(daemon_user)|" > $@
+
+configdir = $(sysconfdir)/fwupd
+dist_config_DATA = daemon.conf
+
+metainfodir = $(datadir)/metainfo
+dist_metainfo_DATA = org.freedesktop.fwupd.metainfo.xml
+
+%.service: %.service.in Makefile
+	$(AM_V_GEN)sed -e 's|\@libexecdir\@|$(libexecdir)|' \
+	               -e 's|\@localstatedir\@|$(localstatedir)|' \
+	               -e 's|\@bootdir\@|$(bootdir)|' \
+	               -e 's|\@bindir\@|$(bindir)|' \
+	               -e 's|\@daemon_user\@|$(daemon_user)|' $< > $@.tmp && mv $@.tmp $@
+
+systemdservicedir = $(systemdunitdir)
+systemdservice_in_files =				\
+	fwupd.service.in				\
+	fwupd-offline-update.service.in
+systemdservice_DATA = $(systemdservice_in_files:.service.in=.service)
+
+install-data-hook:
+	$(MKDIR_P) $(DESTDIR)$(systemdunitdir)/system-update.target.wants
+	ln -sf ../fwupd-offline-update.service $(DESTDIR)$(systemdunitdir)/system-update.target.wants/fwupd-offline-update.service
+
+udevrules_DATA =					\
+	90-fwupd-devices.rules
+
+EXTRA_DIST =						\
+	$(udevrules_DATA)				\
+	$(dbusservicemain_in_files)			\
+	$(systemdservice_in_files)
+
+DISTCLEANFILES =					\
+	$(dbusservicemain_DATA)				\
+	$(systemdservice_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/builder/Makefile.am b/data/builder/Makefile.am
new file mode 100644
index 0000000..d82bdcd
--- /dev/null
+++ b/data/builder/Makefile.am
@@ -0,0 +1,4 @@
+builderdir = $(localstatedir)/lib/fwupd/builder
+dist_builder_DATA = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/data/pki/Makefile.am b/data/pki/Makefile.am
new file mode 100644
index 0000000..a9d9d30
--- /dev/null
+++ b/data/pki/Makefile.am
@@ -0,0 +1,28 @@
+pkidir = $(sysconfdir)/pki/fwupd
+dist_pki_DATA =
+
+if ENABLE_GPG
+dist_pki_DATA +=							\
+	GPG-KEY-Hughski-Limited						\
+	GPG-KEY-Linux-Vendor-Firmware-Service
+endif
+
+if ENABLE_PKCS7
+dist_pki_DATA +=							\
+	LVFS-CA.pem
+endif
+
+pkimetadatadir = $(sysconfdir)/pki/fwupd-metadata
+dist_pkimetadata_DATA =
+
+if ENABLE_GPG
+dist_pkimetadata_DATA +=						\
+	GPG-KEY-Linux-Vendor-Firmware-Service
+endif
+
+if ENABLE_PKCS7
+dist_pkimetadata_DATA +=						\
+	LVFS-CA.pem
+endif
+
+-include $(top_srcdir)/git.mk
diff --git a/data/remotes.d/Makefile.am b/data/remotes.d/Makefile.am
new file mode 100644
index 0000000..b933c78
--- /dev/null
+++ b/data/remotes.d/Makefile.am
@@ -0,0 +1,19 @@
+remotes2dir = $(sysconfdir)/fwupd/remotes.d
+dist_remotes2_DATA = lvfs.conf lvfs-testing.conf
+
+vendordir = $(datadir)/fwupd/remotes.d/vendor/firmware
+dist_vendor_DATA = README.md
+
+remotesdir = $(sysconfdir)/fwupd/remotes.d
+remotes_in_files = fwupd.conf.in vendor.conf.in
+remotes_DATA     = $(remotes_in_files:.conf.in=.conf)
+$(remotes_DATA): $(remotes_in_files) Makefile
+	$(AM_V_GEN)sed -e 's|\@datadir\@|$(datadir)|' $< > $@.tmp && mv $@.tmp $@
+
+EXTRA_DIST =						\
+	$(remotes_in_files)
+
+DISTCLEANFILES =					\
+	$(remotes_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/remotes.d/fwupd.conf b/data/remotes.d/fwupd.conf.in
similarity index 100%
rename from data/remotes.d/fwupd.conf
rename to data/remotes.d/fwupd.conf.in
diff --git a/data/remotes.d/vendor.conf b/data/remotes.d/vendor.conf.in
similarity index 100%
rename from data/remotes.d/vendor.conf
rename to data/remotes.d/vendor.conf.in
diff --git a/data/tests/Makefile.am b/data/tests/Makefile.am
new file mode 100644
index 0000000..7cb0a18
--- /dev/null
+++ b/data/tests/Makefile.am
@@ -0,0 +1,7 @@
+SUBDIRS = colorhug
+
+test_files = pki/GPG-KEY-Linux-Vendor-Firmware-Service
+
+EXTRA_DIST = $(test_files)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/tests/colorhug/Makefile.am b/data/tests/colorhug/Makefile.am
new file mode 100644
index 0000000..e1cb36e
--- /dev/null
+++ b/data/tests/colorhug/Makefile.am
@@ -0,0 +1,23 @@
+test_files =								\
+	colorhug-als-3.0.2.cab
+
+colorhug-als-3.0.2.cab: firmware.bin firmware.bin.asc firmware.metainfo.xml
+	$(AM_V_GEN) touch -c -m -d"2000-01-01T00:00:00" $?;		\
+	$(GCAB) --create --nopath $@					\
+		$(srcdir)/firmware.bin					\
+		$(srcdir)/firmware.bin.asc				\
+		$(srcdir)/firmware.metainfo.xml
+
+BUILT_SOURCES =								\
+	colorhug-als-3.0.2.cab
+
+CLEANFILES =								\
+	$(BUILT_SOURCES)
+
+EXTRA_DIST =								\
+	$(test_files)							\
+	firmware.bin							\
+	firmware.bin.asc						\
+	firmware.metainfo.xml
+
+-include $(top_srcdir)/git.mk
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..7137548
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1,7 @@
+SUBDIRS = 						\
+	libfwupd
+
+EXTRA_DIST =						\
+	dfu-metadata-store.md
+
+-include $(top_srcdir)/git.mk
diff --git a/docs/libfwupd/Makefile.am b/docs/libfwupd/Makefile.am
new file mode 100644
index 0000000..79a4616
--- /dev/null
+++ b/docs/libfwupd/Makefile.am
@@ -0,0 +1,95 @@
+# This is a blank Makefile.am for using gtk-doc.
+# Copy this to your project's API docs directory and modify the variables to
+# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
+# of using the various options.
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE=libfwupd
+
+# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
+#DOC_MODULE_VERSION=2
+
+# The top-level XML file.
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
+
+# Directories containing the source code.
+# gtk-doc will search all .c and .h files beneath these paths
+# for inline comments documenting functions and macros.
+# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk
+DOC_SOURCE_DIR=$(top_srcdir)/libfwupd $(top_builddir)/libfwupd
+
+# Extra options to pass to gtkdoc-scangobj. Normally not needed.
+SCANGOBJ_OPTIONS=
+
+# Extra options to supply to gtkdoc-scan.
+# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
+SCAN_OPTIONS=
+
+# Extra options to supply to gtkdoc-mkdb
+# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml
+MKDB_OPTIONS=--xml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-mkhtml
+MKHTML_OPTIONS=
+
+# Extra options to supply to gtkdoc-fixref. Normally not needed.
+# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
+FIXXREF_OPTIONS=
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
+# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
+HFILE_GLOB=$(top_srcdir)/libfwupd/*.h
+CFILE_GLOB=$(top_srcdir)/libfwupd/*.c
+
+# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
+# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
+EXTRA_HFILES=
+
+# Header files or dirs to ignore when scanning. Use base file/dir names
+# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
+IGNORE_HFILES=							\
+	fwupd-enums-private.h
+
+# Images to copy into HTML directory.
+# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
+HTML_IMAGES=
+
+# Extra files that are included by $(DOC_MAIN_SGML_FILE).
+# e.g. content_files=running.xml building.xml changes-2.0.xml
+content_files=
+
+# Files where gtk-doc abbrevations (#GtkWidget) are expanded
+# e.g. expand_content_files=running.xml
+expand_content_files=
+
+# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
+# Only needed if you are using gtkdoc-scangobj to dynamically query widget
+# signals and properties.
+# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
+# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
+GTKDOC_CFLAGS=
+GTKDOC_LIBS=$(top_builddir)/libfwupd/libfwupd.la
+
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+include $(top_srcdir)/gtk-doc.make
+
+# Comment this out if you want 'make check' to test you doc status
+# and run some sanity checks
+#if ENABLE_GTK_DOC
+#TESTS_ENVIRONMENT = \
+#  DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
+#  SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
+#TESTS = $(GTKDOC_CHECK)
+#endif
+
+CLEANFILES=						\
+	libfwupd.args					\
+	libfwupd.hierarchy				\
+	libfwupd.interfaces				\
+	libfwupd.prerequisites				\
+	libfwupd.signals					\
+	libfwupd-*.txt					\
+	*.stamp
+
+-include $(top_srcdir)/git.mk
diff --git a/docs/libfwupd/clean.sh b/docs/libfwupd/clean.sh
old mode 100644
new mode 100755
diff --git a/docs/libfwupd/libfwupd-docs.xml b/docs/libfwupd/libfwupd-docs.xml
index 1f46e7f..974ddd1 100644
--- a/docs/libfwupd/libfwupd-docs.xml
+++ b/docs/libfwupd/libfwupd-docs.xml
@@ -34,312 +34,6 @@
     <xi:include href="xml/fwupd-version.xml"/>
   </reference>
 
-  <reference id="plugin-reference">
-    <title>Plugin Reference</title>
-    <partintro>
-      <para>
-        Functionality available to plugins.
-      </para>
-    </partintro>
-    <xi:include href="xml/fu-plugin.xml"/>
-    <xi:include href="xml/fu-device.xml"/>
-    <xi:include href="xml/fu-device-locker.xml"/>
-    <xi:include href="xml/fu-common.xml"/>
-    <xi:include href="xml/fu-quirks.xml"/>
-    <xi:include href="xml/fu-device-metadata.xml"/>
-  </reference>
-
-  <reference id="tutorial">
-    <title>Plugin Tutorial</title>
-    <partintro>
-      <section>
-        <title>Introduction</title>
-        <para>
-          At the heart of fwupd is a plugin loader that gets run at startup,
-          when devices get hotplugged and when updates are done.
-          The idea is we have lots of small plugins that each do one thing, and
-          are ordered by dependencies against each other at runtime.
-          Using plugins we can add support for new hardware or new policies
-          without making big changes all over the source tree.
-        </para>
-        <para>
-          There are broadly 3 types of plugin methods:
-        </para>
-        <itemizedlist>
-          <listitem>
-            <para>
-              <emphasis role="strong">Mechanism</emphasis>: Upload binary data
-              into a specific hardware device.
-            </para>
-          </listitem>
-          <listitem>
-            <para>
-              <emphasis role="strong">Policy</emphasis>: Control the system when
-              updates are happening, e.g. preventing the user from powering-off.
-            </para>
-          </listitem>
-          <listitem>
-            <para>
-              <emphasis role="strong">Helpers</emphasis>: Providing more
-              metadata about devices, for instance handling device quirks.
-            </para>
-          </listitem>
-        </itemizedlist>
-        <para>
-          In general, building things out-of-tree isn't something that we think is
-          a very good idea; the API and ABI <emphasis>internal</emphasis> to fwupd is still
-          changing and there's a huge benefit to getting plugins upstream where
-          they can undergo review and be ported as the API adapts.
-          For this reason we don't install the plugin headers onto the system,
-          although you can of course just install the <code>.so</code> binary file
-          manually.
-        </para>
-
-        <para>
-          A plugin only needs to define the vfuncs that are required, and the
-          plugin name is taken automatically from the suffix of the
-          <filename>.so</filename> file.
-        </para>
-        <example>
-          <title>A sample plugin</title>
-          <programlisting>
-/*
- * Copyright (C) 2017 Richard Hughes
- */
-
-#include &lt;fu-plugin.h&gt;
-#include &lt;fu-plugin-vfuncs.h&gt;
-
-struct FuPluginData {
- gpointer proxy;
-};
-
-void
-fu_plugin_initialize (FuPlugin *plugin)
-{
-  fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_RUN_BEFORE, "dfu");
-  fu_plugin_alloc_data (plugin, sizeof (FuPluginData));
-}
-
-void
-fu_plugin_destroy (FuPlugin *plugin)
-{
-  FuPluginData *data = fu_plugin_get_data (plugin);
-  destroy_proxy (data->proxy);
-}
-
-gboolean
-fu_plugin_startup (FuPlugin *plugin, GError **error)
-{
-  FuPluginData *data = fu_plugin_get_data (plugin);
-  data->proxy = create_proxy ();
-  if (data->proxy == NULL) {
-    g_set_error (error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED,
-                 "failed to create proxy");
-    return FALSE;
-  }
-  return TRUE;
-}
-          </programlisting>
-        </example>
-
-        <para>
-          We have to define when our plugin is run in reference to other plugins,
-          in this case, making sure we run before the <code>dfu</code> plugin.
-          For most plugins it does not matter in what order they are run and
-          this information is not required.
-        </para>
-      </section>
-
-      <section>
-        <title>Creating an abstact device</title>
-        <para>
-          This section shows how you would create a device which is exported
-          to the daemon and thus can be queried and updated by the client software.
-          The example here is all hardcoded, and a true plugin would have to
-          derive the details about the <code>FuDevice</code> from the hardware,
-          for example reading data from <code>sysfs</code> or <code>/dev</code>.
-        </para>
-        <example>
-          <title>Example adding a custom device</title>
-          <programlisting>
-#include &lt;fu-plugin.h&gt;
-
-gboolean
-fu_plugin_coldplug (FuPlugin *plugin, GError **error)
-{
-  g_autoptr(FuDevice) dev = NULL;
-  fu_device_set_id (dev, "dummy-1:2:3");
-  fu_device_add_guid (dev, "2d47f29b-83a2-4f31-a2e8-63474f4d4c2e");
-  fu_device_set_version (dev, "1.2.3");
-  fu_device_get_version_lowest (dev, "1.2.2");
-  fu_device_get_version_bootloader (dev, "0.1.2");
-  fu_device_add_icon (dev, "computer");
-  fu_device_add_flag (dev, FWUPD_DEVICE_FLAG_UPDATABLE);
-  fu_plugin_device_add (plugin, dev);
-  return TRUE;
-}
-          </programlisting>
-        </example>
-        <para>
-          This shows a lot of the plugin architecture in action. Some notable points:
-        </para>
-        <itemizedlist>
-          <listitem>
-            <para>
-              The device ID (<code>dummy-1:2:3</code>) has to be unique on the
-              system between all plugins, so including the plugin name as a
-              prefix is probably a good idea.
-            </para>
-          </listitem>
-          <listitem>
-            <para>
-              The GUID value can be generated automatically using
-              <code>fu_device_add_guid(dev,"some-identifier")</code> but is quoted
-              here explicitly.
-              The GUID value has to match the <code>provides</code> value in the
-              <code>.metainfo.xml</code> file for the firmware update to succeed.
-            </para>
-          </listitem>
-          <listitem>
-            <para>
-              Setting a display name and an icon is a good idea in case the
-              GUI software needs to display the device to the user.
-              Icons can be specified using a full path, although icon theme names
-              should be preferred for most devices.
-            </para>
-          </listitem>
-          <listitem>
-            <para>
-              The <code>FWUPD_DEVICE_FLAG_UPDATABLE</code> flag tells the client
-              code that the device is in a state where it can be updated.
-              If the device needs to be in a special mode (e.g. a bootloader) then
-              the <code>FWUPD_DEVICE_FLAG_NEEDS_BOOTLOADER</code> flag can also be
-              used.
-              If the update should only be allowed when there is AC power available
-              to the computer (i.e. not on battery) then
-              <code>FWUPD_DEVICE_FLAG_REQUIRE_AC</code> should be used as well.
-              There are other flags and the API documentation should be used when
-              choosing what flags to use for each kind of device.
-            </para>
-          </listitem>
-          <listitem>
-            <para>
-              Setting the lowest allows client software to refuse downgrading
-              the device to specific versions.
-              This is required in case the upgrade migrates some kind of data-store
-              so as to be incompatible with previous versions.
-              Similarly, setting the version of the bootloader (if known) allows
-              the firmware to depend on a specific bootloader version, for instance
-              allowing signed firmware to only be installable on hardware with
-              a bootloader new enough to deploy it
-            </para>
-          </listitem>
-        </itemizedlist>
-      </section>
-
-      <section>
-        <title>Mechanism Plugins</title>
-        <para>
-          Although it would be a wonderful world if we could update all hardware
-          using a standard shared protocol this is not the universe we live in.
-          Using a mechanism like DFU or UpdateCapsule means that fwupd will just
-          work without requiring any special code, but for the real world we need
-          to support vendor-specific update protocols with layers of backwards
-          compatibility.
-        </para>
-        <para>
-          When a plugin has created a device that is <code>FWUPD_DEVICE_FLAG_UPDATABLE</code>
-          we can ask the daemon to update the device with a suitable
-          <code>.cab</code> file.
-          When this is done the daemon checks the update for compatibility with
-          the device, and then calls the vfuncs to update the device.
-        </para>
-
-        <example>
-          <title>Updating a device</title>
-          <programlisting>
-gboolean
-fu_plugin_update (FuPlugin *plugin,
-                  FuDevice *dev,
-                  GBytes *blob_fw,
-                  FwupdInstallFlags flags,
-                  GError **error)
-{
-  gsize sz = 0;
-  guint8 *buf = g_bytes_get_data (blob_fw, &amp;sz);
-  /* write 'buf' of size 'sz' to the hardware */
-  return TRUE;
-}
-          </programlisting>
-        </example>
-        <para>
-          It's important to note that the <code>blob_fw</code> is the binary
-          firmware file (e.g. <code>.dfu</code>) and <emphasis role="strong">not</emphasis>
-          the <code>.cab</code> binary data.
-        </para>
-        <para>
-          If <code>FWUPD_INSTALL_FLAG_FORCE</code> is used then the usual checks
-          done by the flashing process can be relaxed (e.g. checking for quirks),
-          but please don't brick the users hardware even if they ask you to.
-        </para>
-      </section>
-
-      <section>
-        <title>Policy Helpers</title>
-        <para>
-          For some hardware, we might want to do an action before or after
-          the actual firmware is squirted into the device.
-          This could be something as simple as checking the system battery
-          level is over a certain theshold, or it could be as complicated as
-          ensuring a vendor-specific GPIO is asserted when specific types
-          of hardware are updated.
-        </para>
-
-        <example>
-          <title>Running before a device update</title>
-          <programlisting>
-gboolean
-fu_plugin_update_prepare (FuPlugin *plugin, FuDevice *device, GError **error)
-{
-  if (fu_device_has_flag (device, FWUPD_DEVICE_FLAG_REQUIRE_AC &amp;&amp; !on_ac_power ()) {
-    g_set_error_literal (error,
-                         FWUPD_ERROR,
-                         FWUPD_ERROR_AC_POWER_REQUIRED,
-                         "Cannot install update "
-                         "when not on AC power");
-    return FALSE;
-  }
-  return TRUE;
-}
-          </programlisting>
-        </example>
-        <example>
-          <title>Running after a device update</title>
-          <programlisting>
-gboolean
-fu_plugin_update_cleanup (FuPlugin *plugin, FuDevice *device, GError **error)
-{
-  return g_file_set_contents ("/var/lib/fwupd/something",
-                              fu_device_get_id (device), -1, error);
-}
-          </programlisting>
-        </example>
-      </section>
-
-      <section>
-        <title>The Plugin Object Cache</title>
-        <para>
-          The fwupd daemon provides a per-plugin cache which allows objects
-          to be added, removed and queried using a specified key.
-          Objects added to the cache must be <code>GObject</code>s to enable the
-          cache objects to be properly refcounted.
-        </para>
-      </section>
-
-    </partintro>
-  </reference>
-
   <index id="api-index-full">
     <title>API Index</title>
     <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
diff --git a/docs/libfwupd/libfwupd.types b/docs/libfwupd/libfwupd.types
index 0fbcf81..26b4143 100644
--- a/docs/libfwupd/libfwupd.types
+++ b/docs/libfwupd/libfwupd.types
@@ -1,6 +1,4 @@
 fwupd_client_get_type
 fwupd_device_get_type
-fwupd_quirks_get_type
 fwupd_release_get_type
 fwupd_remote_get_type
-fwupd_result_get_type
diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am
new file mode 100644
index 0000000..7b97144
--- /dev/null
+++ b/docs/man/Makefile.am
@@ -0,0 +1,31 @@
+man_MANS_DIST = 					\
+	dfu-tool.1					\
+	fwupdmgr.1
+
+EXTRA_DIST =						\
+	dfu-tool.sgml					\
+	fwupdmgr.sgml					\
+	$(man_MANS_DIST)
+
+man_MANS =						\
+	$(man_MANS_DIST)
+
+fwupdmgr.1: fwupdmgr.sgml
+	$(AM_V_GEN)					\
+	$(DOCBOOK2MAN) $? > /dev/null
+dfu-tool.1: dfu-tool.sgml
+	$(AM_V_GEN)					\
+	$(DOCBOOK2MAN) $? > /dev/null
+
+MAINTAINERCLEANFILES =					\
+	manpage.links					\
+	manpage.log					\
+	manpage.refs					\
+	$(man_MANS)
+
+clean-local :
+	rm -f *~
+	rm -f *.1
+	rm -f manpage.*
+
+-include $(top_srcdir)/git.mk
diff --git a/git.mk b/git.mk
new file mode 100644
index 0000000..d3c0e35
--- /dev/null
+++ b/git.mk
@@ -0,0 +1,350 @@
+# git.mk, a small Makefile to autogenerate .gitignore files
+# for autotools-based projects.
+#
+# Copyright 2009, Red Hat, Inc.
+# Copyright 2010,2011,2012,2013 Behdad Esfahbod
+# Written by Behdad Esfahbod
+#
+# Copying and distribution of this file, with or without modification,
+# is permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+#
+# The latest version of this file can be downloaded from:
+GIT_MK_URL = https://raw.githubusercontent.com/behdad/git.mk/master/git.mk
+#
+# Bugs, etc, should be reported upstream at:
+#   https://github.com/behdad/git.mk
+#
+# To use in your project, import this file in your git repo's toplevel,
+# then do "make -f git.mk".  This modifies all Makefile.am files in
+# your project to -include git.mk.  Remember to add that line to new
+# Makefile.am files you create in your project, or just rerun the
+# "make -f git.mk".
+#
+# This enables automatic .gitignore generation.  If you need to ignore
+# more files, add them to the GITIGNOREFILES variable in your Makefile.am.
+# But think twice before doing that.  If a file has to be in .gitignore,
+# chances are very high that it's a generated file and should be in one
+# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES.
+#
+# The only case that you need to manually add a file to GITIGNOREFILES is
+# when remove files in one of mostlyclean-local, clean-local, distclean-local,
+# or maintainer-clean-local make targets.
+#
+# Note that for files like editor backup, etc, there are better places to
+# ignore them.  See "man gitignore".
+#
+# If "make maintainer-clean" removes the files but they are not recognized
+# by this script (that is, if "git status" shows untracked files still), send
+# me the output of "git status" as well as your Makefile.am and Makefile for
+# the directories involved and I'll diagnose.
+#
+# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
+# Makefile.am.sample in the git.mk git repo.
+#
+# Don't EXTRA_DIST this file.  It is supposed to only live in git clones,
+# not tarballs.  It serves no useful purpose in tarballs and clutters the
+# build dir.
+#
+# This file knows how to handle autoconf, automake, libtool, gtk-doc,
+# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu, appdata,
+# appstream.
+#
+# This makefile provides the following targets:
+#
+# - all: "make all" will build all gitignore files.
+# - gitignore: makes all gitignore files in the current dir and subdirs.
+# - .gitignore: make gitignore file for the current dir.
+# - gitignore-recurse: makes all gitignore files in the subdirs.
+#
+# KNOWN ISSUES:
+#
+# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the
+#   submodule doesn't find us.  If you have configure.{in,ac} files in
+#   subdirs, add a proxy git.mk file in those dirs that simply does:
+#   "include $(top_srcdir)/../git.mk".  Add more ..'s to your taste.
+#   And add those files to git.  See vte/gnome-pty-helper/git.mk for
+#   example.
+#
+
+
+
+###############################################################################
+# Variables user modules may want to add to toplevel MAINTAINERCLEANFILES:
+###############################################################################
+
+#
+# Most autotools-using modules should be fine including this variable in their
+# toplevel MAINTAINERCLEANFILES:
+GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \
+	$(srcdir)/aclocal.m4 \
+	$(srcdir)/autoscan.log \
+	$(srcdir)/configure.scan \
+	`AUX_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' ./configure.ac); \
+	 test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \
+	 for x in \
+		ar-lib \
+		compile \
+		config.guess \
+		config.rpath \
+		config.sub \
+		depcomp \
+		install-sh \
+		ltmain.sh \
+		missing \
+		mkinstalldirs \
+		test-driver \
+		ylwrap \
+	 ; do echo "$$AUX_DIR/$$x"; done` \
+	`cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' ./configure.ac | \
+	head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done`
+#
+# All modules should also be fine including the following variable, which
+# removes automake-generated Makefile.in files:
+GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \
+	`cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' ./configure.ac | \
+	while read f; do \
+	  case $$f in Makefile|*/Makefile) \
+	    test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \
+	done`
+#
+# Modules that use libtool and use  AC_CONFIG_MACRO_DIR() may also include this,
+# though it's harmless to include regardless.
+GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \
+	`MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1' ./configure.ac); \
+	 if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \
+		for x in \
+			libtool.m4 \
+			ltoptions.m4 \
+			ltsugar.m4 \
+			ltversion.m4 \
+			lt~obsolete.m4 \
+		; do echo "$$MACRO_DIR/$$x"; done; \
+	 fi`
+
+
+
+###############################################################################
+# Default rule is to install ourselves in all Makefile.am files:
+###############################################################################
+
+git-all: git-mk-install
+
+git-mk-install:
+	@echo "Installing git makefile"
+	@any_failed=; \
+		find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \
+		if grep 'include .*/git.mk' $$x >/dev/null; then \
+			echo "$$x already includes git.mk"; \
+		else \
+			failed=; \
+			echo "Updating $$x"; \
+			{ cat $$x; \
+			  echo ''; \
+			  echo '-include $$(top_srcdir)/git.mk'; \
+			} > $$x.tmp || failed=1; \
+			if test x$$failed = x; then \
+				mv $$x.tmp $$x || failed=1; \
+			fi; \
+			if test x$$failed = x; then : else \
+				echo "Failed updating $$x"; >&2 \
+				any_failed=1; \
+			fi; \
+	fi; done; test -z "$$any_failed"
+
+git-mk-update:
+	wget $(GIT_MK_URL) -O $(top_srcdir)/git.mk
+
+.PHONY: git-all git-mk-install git-mk-update
+
+
+
+###############################################################################
+# Actual .gitignore generation:
+###############################################################################
+
+$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
+	@echo "git.mk: Generating $@"
+	@{ \
+		if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \
+			for x in \
+				$(DOC_MODULE)-decl-list.txt \
+				$(DOC_MODULE)-decl.txt \
+				tmpl/$(DOC_MODULE)-unused.sgml \
+				"tmpl/*.bak" \
+				$(REPORT_FILES) \
+				$(DOC_MODULE).pdf \
+				xml html \
+			; do echo "/$$x"; done; \
+			FLAVOR=$$(cd $(top_srcdir); $(AUTOCONF) --trace 'GTK_DOC_CHECK:$$2' ./configure.ac); \
+			case $$FLAVOR in *no-tmpl*) echo /tmpl;; esac; \
+			if echo "$(SCAN_OPTIONS)" | grep -q "\-\-rebuild-types"; then \
+				echo "/$(DOC_MODULE).types"; \
+			fi; \
+			if echo "$(SCAN_OPTIONS)" | grep -q "\-\-rebuild-sections"; then \
+				echo "/$(DOC_MODULE)-sections.txt"; \
+			fi; \
+			if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+				for x in \
+					$(SETUP_FILES) \
+					$(DOC_MODULE).types \
+				; do echo "/$$x"; done; \
+			fi; \
+		fi; \
+		if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
+			for lc in $(DOC_LINGUAS); do \
+				for x in \
+					$(if $(DOC_MODULE),$(DOC_MODULE).xml) \
+					$(DOC_PAGES) \
+					$(DOC_INCLUDES) \
+				; do echo "/$$lc/$$x"; done; \
+			done; \
+			for x in \
+				$(_DOC_OMF_ALL) \
+				$(_DOC_DSK_ALL) \
+				$(_DOC_HTML_ALL) \
+				$(_DOC_MOFILES) \
+				$(DOC_H_FILE) \
+				"*/.xml2po.mo" \
+				"*/*.omf.out" \
+			; do echo /$$x; done; \
+		fi; \
+		if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \
+			for lc in $(HELP_LINGUAS); do \
+				for x in \
+					$(HELP_FILES) \
+					"$$lc.stamp" \
+					"$$lc.mo" \
+				; do echo "/$$lc/$$x"; done; \
+			done; \
+		fi; \
+		if test "x$(gsettings_SCHEMAS)" = x; then :; else \
+			for x in \
+				$(gsettings_SCHEMAS:.xml=.valid) \
+				$(gsettings__enum_file) \
+			; do echo "/$$x"; done; \
+		fi; \
+		if test "x$(appdata_XML)" = x; then :; else \
+			for x in \
+				$(appdata_XML:.xml=.valid) \
+			; do echo "/$$x"; done; \
+		fi; \
+		if test "x$(appstream_XML)" = x; then :; else \
+			for x in \
+				$(appstream_XML:.xml=.valid) \
+			; do echo "/$$x"; done; \
+		fi; \
+		if test -f $(srcdir)/po/Makefile.in.in; then \
+			for x in \
+				ABOUT-NLS \
+				po/Makefile.in.in \
+				po/Makefile.in.in~ \
+				po/Makefile.in \
+				po/Makefile \
+				po/Makevars.template \
+				po/POTFILES \
+				po/Rules-quot \
+				po/stamp-it \
+				po/stamp-po \
+				po/.intltool-merge-cache \
+				"po/*.gmo" \
+				"po/*.header" \
+				"po/*.mo" \
+				"po/*.sed" \
+				"po/*.sin" \
+				po/$(GETTEXT_PACKAGE).pot \
+				intltool-extract.in \
+				intltool-merge.in \
+				intltool-update.in \
+			; do echo "/$$x"; done; \
+		fi; \
+		if test -f $(srcdir)/configure; then \
+			for x in \
+				autom4te.cache \
+				configure \
+				config.h \
+				stamp-h1 \
+				libtool \
+				config.lt \
+			; do echo "/$$x"; done; \
+		fi; \
+		if test "x$(DEJATOOL)" = x; then :; else \
+			for x in \
+				$(DEJATOOL) \
+			; do echo "/$$x.sum"; echo "/$$x.log"; done; \
+			echo /site.exp; \
+		fi; \
+		if test "x$(am__dirstamp)" = x; then :; else \
+			echo "$(am__dirstamp)"; \
+		fi; \
+		if test "x$(findstring libtool,$(LTCOMPILE))" = x -a "x$(findstring libtool,$(LTCXXCOMPILE))" = x -a "x$(GTKDOC_RUN)" = x; then :; else \
+			for x in \
+				"*.lo" \
+				".libs" "_libs" \
+			; do echo "$$x"; done; \
+		fi; \
+		for x in \
+			.gitignore \
+			$(GITIGNOREFILES) \
+			$(CLEANFILES) \
+			$(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \
+			$(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \
+			$(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \
+			so_locations \
+			$(MOSTLYCLEANFILES) \
+			$(TEST_LOGS) \
+			$(TEST_LOGS:.log=.trs) \
+			$(TEST_SUITE_LOG) \
+			$(TESTS:=.test) \
+			"*.gcda" \
+			"*.gcno" \
+			$(DISTCLEANFILES) \
+			$(am__CONFIG_DISTCLEAN_FILES) \
+			$(CONFIG_CLEAN_FILES) \
+			TAGS ID GTAGS GRTAGS GSYMS GPATH tags \
+			"*.tab.c" \
+			$(MAINTAINERCLEANFILES) \
+			$(BUILT_SOURCES) \
+			$(patsubst %.vala,%.c,$(filter %.vala,$(SOURCES))) \
+			$(filter %_vala.stamp,$(DIST_COMMON)) \
+			$(filter %.vapi,$(DIST_COMMON)) \
+			$(filter $(addprefix %,$(notdir $(patsubst %.vapi,%.h,$(filter %.vapi,$(DIST_COMMON))))),$(DIST_COMMON)) \
+			Makefile \
+			Makefile.in \
+			"*.orig" \
+			"*.rej" \
+			"*.bak" \
+			"*~" \
+			".*.sw[nop]" \
+			".dirstamp" \
+		; do echo "/$$x"; done; \
+		for x in \
+			"*.$(OBJEXT)" \
+			$(DEPDIR) \
+		; do echo "$$x"; done; \
+	} | \
+	sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
+	sed 's@/[.]/@/@g' | \
+	LC_ALL=C sort | uniq > $@.tmp && \
+	mv $@.tmp $@;
+
+all: $(srcdir)/.gitignore gitignore-recurse-maybe
+gitignore: $(srcdir)/.gitignore gitignore-recurse
+
+gitignore-recurse-maybe:
+	@for subdir in $(DIST_SUBDIRS); do \
+	  case " $(SUBDIRS) " in \
+	    *" $$subdir "*) :;; \
+	    *) test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir");; \
+	  esac; \
+	done
+gitignore-recurse:
+	@for subdir in $(DIST_SUBDIRS); do \
+	    test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir"); \
+	done
+
+maintainer-clean: gitignore-clean
+gitignore-clean:
+	-rm -f $(srcdir)/.gitignore
+
+.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe
diff --git a/libfwupd/Makefile.am b/libfwupd/Makefile.am
new file mode 100644
index 0000000..96ad934
--- /dev/null
+++ b/libfwupd/Makefile.am
@@ -0,0 +1,125 @@
+if HAVE_INTROSPECTION
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+endif
+
+AM_CPPFLAGS = \
+	$(GLIB_CFLAGS)						\
+	$(SOUP_CFLAGS)						\
+	$(PIE_CFLAGS)						\
+	-I$(top_srcdir)						\
+	-I$(top_srcdir)/libfwupd				\
+	-DFWUPD_COMPILATION					\
+	-DG_LOG_DOMAIN=\"libfwupd\"				\
+	-DLIBEXECDIR=\""$(libexecdir)"\"			\
+	-DLOCALSTATEDIR=\""$(localstatedir)"\"			\
+	-DPACKAGE_DATA_DIR=\""$(datadir)"\"
+
+lib_LTLIBRARIES =						\
+	libfwupd.la
+
+libfwupd_includedir = $(includedir)/fwupd-1
+libfwupd_include_HEADERS =					\
+	fwupd.h
+
+libfwupdbase_includedir = $(libfwupd_includedir)/libfwupd
+libfwupdbase_include_HEADERS =					\
+	fwupd-client.h						\
+	fwupd-common.h						\
+	fwupd-deprecated.h					\
+	fwupd-enums.h						\
+	fwupd-error.h						\
+	fwupd-release.h						\
+	fwupd-device.h						\
+	fwupd-remote.h						\
+	fwupd-version.h
+
+libfwupd_la_SOURCES =						\
+	fwupd-client.c						\
+	fwupd-enums.c						\
+	fwupd-release.c						\
+	fwupd-device.c						\
+	fwupd-common.c						\
+	fwupd-remote.c						\
+	fwupd-enums-private.h					\
+	fwupd-error.c
+libfwupd_la_LIBADD =						\
+	$(SOUP_LIBS)						\
+	$(GLIB_LIBS)
+libfwupd_la_LDFLAGS =						\
+	$(PIE_LDFLAGS)						\
+	$(RELRO_LDFLAGS)					\
+	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)	\
+	-export-dynamic						\
+	-no-undefined						\
+	-version-script=$(srcdir)/fwupd.map
+libfwupd_la_CFLAGS =						\
+	$(PIE_CFLAGS)						\
+	$(WARN_CFLAGS)
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = fwupd.pc
+
+EXTRA_DIST =							\
+	fwupd-version.h.in					\
+	fwupd.pc.in
+
+if HAVE_INTROSPECTION
+introspection_sources =						\
+	$(libfwupd_la_SOURCES)					\
+	$(libfwupdbase_include_HEADERS)
+
+Fwupd-2.0.gir: libfwupd.la
+Fwupd_2_0_gir_INCLUDES = GObject-2.0 Gio-2.0 Soup-2.4
+Fwupd_2_0_gir_CFLAGS = $(AM_CPPFLAGS) -DCD_DISABLE_DEPRECATED
+Fwupd_2_0_gir_SCANNERFLAGS = --identifier-prefix=Fwupd \
+				--symbol-prefix=fwupd \
+				--warn-all \
+				--add-include-path=$(srcdir) \
+				--c-include="fwupd.h"
+Fwupd_2_0_gir_EXPORT_PACKAGES = fwupd
+Fwupd_2_0_gir_LIBS = libfwupd.la
+Fwupd_2_0_gir_FILES = $(introspection_sources)
+INTROSPECTION_GIRS += Fwupd-2.0.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES = $(gir_DATA) $(typelib_DATA)
+
+endif
+
+TESTS_ENVIRONMENT =						\
+	libtool --mode=execute valgrind				\
+	--quiet							\
+	--leak-check=full					\
+	--show-possibly-lost=no
+
+check_PROGRAMS =						\
+	fwupd-self-test
+
+fwupd_self_test_SOURCES =					\
+	fwupd-client.c						\
+	fwupd-enums.c						\
+	fwupd-error.c						\
+	fwupd-self-test.c
+
+fwupd_self_test_LDADD =						\
+	$(LIBM)							\
+	$(ARCHIVE_LIBS)						\
+	$(GLIB_LIBS)
+
+fwupd_self_test_CFLAGS =					\
+	$(WARN_CFLAGS)
+
+TESTS = fwupd-self-test
+
+clean-local:
+	rm -f *~
+
+-include $(top_srcdir)/git.mk
diff --git a/libfwupd/fwupd.pc.in b/libfwupd/fwupd.pc.in
new file mode 100644
index 0000000..4fe4695
--- /dev/null
+++ b/libfwupd/fwupd.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: fwupd
+Description: fwupd is a system daemon for installing device firmware
+Version: @VERSION@
+Requires: glib-2.0, gobject-2.0, gio-2.0
+Libs: -L${libdir} -lfwupd
+Cflags: -I${includedir}/fwupd-1
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 0000000..0f4126c
--- /dev/null
+++ b/m4/.gitignore
@@ -0,0 +1 @@
+*.m4
diff --git a/m4/as-linguas.m4 b/m4/as-linguas.m4
new file mode 100644
index 0000000..92b28f7
--- /dev/null
+++ b/m4/as-linguas.m4
@@ -0,0 +1,24 @@
+# Set ALL_ALL_LINGUAS based on the .po files present. Optional argument is the
+# name of the po directory. $podir/LINGUAS.ignore can be used to ignore a
+# subset of the po files.
+
+AC_DEFUN([AS_ALL_LINGUAS],
+[
+ AC_MSG_CHECKING([for linguas])
+ podir="m4_default([$1],[$srcdir/po])"
+ linguas=`cd $podir && ls *.po 2>/dev/null | awk 'BEGIN { FS="."; ORS=" " } { print $[]1 }'`
+ if test -f "$podir/LINGUAS.ignore"; then
+   ALL_LINGUAS="";
+   ignore_linguas=`sed -n -e 's/^\s\+\|\s\+$//g' -e '/^#/b' -e '/\S/!b' \
+                       -e 's/\s\+/\n/g' -e p "$podir/LINGUAS.ignore"`;
+   for lang in $linguas; do
+     if ! echo "$ignore_linguas" | grep -q "^${lang}$"; then
+       ALL_LINGUAS="$ALL_LINGUAS $lang";
+     fi;
+   done;
+ else
+   ALL_LINGUAS="$linguas";
+ fi;
+ AC_SUBST([ALL_LINGUAS])
+ AC_MSG_RESULT($ALL_LINGUAS)
+])
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
new file mode 100644
index 0000000..c3a8d69
--- /dev/null
+++ b/m4/ax_check_compile_flag.m4
@@ -0,0 +1,72 @@
+# ===========================================================================
+#   http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
+#
+# DESCRIPTION
+#
+#   Check whether the given FLAG works with the current language's compiler
+#   or gives an error.  (Warnings, however, are ignored)
+#
+#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+#   success/failure.
+#
+#   If EXTRA-FLAGS is defined, it is added to the current language's default
+#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
+#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
+#   force the compiler to issue an error when a bad flag is given.
+#
+#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 2
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
+  ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+    [AS_VAR_SET(CACHEVAR,[yes])],
+    [AS_VAR_SET(CACHEVAR,[no])])
+  _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
+  [m4_default([$2], :)],
+  [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS
diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4
new file mode 100644
index 0000000..e2d0d36
--- /dev/null
+++ b/m4/ax_check_link_flag.m4
@@ -0,0 +1,71 @@
+# ===========================================================================
+#    http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
+#
+# DESCRIPTION
+#
+#   Check whether the given FLAG works with the linker or gives an error.
+#   (Warnings, however, are ignored)
+#
+#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+#   success/failure.
+#
+#   If EXTRA-FLAGS is defined, it is added to the linker's default flags
+#   when the check is done.  The check is thus made with the flags: "LDFLAGS
+#   EXTRA-FLAGS FLAG".  This can for example be used to force the linker to
+#   issue an error when a bad flag is given.
+#
+#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+#   macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 2
+
+AC_DEFUN([AX_CHECK_LINK_FLAG],
+[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
+AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
+  ax_check_save_flags=$LDFLAGS
+  LDFLAGS="$LDFLAGS $4 $1"
+  AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+    [AS_VAR_SET(CACHEVAR,[yes])],
+    [AS_VAR_SET(CACHEVAR,[no])])
+  LDFLAGS=$ax_check_save_flags])
+AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
+  [m4_default([$2], :)],
+  [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_LINK_FLAGS
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
new file mode 100644
index 0000000..80aa29d
--- /dev/null
+++ b/plugins/Makefile.am
@@ -0,0 +1,38 @@
+SUBDIRS =		\
+	amt		\
+	altos		\
+	dfu		\
+	ebitdo		\
+	raspberrypi	\
+	steelseries	\
+	test		\
+	udev		\
+	unifying	\
+	upower
+
+if HAVE_DELL
+SUBDIRS += dell
+endif
+
+if HAVE_SYNAPTICS
+SUBDIRS += synapticsmst
+endif
+
+if HAVE_COLORHUG
+SUBDIRS += colorhug
+endif
+
+if HAVE_UEFI
+SUBDIRS += uefi
+endif
+
+if HAVE_THUNDERBOLT
+SUBDIRS += thunderbolt
+SUBDIRS += thunderbolt-power
+endif
+
+if ENABLE_USB_FALLBACK
+SUBDIRS += usb
+endif
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/altos/Makefile.am b/plugins/altos/Makefile.am
new file mode 100644
index 0000000..6c7fc9b
--- /dev/null
+++ b/plugins/altos/Makefile.am
@@ -0,0 +1,31 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(ELF_CFLAGS)					\
+	$(GLIB_CFLAGS)					\
+	$(GUDEV_CFLAGS)					\
+	$(GUSB_CFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+FWUPD_LIBS =						\
+	$(top_builddir)/libfwupd/libfwupd.la
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_altos.la
+libfu_plugin_altos_la_SOURCES =				\
+	fu-altos-firmware.c				\
+	fu-altos-firmware.h				\
+	fu-device-altos.c				\
+	fu-device-altos.h				\
+	fu-plugin-altos.c
+libfu_plugin_altos_la_LIBADD =				\
+	$(ELF_LIBS)					\
+	$(GUDEV_LIBS)
+libfu_plugin_altos_la_LDFLAGS = -module -avoid-version
+libfu_plugin_altos_la_CFLAGS = $(WARN_CFLAGS)		\
+	-DG_LOG_DOMAIN=\"FuPluginAltos\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/amt/Makefile.am b/plugins/amt/Makefile.am
new file mode 100644
index 0000000..e8db96b
--- /dev/null
+++ b/plugins/amt/Makefile.am
@@ -0,0 +1,25 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GLIB_CFLAGS)					\
+	$(GUDEV_CFLAGS)					\
+	$(GUSB_CFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+FWUPD_LIBS =						\
+	$(top_builddir)/libfwupd/libfwupd.la
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_amt.la
+libfu_plugin_amt_la_SOURCES =				\
+	fu-plugin-amt.c
+libfu_plugin_amt_la_LIBADD =				\
+	$(GUDEV_LIBS)
+libfu_plugin_amt_la_LDFLAGS = -module -avoid-version
+libfu_plugin_amt_la_CFLAGS = $(WARN_CFLAGS)		\
+	-DG_LOG_DOMAIN=\"FuPluginAmt\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/colorhug/Makefile.am b/plugins/colorhug/Makefile.am
new file mode 100644
index 0000000..a797e68
--- /dev/null
+++ b/plugins/colorhug/Makefile.am
@@ -0,0 +1,21 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GUSB_CFLAGS)					\
+	$(GLIB_CFLAGS)					\
+	$(COLORHUG_CFLAGS)				\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_colorhug.la
+libfu_plugin_colorhug_la_SOURCES =			\
+	fu-plugin-colorhug.c
+libfu_plugin_colorhug_la_LIBADD = $(GUSB_LIBS) $(COLORHUG_LIBS)
+libfu_plugin_colorhug_la_LDFLAGS = -module -avoid-version
+libfu_plugin_colorhug_la_CFLAGS = $(WARN_CFLAGS)	\
+	-DG_LOG_DOMAIN=\"FuPluginColorHug\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/dell/Makefile.am b/plugins/dell/Makefile.am
new file mode 100644
index 0000000..79f1699
--- /dev/null
+++ b/plugins/dell/Makefile.am
@@ -0,0 +1,38 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GUSB_CFLAGS)					\
+	$(GLIB_CFLAGS)					\
+	$(COLORHUG_CFLAGS)				\
+	$(LIBSMBIOS_CFLAGS)				\
+	$(EFIVAR_CFLAGS)				\
+	$(GUDEV_CFLAGS)					\
+	$(VALGRIND_CFLAGS)				\
+	$(PIE_CFLAGS)					\
+	-DLIBEXECDIR=\"$(libexecdir)\"			\
+	-DTESTDATADIR=\""$(top_srcdir)/data/tests"\"	\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+FWUPD_LIBS =						\
+	$(top_builddir)/libfwupd/libfwupd.la
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_dell.la
+libfu_plugin_dell_la_SOURCES =				\
+	fu-dell-smi.c					\
+	fu-plugin-dell.c
+libfu_plugin_dell_la_LIBADD =				\
+	$(GUSB_LIBS)					\
+	$(UEFI_LIBS)					\
+	$(LIBSMBIOS_LIBS)
+libfu_plugin_dell_la_LDFLAGS = -module -avoid-version
+libfu_plugin_dell_la_CFLAGS = $(WARN_CFLAGS)		\
+	-DG_LOG_DOMAIN=\"FuPluginDell\"
+
+quirkdir = $(datadir)/fwupd/quirks.d
+dist_quirk_DATA = dell.quirk
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/dfu/Makefile.am b/plugins/dfu/Makefile.am
new file mode 100644
index 0000000..33c8c6b
--- /dev/null
+++ b/plugins/dfu/Makefile.am
@@ -0,0 +1,124 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GUSB_CFLAGS)					\
+	$(GLIB_CFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src				\
+	-DLOCALEDIR=\""$(localedir)"\"
+
+FWUPD_LIBS =						\
+	$(top_builddir)/libfwupd/libfwupd.la
+
+FWUPDPRIVATE_LIBS =					\
+	$(top_builddir)/src/libfwupdprivate.a
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_dfu.la
+
+dfu_SOURCES =							\
+	dfu-common.c						\
+	dfu-common.h						\
+	dfu-cipher-xtea.c					\
+	dfu-cipher-xtea.h					\
+	dfu-context.c						\
+	dfu-context.h						\
+	dfu-chunked.c						\
+	dfu-chunked.h						\
+	dfu-device.c						\
+	dfu-device.h						\
+	dfu-device-private.h					\
+	dfu-element.c						\
+	dfu-element.h						\
+	dfu-patch.c						\
+	dfu-patch.h						\
+	dfu-firmware.c						\
+	dfu-firmware.h						\
+	dfu-firmware-private.h					\
+	dfu-format-dfu.c					\
+	dfu-format-dfu.h					\
+	dfu-format-dfuse.c					\
+	dfu-format-dfuse.h					\
+	dfu-format-ihex.c					\
+	dfu-format-ihex.h					\
+	dfu-format-metadata.c					\
+	dfu-format-metadata.h					\
+	dfu-format-raw.c					\
+	dfu-format-raw.h					\
+	dfu-image.c						\
+	dfu-image.h						\
+	dfu-sector.c						\
+	dfu-sector.h						\
+	dfu-sector-private.h					\
+	dfu-target.c						\
+	dfu-target.h						\
+	dfu-target-avr.c					\
+	dfu-target-avr.h					\
+	dfu-target-stm.c					\
+	dfu-target-stm.h					\
+	dfu-target-private.h
+
+libfu_plugin_dfu_la_SOURCES =					\
+	$(dfu_SOURCES)						\
+	fu-plugin-dfu.c
+libfu_plugin_dfu_la_LIBADD = 					\
+	$(GUSB_LIBS)						\
+	$(APPSTREAM_GLIB_LIBS)					\
+	$(FWUPD_LIBS)						\
+	$(GUSB_LIBS)						\
+	$(GLIB_LIBS)						\
+	$(LIBM)
+
+libfu_plugin_dfu_la_LDFLAGS = -module -avoid-version
+libfu_plugin_dfu_la_CFLAGS = $(WARN_CFLAGS)		\
+	-DG_LOG_DOMAIN=\"FuPluginDfu\"
+
+bin_PROGRAMS =							\
+	dfu-tool
+
+dfu_tool_SOURCES =						\
+	$(dfu_SOURCES)						\
+	dfu-tool.c
+
+dfu_tool_LDADD =						\
+	$(lib_LTLIBRARIES)					\
+	$(APPSTREAM_GLIB_LIBS)					\
+	$(FWUPD_LIBS)						\
+	$(FWUPDPRIVATE_LIBS)					\
+	$(ELF_LIBS)						\
+	$(GLIB_LIBS)						\
+	$(GUSB_LIBS)						\
+	$(LIBM)
+
+dfu_tool_CFLAGS = -DEGG_TEST $(AM_CFLAGS) $(WARN_CFLAGS)
+
+man_MANS_DIST =					 		\
+	dfu-tool.1
+
+EXTRA_DIST =							\
+	README.md						\
+	dfu-tool.sgml						\
+	$(man_MANS_DIST)
+
+man_MANS =							\
+	$(man_MANS_DIST)
+
+dfu-tool.1: dfu-tool.sgml
+	$(AM_V_GEN)						\
+	$(DOCBOOK2MAN) $? > /dev/null
+
+MAINTAINERCLEANFILES =						\
+	manpage.links						\
+	manpage.log						\
+	manpage.refs						\
+	$(man_MANS)
+
+clean-local :
+	rm -f *~
+	rm -f *.1
+	rm -f manpage.*
+
+quirkdir = $(datadir)/fwupd/quirks.d
+dist_quirk_DATA = dfu.quirk
+
+include $(top_srcdir)/git.mk
diff --git a/plugins/dfu/tests/Makefile.am b/plugins/dfu/tests/Makefile.am
new file mode 100644
index 0000000..623c4f8
--- /dev/null
+++ b/plugins/dfu/tests/Makefile.am
@@ -0,0 +1,12 @@
+EXTRA_DIST =								\
+	example.bin							\
+	example.dfu							\
+	example.elf							\
+	example.xdfu							\
+	firmware.bin							\
+	firmware.hex							\
+	metadata.dfu							\
+	kiibohd.dfu.bin							\
+	dev_VRBRAIN.dfu
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/ebitdo/Makefile.am b/plugins/ebitdo/Makefile.am
new file mode 100644
index 0000000..5b1652d
--- /dev/null
+++ b/plugins/ebitdo/Makefile.am
@@ -0,0 +1,30 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GUSB_CFLAGS)					\
+	$(GLIB_CFLAGS)					\
+	$(GUDEV_CFLAGS)					\
+	$(PIE_CFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_ebitdo.la
+
+FWUPD_LIBS =						\
+	$(top_builddir)/libfwupd/libfwupd.la
+
+libfu_plugin_ebitdo_la_SOURCES =			\
+	fu-ebitdo-common.c				\
+	fu-ebitdo-common.h				\
+	fu-device-ebitdo.c				\
+	fu-device-ebitdo.h				\
+	fu-plugin-ebitdo.c
+libfu_plugin_ebitdo_la_LIBADD = $(GUSB_LIBS)
+libfu_plugin_ebitdo_la_LDFLAGS = -module -avoid-version
+libfu_plugin_ebitdo_la_CFLAGS = $(WARN_CFLAGS)		\
+	-DG_LOG_DOMAIN=\"FuPluginEbitdo\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/raspberrypi/Makefile.am b/plugins/raspberrypi/Makefile.am
new file mode 100644
index 0000000..ea72d4d
--- /dev/null
+++ b/plugins/raspberrypi/Makefile.am
@@ -0,0 +1,31 @@
+SUBDIRS = 						\
+	rpiupdate
+
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GUSB_CFLAGS)					\
+	$(GLIB_CFLAGS)					\
+	$(VALGRIND_CFLAGS)				\
+	$(PIE_CFLAGS)					\
+	-DLIBEXECDIR=\"$(libexecdir)\"			\
+	-DTESTDATADIR=\""$(top_srcdir)/plugins/raspberrypi"\" \
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+FWUPD_LIBS =						\
+	$(top_builddir)/libfwupd/libfwupd.la
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_raspberrypi.la
+
+libfu_plugin_raspberrypi_la_SOURCES =			\
+	fu-plugin-raspberrypi.c
+libfu_plugin_raspberrypi_la_LIBADD = $(GUSB_LIBS)
+libfu_plugin_raspberrypi_la_LDFLAGS = -module -avoid-version
+libfu_plugin_raspberrypi_la_CFLAGS = $(WARN_CFLAGS)	\
+	-DG_LOG_DOMAIN=\"FuPluginRpi\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/raspberrypi/rpiupdate/Makefile.am b/plugins/raspberrypi/rpiupdate/Makefile.am
new file mode 100644
index 0000000..cd6aebd
--- /dev/null
+++ b/plugins/raspberrypi/rpiupdate/Makefile.am
@@ -0,0 +1,30 @@
+test_files =						\
+	firmware.bin					\
+	rpi-firmware-20150805.cab
+
+firmware.bin: $(srcdir)/*.elf $(srcdir)/overlays/* $(srcdir)/README
+	$(AM_V_GEN) tar -cf $@				\
+		$(srcdir)/README			\
+		$(srcdir)/*.elf				\
+		$(srcdir)/overlays/*.dtb
+
+rpi-firmware-20150805.cab: firmware.bin firmware.metainfo.xml
+	$(AM_V_GEN) touch -c -m -d"2000-01-01T00:00:00" $?;	\
+	$(GCAB) --create --nopath $@			\
+		$(builddir)/firmware.bin		\
+		$(srcdir)/firmware.metainfo.xml
+
+BUILT_SOURCES =						\
+	firmware.bin					\
+	rpi-firmware-20150805.cab
+
+CLEANFILES =						\
+	$(BUILT_SOURCES)
+
+EXTRA_DIST =						\
+	$(test_files)					\
+	firmware.metainfo.xml				\
+	overlays/test.dtb				\
+	start.elf
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/steelseries/Makefile.am b/plugins/steelseries/Makefile.am
new file mode 100644
index 0000000..c460787
--- /dev/null
+++ b/plugins/steelseries/Makefile.am
@@ -0,0 +1,21 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GUSB_CFLAGS)					\
+	$(GLIB_CFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_steelseries.la
+
+libfu_plugin_steelseries_la_SOURCES =			\
+	fu-plugin-steelseries.c
+libfu_plugin_steelseries_la_LIBADD = $(GUSB_LIBS)
+libfu_plugin_steelseries_la_LDFLAGS = -module -avoid-version
+libfu_plugin_steelseries_la_CFLAGS = $(WARN_CFLAGS)	\
+	-DG_LOG_DOMAIN=\"FuPluginSteelSeries\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/synapticsmst/Makefile.am b/plugins/synapticsmst/Makefile.am
new file mode 100644
index 0000000..8868f23
--- /dev/null
+++ b/plugins/synapticsmst/Makefile.am
@@ -0,0 +1,36 @@
+AM_CPPFLAGS = 							\
+	$(APPSTREAM_GLIB_CFLAGS)				\
+	$(GLIB_CFLAGS)						\
+	$(GUSB_CFLAGS)						\
+	$(VALGRIND_CFLAGS)					\
+	$(PIE_CFLAGS)						\
+	$(EFIVAR_CFLAGS)					\
+	-I$(top_srcdir)						\
+	-I$(top_srcdir)/src					\
+	-I$(top_srcdir)/libfwupd				\
+	-DLIBEXECDIR=\"$(libexecdir)\"				\
+	-DLOCALEDIR=\""$(localedir)"\"
+
+FWUPD_LIBS =							\
+	$(top_builddir)/libfwupd/libfwupd.la
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_synapticsmst.la
+
+libfu_plugin_synapticsmst_la_SOURCES =				\
+	synapticsmst-device.c					\
+	synapticsmst-device.h					\
+	synapticsmst-common.c					\
+	synapticsmst-common.h					\
+	fu-plugin-synapticsmst.c
+
+libfu_plugin_synapticsmst_la_LIBADD =				\
+	$(GUSB_LIBS)						\
+	$(GLIB_LIBS)
+libfu_plugin_synapticsmst_la_LDFLAGS = -module -avoid-version
+libfu_plugin_synapticsmst_la_CFLAGS =				\
+	$(PIE_CFLAGS)						\
+	$(WARN_CFLAGS)						\
+	-DG_LOG_DOMAIN=\"FuPluginSynapticsMST\"
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/test/Makefile.am b/plugins/test/Makefile.am
new file mode 100644
index 0000000..b61418b
--- /dev/null
+++ b/plugins/test/Makefile.am
@@ -0,0 +1,20 @@
+AM_CPPFLAGS =						\
+	$(GUSB_CFLAGS)					\
+	$(GLIB_CFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_test.la
+
+libfu_plugin_test_la_SOURCES =				\
+	fu-plugin-test.c
+libfu_plugin_test_la_LIBADD = $(GLIB_LIBS)
+libfu_plugin_test_la_LDFLAGS = -module -avoid-version
+libfu_plugin_test_la_CFLAGS = $(WARN_CFLAGS)		\
+	-DG_LOG_DOMAIN=\"FuPluginTest\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/thunderbolt-power/Makefile.am b/plugins/thunderbolt-power/Makefile.am
new file mode 100644
index 0000000..06fe481
--- /dev/null
+++ b/plugins/thunderbolt-power/Makefile.am
@@ -0,0 +1,21 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GLIB_CFLAGS)					\
+	$(GUDEV_CFLAGS)					\
+	$(GUSB_CFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_thunderbolt_power.la
+libfu_plugin_thunderbolt_power_la_SOURCES =			\
+	fu-plugin-thunderbolt-power.c
+libfu_plugin_thunderbolt_power_la_LIBADD = $(GUDEV_LIBS) $(THUNDERBOLT_LIBS)
+libfu_plugin_thunderbolt_power_la_LDFLAGS = -module -avoid-version
+libfu_plugin_thunderbolt_power_la_CFLAGS = $(WARN_CFLAGS)	\
+	-DG_LOG_DOMAIN=\"FuPluginThunderboltPower\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/thunderbolt/Makefile.am b/plugins/thunderbolt/Makefile.am
new file mode 100644
index 0000000..528f30f
--- /dev/null
+++ b/plugins/thunderbolt/Makefile.am
@@ -0,0 +1,23 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GLIB_CFLAGS)					\
+	$(GUDEV_CFLAGS)					\
+	$(GUSB_CFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_thunderbolt.la
+libfu_plugin_thunderbolt_la_SOURCES =			\
+	fu-thunderbolt-image.c				\
+	fu-thunderbolt-image.h				\
+	fu-plugin-thunderbolt.c
+libfu_plugin_thunderbolt_la_LIBADD = $(GUDEV_LIBS) $(THUNDERBOLT_LIBS)
+libfu_plugin_thunderbolt_la_LDFLAGS = -module -avoid-version
+libfu_plugin_thunderbolt_la_CFLAGS = $(WARN_CFLAGS)	\
+	-DG_LOG_DOMAIN=\"FuPluginThunderbolt\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/udev/Makefile.am b/plugins/udev/Makefile.am
new file mode 100644
index 0000000..075583a
--- /dev/null
+++ b/plugins/udev/Makefile.am
@@ -0,0 +1,31 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GLIB_CFLAGS)					\
+	$(GUDEV_CFLAGS)					\
+	$(GUSB_CFLAGS)					\
+	$(PIE_CFLAGS)					\
+	-DTESTDATADIR=\""$(top_srcdir)/plugins/udev"\"	\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+FWUPD_LIBS =						\
+	$(top_builddir)/libfwupd/libfwupd.la
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_udev.la
+
+libfu_plugin_udev_la_SOURCES =				\
+	fu-rom.c					\
+	fu-rom.h					\
+	fu-plugin-udev.c
+libfu_plugin_udev_la_LIBADD = 				\
+	$(GUSB_LIBS)					\
+	$(GUDEV_LIBS)
+libfu_plugin_udev_la_LDFLAGS = -module -avoid-version
+libfu_plugin_udev_la_CFLAGS = $(WARN_CFLAGS)		\
+	-DG_LOG_DOMAIN=\"FuPluginUdev\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/uefi/Makefile.am b/plugins/uefi/Makefile.am
new file mode 100644
index 0000000..fbf390e
--- /dev/null
+++ b/plugins/uefi/Makefile.am
@@ -0,0 +1,23 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(EFIVAR_CFLAGS)				\
+	$(GLIB_CFLAGS)					\
+	$(GUSB_CFLAGS)					\
+	$(LIBSMBIOS_CFLAGS)				\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src				\
+	-DLOCALEDIR=\""$(localedir)"\"
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_uefi.la
+libfu_plugin_uefi_la_SOURCES =				\
+	fu-plugin-uefi.c
+libfu_plugin_uefi_la_LIBADD = $(GUSB_LIBS) $(UEFI_LIBS)
+libfu_plugin_uefi_la_LDFLAGS = -module -avoid-version
+libfu_plugin_uefi_la_CFLAGS = $(WARN_CFLAGS)	\
+	-DG_LOG_DOMAIN=\"FuPluginUefi\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/unifying/Makefile.am b/plugins/unifying/Makefile.am
new file mode 100644
index 0000000..57fa931
--- /dev/null
+++ b/plugins/unifying/Makefile.am
@@ -0,0 +1,47 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GUDEV_CFLAGS)					\
+	$(GUSB_CFLAGS)					\
+	$(GLIB_CFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+FWUPD_LIBS =						\
+	$(top_builddir)/libfwupd/libfwupd.la
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_unifying.la
+
+libunify_common =					\
+	lu-common.c					\
+	lu-common.h					\
+	lu-context.c					\
+	lu-context.h					\
+	lu-device-bootloader.c				\
+	lu-device-bootloader.h				\
+	lu-device-bootloader-nordic.c			\
+	lu-device-bootloader-nordic.h			\
+	lu-device-bootloader-texas.c			\
+	lu-device-bootloader-texas.h			\
+	lu-device.c					\
+	lu-device.h					\
+	lu-device-peripheral.c				\
+	lu-device-peripheral.h				\
+	lu-device-runtime.c				\
+	lu-device-runtime.h				\
+	lu-hidpp.h					\
+	lu-hidpp-msg.c					\
+	lu-hidpp-msg.h
+
+libfu_plugin_unifying_la_SOURCES =			\
+	$(libunify_common)				\
+	fu-plugin-unifying.c
+libfu_plugin_unifying_la_LIBADD = $(GUSB_LIBS) $(GUDEV_LIBS)
+libfu_plugin_unifying_la_LDFLAGS = -module -avoid-version
+libfu_plugin_unifying_la_CFLAGS = $(WARN_CFLAGS)	\
+	-DG_LOG_DOMAIN=\"FuPluginUnifying\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/upower/Makefile.am b/plugins/upower/Makefile.am
new file mode 100644
index 0000000..c6de67f
--- /dev/null
+++ b/plugins/upower/Makefile.am
@@ -0,0 +1,20 @@
+AM_CPPFLAGS =						\
+	$(GUSB_CFLAGS)					\
+	$(GLIB_CFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_upower.la
+
+libfu_plugin_upower_la_SOURCES =			\
+	fu-plugin-upower.c
+libfu_plugin_upower_la_LIBADD = $(GLIB_LIBS)
+libfu_plugin_upower_la_LDFLAGS = -module -avoid-version
+libfu_plugin_upower_la_CFLAGS = $(WARN_CFLAGS)		\
+	-DG_LOG_DOMAIN=\"FuPluginUpower\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/usb/Makefile.am b/plugins/usb/Makefile.am
new file mode 100644
index 0000000..0480b95
--- /dev/null
+++ b/plugins/usb/Makefile.am
@@ -0,0 +1,21 @@
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GLIB_CFLAGS)					\
+	$(GUSB_CFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/libfwupd			\
+	-I$(top_srcdir)/src
+
+plugindir = $(libdir)/fwupd-plugins-3
+plugin_LTLIBRARIES = libfu_plugin_usb.la
+
+libfu_plugin_usb_la_SOURCES =				\
+	fu-plugin-usb.c
+libfu_plugin_usb_la_LIBADD = $(GUSB_LIBS)
+libfu_plugin_usb_la_LDFLAGS = -module -avoid-version
+libfu_plugin_usb_la_CFLAGS = $(WARN_CFLAGS)		\
+	-DG_LOG_DOMAIN=\"FuPluginUsb\"
+
+EXTRA_DIST = README.md
+
+-include $(top_srcdir)/git.mk
diff --git a/policy/Makefile.am b/policy/Makefile.am
new file mode 100644
index 0000000..596036b
--- /dev/null
+++ b/policy/Makefile.am
@@ -0,0 +1,15 @@
+
+polkit_rulesdir = $(datadir)/polkit-1/rules.d
+dist_polkit_rules_DATA =				\
+	org.freedesktop.fwupd.rules
+
+polkit_policydir = $(datadir)/polkit-1/actions
+polkit_policy_DATA = org.freedesktop.fwupd.policy
+org.freedesktop.fwupd.policy: org.freedesktop.fwupd.policy.in
+	$(AM_V_GEN) GETTEXTDATADIR=$(srcdir) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+
+EXTRA_DIST = org.freedesktop.fwupd.policy.in
+CLEANFILES =						\
+	org.freedesktop.fwupd.policy
+
+-include $(top_srcdir)/git.mk
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..2f89f7b
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,220 @@
+introspectiondir = $(datadir)/dbus-1/interfaces
+dist_introspection_DATA = 				\
+	org.freedesktop.fwupd.xml
+
+AM_CPPFLAGS =						\
+	$(APPSTREAM_GLIB_CFLAGS)			\
+	$(GUSB_CFLAGS)					\
+	$(GCAB_CFLAGS)					\
+	$(GLIB_CFLAGS)					\
+	$(PIE_CFLAGS)					\
+	$(POLKIT_CFLAGS)				\
+	$(GPGME_CFLAGS)					\
+	$(SOUP_CFLAGS)					\
+	$(ARCHIVE_CFLAGS)				\
+	$(GUDEV_CFLAGS)					\
+	$(GNUTLS_CFLAGS)				\
+	$(VALGRIND_CFLAGS)				\
+	-I$(top_srcdir)					\
+	-I$(top_builddir)				\
+	-I$(top_srcdir)/libfwupd			\
+	-DG_LOG_DOMAIN=\"Fu\"				\
+	-DPLUGINDIR=\""$(libdir)/fwupd-plugins-3"\"	\
+	-DSYSFSFIRMWAREDIR=\"/sys/firmware\"		\
+	-DLIBEXECDIR=\"$(libexecdir)\"			\
+	-DLIBDIR=\"$(libdir)\"				\
+	-DDATADIR=\"$(datadir)\"			\
+	-DFWUPDDATADIR=\"$(datadir)/fwupd\"		\
+	-DFWUPDCONFIGDIR=\"$(sysconfdir)/fwupd\"	\
+	-DSYSCONFDIR=\""$(sysconfdir)"\"		\
+	-DVERSION="\"$(VERSION)\""			\
+	-DDAEMON_USER="\"$(daemon_user)\""		\
+	-DTESTDATADIR=\""$(top_srcdir)/data/tests"\"	\
+	-DG_UDEV_API_IS_SUBJECT_TO_CHANGE		\
+	-DHAVE_CONSOLEKIT=0				\
+	-DHAVE_SYSTEMD=1				\
+	-DLOCALEDIR=\""$(localedir)"\"
+
+FWUPD_LIBS =						\
+	$(top_builddir)/libfwupd/libfwupd.la
+
+noinst_LIBRARIES = libfwupdprivate.a
+libfwupdprivate_a_SOURCES =				\
+	fu-common.c					\
+	fu-device-locker.c				\
+	fu-progressbar.c				\
+	fu-quirks.c
+
+libfwupdprivate_a_CFLAGS =				\
+	-DFU_OFFLINE_DESTDIR=\"\"			\
+	-DLOCALSTATEDIR=\""$(localstatedir)"\"		\
+	$(WARN_CFLAGS)
+
+bin_PROGRAMS = fwupdmgr
+
+fwupdmgr_SOURCES =					\
+	fu-device.c					\
+	fu-device.h					\
+	fu-pending.c					\
+	fu-pending.h					\
+	fu-common.c					\
+	fu-common.h					\
+	fu-smbios.c					\
+	fu-smbios.h					\
+	fu-hwids.c					\
+	fu-hwids.h					\
+	fu-progressbar.c				\
+	fu-progressbar.h				\
+	fu-util.c
+
+fwupdmgr_LDADD =					\
+	$(LIBM)						\
+	$(FWUPD_LIBS)					\
+	$(APPSTREAM_GLIB_LIBS)				\
+	$(SQLITE_LIBS)					\
+	$(SOUP_LIBS)					\
+	$(GUDEV_LIBS)					\
+	$(ARCHIVE_LIBS)					\
+	$(UUID_LIBS)					\
+	$(GLIB_LIBS)
+
+fwupdmgr_LDFLAGS =					\
+	$(PIE_LDFLAGS)					\
+	$(RELRO_LDFLAGS)
+
+fwupdmgr_CFLAGS =					\
+	-DFU_OFFLINE_DESTDIR=\"\"			\
+	-DLOCALSTATEDIR=\""$(localstatedir)"\"		\
+	$(WARN_CFLAGS)
+
+fwupd-resources.c: fwupd.gresource.xml $(dist_introspection_DATA)
+	$(AM_V_GEN)					\
+	glib-compile-resources				\
+		--sourcedir=$(srcdir)			\
+		--sourcedir=$(top_builddir)/data	\
+		--target=$@				\
+		--generate-source			\
+		--c-name fu				\
+		$(srcdir)/fwupd.gresource.xml
+fwupd-resources.h: fwupd.gresource.xml
+	$(AM_V_GEN)					\
+	glib-compile-resources				\
+		--sourcedir=$(srcdir)			\
+		--sourcedir=$(top_builddir)/data	\
+		--target=$@				\
+		--generate-header			\
+		--c-name fu				\
+		$(srcdir)/fwupd.gresource.xml
+
+pkglibexec_PROGRAMS =					\
+	fwupd
+
+fwupd_SOURCES =						\
+	fu-common.c					\
+	fu-common.h					\
+	fu-config.c					\
+	fu-config.h					\
+	fu-debug.c					\
+	fu-debug.h					\
+	fu-device.c					\
+	fu-device.h					\
+	fu-device-locker.c				\
+	fu-device-locker.h				\
+	fu-engine.c					\
+	fu-engine.h					\
+	fu-hwids.c					\
+	fu-hwids.h					\
+	fu-keyring.c					\
+	fu-keyring.h					\
+	fu-keyring-result.c				\
+	fu-keyring-result.h				\
+	fu-main.c					\
+	fu-pending.c					\
+	fu-pending.h					\
+	fu-plugin.c					\
+	fu-plugin.h					\
+	fu-plugin-private.h				\
+	fu-plugin-vfuncs.h				\
+	fu-quirks.c					\
+	fu-quirks.h					\
+	fu-quirks.h					\
+	fu-smbios.c					\
+	fu-smbios.h					\
+	fwupd-resources.c				\
+	fwupd-resources.h
+
+if ENABLE_PKCS7
+fwupd_SOURCES +=					\
+	fu-keyring-pkcs7.c				\
+	fu-keyring-pkcs7.h
+endif
+
+if ENABLE_GPG
+fwupd_SOURCES +=					\
+	fu-keyring-gpg.c				\
+	fu-keyring-gpg.h
+endif
+
+fwupd_LDADD =						\
+	$(FWUPD_LIBS)					\
+	$(APPSTREAM_GLIB_LIBS)				\
+	$(GUSB_LIBS)					\
+	$(GCAB_LIBS)					\
+	$(GLIB_LIBS)					\
+	$(GUDEV_LIBS)					\
+	$(POLKIT_LIBS)					\
+	$(SQLITE_LIBS)					\
+	$(GPGME_LIBS)					\
+	$(UUID_LIBS)					\
+	$(GNUTLS_LIBS)					\
+	$(ARCHIVE_LIBS)
+
+fwupd_LDFLAGS =						\
+	$(PIE_LDFLAGS)					\
+	$(RELRO_LDFLAGS)
+
+fwupd_CFLAGS =						\
+	-DFU_OFFLINE_DESTDIR=\"\"			\
+	-DLOCALSTATEDIR=\""$(localstatedir)"\"		\
+	$(WARN_CFLAGS)
+
+install-data-hook:
+	if test -w $$(dirname $(DESTDIR)$(localstatedir)/); then \
+		mkdir -p $(DESTDIR)$(localstatedir)/lib/fwupd; \
+		chmod 0755 $(DESTDIR)$(localstatedir)/lib/fwupd; \
+	fi
+
+BUILT_SOURCES =						\
+	fwupd-resources.c				\
+	fwupd-resources.h
+
+CLEANFILES = $(BUILT_SOURCES) *.log *.trs
+
+EXTRA_DIST =							\
+	fwupd.gresource.xml					\
+	fwupdmgr.sgml						\
+	$(man_MANS_DIST)
+
+man_MANS_DIST =					 		\
+	fwupdmgr.1
+
+man_MANS =							\
+	$(man_MANS_DIST)
+
+fwupdmgr.1: fwupdmgr.sgml
+	$(AM_V_GEN)						\
+	$(DOCBOOK2MAN) $? > /dev/null
+
+MAINTAINERCLEANFILES =						\
+	findings						\
+	manpage.links						\
+	manpage.log						\
+	manpage.refs						\
+	$(man_MANS)
+
+clean-local :
+	rm -f *~
+	rm -f *.1
+	rm -f manpage.*
+
+-include $(top_srcdir)/git.mk
diff --git a/src/fwupdmgr.sgml b/src/fwupdmgr.sgml
new file mode 100644
index 0000000..119b967
--- /dev/null
+++ b/src/fwupdmgr.sgml
@@ -0,0 +1,248 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY date        "<date>26 February,2015</date>">
+  <!ENTITY package     "fwupdmgr">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      <email>richard@hughsie.com</email>;
+    </address>
+    <author>
+      <firstname>Richard</firstname>
+      <surname>Hughes</surname>
+    </author>
+    <copyright>
+      <year>2015</year>
+      <holder>Richard Hughes</holder>
+    </copyright>
+    &date;
+  </refentryinfo>
+  <refmeta>
+    <refentrytitle>fwupdmgr</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+  <refnamediv>
+    <refname>&package;</refname>
+    <refpurpose>fwupd client tool</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&package;</command>
+      <arg><option>options</option></arg>
+      <arg>COMMAND</arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+    <para>
+      This manual page documents briefly the <command>&package;</command> command.
+    </para>
+    <para>
+      <command>&package;</command> allows an administrator to update firmware.
+    </para>
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+    <para>
+      This program follows the usual &gnu; command line syntax,
+      with long options starting with two dashes (`-').  A summary of
+      options is included below.
+    </para>
+    <variablelist>
+      <varlistentry>
+        <term>
+          <option>--help</option>
+        </term>
+        <listitem>
+          <para>Show summary of options.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>--verbose</option>
+        </term>
+        <listitem>
+          <para>Show extra debugging information.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>--allow-reinstall</option>
+        </term>
+        <listitem>
+          <para>Allow re-installing existing firmware versions.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>--allow-older</option>
+        </term>
+        <listitem>
+          <para>Allow downgrading firmware versions.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>--offline</option>
+        </term>
+        <listitem>
+          <para>Schedule installation for next reboot when possible.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>--force</option>
+        </term>
+        <listitem>
+          <para>Override plugin warning.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>COMMANDS</title>
+    <para>
+      This program takes commands with a variable number of arguments.
+    </para>
+    <variablelist>
+      <varlistentry>
+        <term>
+          <option>get-details</option>
+        </term>
+        <listitem>
+          <para>Gets details about a firmware file.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>get-devices</option>
+        </term>
+        <listitem>
+          <para>Get the list of hardware that supports firmware updates.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>get-updates</option>
+        </term>
+        <listitem>
+          <para>Gets the list of updates for connected hardware.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>update</option>
+        </term>
+        <listitem>
+          <para>Updates all firmware to latest versions available.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>install</option>
+        </term>
+        <listitem>
+          <para>Install a firmware file on this hardware.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>install-prepared</option>
+        </term>
+        <listitem>
+          <para>Install prepared updates now.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>clear-results</option>
+        </term>
+        <listitem>
+          <para>Clears the results from the last update.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>dump-rom</option>
+        </term>
+        <listitem>
+          <para>Dump the ROM checksum.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>monitor</option>
+        </term>
+        <listitem>
+          <para>Monitor the daemon for events.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>unlock</option>
+        </term>
+        <listitem>
+          <para>Unlocks the devicefor firmware access.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>verify</option>
+        </term>
+        <listitem>
+          <para>Gets the cryptographic hash of the dumped firmware.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>verify-update</option>
+        </term>
+        <listitem>
+          <para>Update the stored metadata with current ROM contents.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>refresh</option>
+        </term>
+        <listitem>
+          <para>Refresh metadata from remote server.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
+          <option>get-results</option>
+        </term>
+        <listitem>
+          <para>Gets the results from the last update.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+    <para>This manual page was written by Richard Hughes <email>richard@hughsie.com</email>.
+    </para>
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->