# HG changeset patch
# Node ID 2e1bb0e3962a
# Parent  9f6a2c90800e
diff --git a/finch/plugins/gntclipboard.c b/finch/plugins/gntclipboard/gntclipboard.c
rename from finch/plugins/gntclipboard.c
rename to finch/plugins/gntclipboard/gntclipboard.c
diff --git a/finch/plugins/gntclipboard/meson.build b/finch/plugins/gntclipboard/meson.build
new file mode 100644
--- /dev/null
+++ b/finch/plugins/gntclipboard/meson.build
@@ -0,0 +1,9 @@
+if x11.found()
+	library('gntclipboard', 'gntclipboard.c',
+	    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Gnt-Clipboard"'],
+	    dependencies : [x11, libpurple_dep, libfinch_dep, glib],
+	    name_prefix : '',
+	    install : true, install_dir : FINCH_PLUGINDIR)
+endif
+
+devenv.append('FINCH_PLUGIN_PATH', meson.current_build_dir())
diff --git a/finch/plugins/gntgf.c b/finch/plugins/gntgf/gntgf.c
rename from finch/plugins/gntgf.c
rename to finch/plugins/gntgf/gntgf.c
diff --git a/finch/plugins/gntgf/meson.build b/finch/plugins/gntgf/meson.build
new file mode 100644
--- /dev/null
+++ b/finch/plugins/gntgf/meson.build
@@ -0,0 +1,13 @@
+if x11.found()
+	library('gntgf', 'gntgf.c',
+	    c_args : [
+	        ncurses_header,
+	        '-DG_LOG_USE_STRUCTURED',
+	        '-DG_LOG_DOMAIN="Gnt-GF"',
+	    ],
+	    dependencies : [x11, libpurple_dep, libfinch_dep, ncurses, glib],
+	    name_prefix : '',
+	    install : true, install_dir : FINCH_PLUGINDIR)
+endif
+
+devenv.append('FINCH_PLUGIN_PATH', meson.current_build_dir())
diff --git a/finch/plugins/gnttinyurl.c b/finch/plugins/gnttinyurl/gnttinyurl.c
rename from finch/plugins/gnttinyurl.c
rename to finch/plugins/gnttinyurl/gnttinyurl.c
diff --git a/finch/plugins/gnttinyurl/meson.build b/finch/plugins/gnttinyurl/meson.build
new file mode 100644
--- /dev/null
+++ b/finch/plugins/gnttinyurl/meson.build
@@ -0,0 +1,7 @@
+library('gnttinyurl', 'gnttinyurl.c',
+    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Gnt-TinyURL"'],
+    dependencies : [libpurple_dep, libfinch_dep, libsoup, glib],
+    name_prefix : '',
+    install : true, install_dir : FINCH_PLUGINDIR)
+
+devenv.append('FINCH_PLUGIN_PATH', meson.current_build_dir())
diff --git a/finch/plugins/grouping.c b/finch/plugins/grouping/grouping.c
rename from finch/plugins/grouping.c
rename to finch/plugins/grouping/grouping.c
diff --git a/finch/plugins/grouping/meson.build b/finch/plugins/grouping/meson.build
new file mode 100644
--- /dev/null
+++ b/finch/plugins/grouping/meson.build
@@ -0,0 +1,7 @@
+library('grouping', 'grouping.c',
+    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Gnt-Grouping"'],
+    dependencies : [libpurple_dep, libfinch_dep, glib],
+    name_prefix : '',
+    install : true, install_dir : FINCH_PLUGINDIR)
+
+devenv.append('FINCH_PLUGIN_PATH', meson.current_build_dir())
diff --git a/finch/plugins/lastlog.c b/finch/plugins/lastlog/lastlog.c
rename from finch/plugins/lastlog.c
rename to finch/plugins/lastlog/lastlog.c
diff --git a/finch/plugins/lastlog/meson.build b/finch/plugins/lastlog/meson.build
new file mode 100644
--- /dev/null
+++ b/finch/plugins/lastlog/meson.build
@@ -0,0 +1,7 @@
+library('gntlastlog', 'lastlog.c',
+    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Gnt-LastLog"'],
+    dependencies : [libpurple_dep, libfinch_dep, ncurses, glib],
+    name_prefix : '',
+    install : true, install_dir : FINCH_PLUGINDIR)
+
+devenv.append('FINCH_PLUGIN_PATH', meson.current_build_dir())
diff --git a/finch/plugins/meson.build b/finch/plugins/meson.build
--- a/finch/plugins/meson.build
+++ b/finch/plugins/meson.build
@@ -1,37 +1,5 @@
-if x11.found()
-	gntclipboard = library('gntclipboard', 'gntclipboard.c',
-	    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Gnt-Clipboard"'],
-	    dependencies : [x11, libpurple_dep, libfinch_dep, glib],
-	    name_prefix : '',
-	    install : true, install_dir : FINCH_PLUGINDIR)
-
-	gntgf = library('gntgf', 'gntgf.c',
-	    c_args : [
-	        ncurses_header,
-	        '-DG_LOG_USE_STRUCTURED',
-	        '-DG_LOG_DOMAIN="Gnt-GF"',
-	    ],
-	    dependencies : [x11, libpurple_dep, libfinch_dep, ncurses, glib],
-	    name_prefix : '',
-	    install : true, install_dir : FINCH_PLUGINDIR)
-endif
-
-gntlastlog = library('gntlastlog', 'lastlog.c',
-    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Gnt-LastLog"'],
-    dependencies : [libpurple_dep, libfinch_dep, ncurses, glib],
-    name_prefix : '',
-    install : true, install_dir : FINCH_PLUGINDIR)
-
-gnttinyurl = library('gnttinyurl', 'gnttinyurl.c',
-    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Gnt-TinyURL"'],
-    dependencies : [libpurple_dep, libfinch_dep, libsoup, glib],
-    name_prefix : '',
-    install : true, install_dir : FINCH_PLUGINDIR)
-
-grouping = library('grouping', 'grouping.c',
-    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Gnt-Grouping"'],
-    dependencies : [libpurple_dep, libfinch_dep, glib],
-    name_prefix : '',
-    install : true, install_dir : FINCH_PLUGINDIR)
-
-devenv.append('FINCH_PLUGIN_PATH', meson.current_build_dir())
+subdir('gntclipboard')
+subdir('gntgf')
+subdir('gnttinyurl')
+subdir('grouping')
+subdir('lastlog')
diff --git a/po/POTFILES.in b/po/POTFILES.in
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -16,11 +16,11 @@ finch/gntstatus.c
 finch/gntui.c
 finch/gntxfer.c
 finch/libfinch.c
-finch/plugins/gntclipboard.c
-finch/plugins/gntgf.c
-finch/plugins/gnttinyurl.c
-finch/plugins/grouping.c
-finch/plugins/lastlog.c
+finch/plugins/gntclipboard/gntclipboard.c
+finch/plugins/gntgf/gntgf.c
+finch/plugins/gnttinyurl/gnttinyurl.c
+finch/plugins/grouping/grouping.c
+finch/plugins/lastlog/lastlog.c
 libpurple/account.c
 libpurple/accounts.c
 libpurple/action.c
