diff --git a/Makefile.am b/Makefile.am index 7395b0779..b52e60715 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,6 +49,10 @@ MAINTAINERCLEANFILES = \ $(srcdir)/fwupd-*.tar.* \ `find "$(srcdir)" -type f -name Makefile.in -print` +DISTCHECK_CONFIGURE_FLAGS = \ + --enable-colorhug \ + --enable-uefi + GITIGNOREFILES = \ .tx diff --git a/README.md b/README.md index 54ec09b01..7632886b1 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,17 @@ fwupd ===== fwupd is a simple daemon to allow session software to update UEFI firmware. + +ColorHug Support +================ + +You need to install colord 1.2.9 which may be newer that your distribution +provides. Compile it from source https://github.com/hughsie/colord or grab the +RPMS here http://people.freedesktop.org/~hughsient/fedora/ + +UEFI Support +============ + +If you're wondering where to get fwupdate from, either compile it form source +(you might also need a newer efivar) from https://github.com/rhinstaller/fwupdate +or grab the RPMs here https://pjones.fedorapeople.org/fwupdate/ diff --git a/configure.ac b/configure.ac index 48a7b5ea9..bef7eb2d1 100644 --- a/configure.ac +++ b/configure.ac @@ -87,13 +87,30 @@ dnl - Check library dependencies dnl --------------------------------------------------------------------------- PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.36.0 gobject-2.0 gthread-2.0 gio-2.0 >= 2.25.9 gio-unix-2.0) PKG_CHECK_MODULES(GUDEV, gudev-1.0) -PKG_CHECK_MODULES(COLORHUG, colorhug >= 1.2.9 gusb >= 0.2.2) PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.103) PKG_CHECK_MODULES(GCAB, libgcab-1.0) PKG_CHECK_MODULES(APPSTREAM_GLIB, appstream-glib) PKG_CHECK_MODULES(SQLITE, sqlite3) AC_PATH_PROG(DOCBOOK2MAN, docbook2man) +# ColorHug support +AC_ARG_ENABLE(colorhug, AS_HELP_STRING([--enable-colorhug],[Enable ColorHug support]), + enable_colorhug=$enableval, enable_colorhug=yes) +if test x$enable_colorhug != xno; then + PKG_CHECK_MODULES(COLORHUG, colorhug >= 1.2.9 gusb >= 0.2.2) + AC_DEFINE(HAVE_COLORHUG,1,[Use ColorHug support]) +fi +AM_CONDITIONAL(HAVE_COLORHUG, test x$enable_colorhug = xyes) + +# UEFI support +AC_ARG_ENABLE(uefi, AS_HELP_STRING([--enable-uefi],[Enable ColorHug support]), + enable_uefi=$enableval, enable_uefi=yes) +if test x$enable_uefi != xno; then + PKG_CHECK_MODULES(UEFI, fwup) + AC_DEFINE(HAVE_UEFI,1,[Use ColorHug support]) +fi +AM_CONDITIONAL(HAVE_UEFI, test x$enable_uefi = xyes) + dnl --------------------------------------------------------------------------- dnl - Makefiles, etc. dnl --------------------------------------------------------------------------- diff --git a/src/Makefile.am b/src/Makefile.am index 6054beada..886629e40 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,12 +4,13 @@ dist_introspection_DATA = \ AM_CPPFLAGS = \ $(APPSTREAM_GLIB_CFLAGS) \ - $(PIE_CFLAGS) \ - $(GCAB_CFLAGS) \ $(COLORHUG_CFLAGS) \ + $(GCAB_CFLAGS) \ $(GLIB_CFLAGS) \ - $(POLKIT_CFLAGS) \ $(GUDEV_CFLAGS) \ + $(PIE_CFLAGS) \ + $(POLKIT_CFLAGS) \ + $(UEFI_CFLAGS) \ -DG_LOG_DOMAIN=\"Fu\" \ -DLIBEXECDIR=\"$(libexecdir)\" \ -DLIBDIR=\"$(libdir)\" \ @@ -77,22 +78,31 @@ fwupd_SOURCES = \ fu-pending.h \ fu-provider.c \ fu-provider.h \ - fu-provider-chug.c \ - fu-provider-chug.h \ - fu-provider-uefi.c \ - fu-provider-uefi.h \ fu-resources.c \ fu-resources.h \ fu-main.c +if HAVE_COLORHUG +fwupd_SOURCES += \ + fu-provider-chug.c \ + fu-provider-chug.h +endif + +if HAVE_UEFI +fwupd_SOURCES += \ + fu-provider-uefi.c \ + fu-provider-uefi.h +endif + fwupd_LDADD = \ $(APPSTREAM_GLIB_LIBS) \ $(COLORHUG_LIBS) \ - $(POLKIT_LIBS) \ - $(GUDEV_LIBS) \ $(GCAB_LIBS) \ + $(GLIB_LIBS) \ + $(GUDEV_LIBS) \ + $(POLKIT_LIBS) \ $(SQLITE_LIBS) \ - $(GLIB_LIBS) + $(UEFI_LIBS) fwupd_LDFLAGS = \ $(PIE_LDFLAGS) \ diff --git a/src/fu-main.c b/src/fu-main.c index 6c703f1ed..29c6c9683 100644 --- a/src/fu-main.c +++ b/src/fu-main.c @@ -37,10 +37,16 @@ #include "fu-common.h" #include "fu-debug.h" #include "fu-device.h" -#include "fu-provider-chug.h" -#include "fu-provider-uefi.h" +#include "fu-provider.h" #include "fu-resources.h" +#ifdef HAVE_COLORHUG + #include "fu-provider-chug.h" +#endif +#ifdef HAVE_UEFI + #include "fu-provider-uefi.h" +#endif + typedef struct { GDBusConnection *connection; GDBusNodeInfo *introspection_daemon; @@ -792,8 +798,12 @@ main (int argc, char *argv[]) /* add providers */ priv->providers = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); +#ifdef HAVE_COLORHUG fu_main_add_provider (priv, fu_provider_chug_new ()); +#endif +#ifdef HAVE_UEFI fu_main_add_provider (priv, fu_provider_uefi_new ()); +#endif /* load introspection from file */ priv->introspection_daemon = fu_main_load_introspection (FWUPD_DBUS_INTERFACE ".xml",