From 319a6bab120c395e447cbed7ac3ebc3598332b1b Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 12 Dec 2016 11:49:11 +0000 Subject: [PATCH] Move the plugins into plugin-specific directories This will allow us to add further documentation here in the future. --- Makefile.am | 3 ++- configure.ac | 4 +++- contrib/fwupd.spec.in | 3 ++- plugins/Makefile.am | 1 + .../steelseries}/Makefile.am | 14 +++---------- plugins/steelseries/README.md | 9 +++++++++ .../steelseries}/fu-plugin-steelseries.c | 0 plugins/test/Makefile.am | 20 +++++++++++++++++++ plugins/test/README.md | 7 +++++++ .../plugins => plugins/test}/fu-plugin-test.c | 0 src/Makefile.am | 2 -- 11 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 plugins/Makefile.am rename {src/plugins => plugins/steelseries}/Makefile.am (61%) create mode 100644 plugins/steelseries/README.md rename {src/plugins => plugins/steelseries}/fu-plugin-steelseries.c (100%) create mode 100644 plugins/test/Makefile.am create mode 100644 plugins/test/README.md rename {src/plugins => plugins/test}/fu-plugin-test.c (100%) diff --git a/Makefile.am b/Makefile.am index 70f0003b2..3168066ef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,8 @@ SUBDIRS = \ data \ docs \ policy \ - src + src \ + plugins snapshot: $(MAKE) dist distdir=$(PACKAGE)-$(VERSION)-`date +"%Y%m%d"` diff --git a/configure.ac b/configure.ac index 089155294..4742248b8 100644 --- a/configure.ac +++ b/configure.ac @@ -327,7 +327,9 @@ docs/version.xml policy/Makefile po/Makefile.in src/Makefile -src/plugins/Makefile +plugins/Makefile +plugins/test/Makefile +plugins/steelseries/Makefile ]) AC_OUTPUT diff --git a/contrib/fwupd.spec.in b/contrib/fwupd.spec.in index 607d7aea7..e7716919f 100644 --- a/contrib/fwupd.spec.in +++ b/contrib/fwupd.spec.in @@ -154,7 +154,8 @@ make check VERBOSE=1 %dir %{_localstatedir}/cache/app-info/xmls /usr/lib/udev/rules.d/*.rules %dir %{_libdir}/fwupd-plugins-1 -%{_libdir}/fwupd-plugins-1/*.so +%{_libdir}/fwupd-plugins-1/libfu_plugin_steelseries.so +%{_libdir}/fwupd-plugins-1/libfu_plugin_test.so %ghost %{_localstatedir}/lib/fwupd/gnupg %files devel diff --git a/plugins/Makefile.am b/plugins/Makefile.am new file mode 100644 index 000000000..67ff923e0 --- /dev/null +++ b/plugins/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = test steelseries diff --git a/src/plugins/Makefile.am b/plugins/steelseries/Makefile.am similarity index 61% rename from src/plugins/Makefile.am rename to plugins/steelseries/Makefile.am index 00ac1ef9f..ed54b5f17 100644 --- a/src/plugins/Makefile.am +++ b/plugins/steelseries/Makefile.am @@ -1,4 +1,3 @@ - AM_CPPFLAGS = \ $(APPSTREAM_GLIB_CFLAGS) \ $(GUSB_CFLAGS) \ @@ -8,16 +7,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src plugindir = $(libdir)/fwupd-plugins-1 -plugin_LTLIBRARIES = \ - libfu_plugin_steelseries.la \ - 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\" +plugin_LTLIBRARIES = libfu_plugin_steelseries.la libfu_plugin_steelseries_la_SOURCES = \ fu-plugin-steelseries.c @@ -26,4 +16,6 @@ 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/steelseries/README.md b/plugins/steelseries/README.md new file mode 100644 index 000000000..314feffef --- /dev/null +++ b/plugins/steelseries/README.md @@ -0,0 +1,9 @@ +SteelSeries Support +=================== + +Introduction +------------ + +This plugin is used to get the correct version number on SteelSeries gaming +mice. These mice have updatable firmware but so far no updates are available +from the vendor. diff --git a/src/plugins/fu-plugin-steelseries.c b/plugins/steelseries/fu-plugin-steelseries.c similarity index 100% rename from src/plugins/fu-plugin-steelseries.c rename to plugins/steelseries/fu-plugin-steelseries.c diff --git a/plugins/test/Makefile.am b/plugins/test/Makefile.am new file mode 100644 index 000000000..e92dd8842 --- /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-1 +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/test/README.md b/plugins/test/README.md new file mode 100644 index 000000000..bef15c829 --- /dev/null +++ b/plugins/test/README.md @@ -0,0 +1,7 @@ +Test Support +============ + +Introduction +------------ + +This plugin is used when running the self tests in the fwupd project. diff --git a/src/plugins/fu-plugin-test.c b/plugins/test/fu-plugin-test.c similarity index 100% rename from src/plugins/fu-plugin-test.c rename to plugins/test/fu-plugin-test.c diff --git a/src/Makefile.am b/src/Makefile.am index 3eeac1540..6f38b391f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,3 @@ -SUBDIRS = plugins - introspectiondir = $(datadir)/dbus-1/interfaces dist_introspection_DATA = \ org.freedesktop.fwupd.xml