# HG changeset patch
# Node ID d732605104be
# Parent  fd15c46eb216
diff --git a/libpurple/plugins/autoaccept.c b/libpurple/plugins/autoaccept/autoaccept.c
rename from libpurple/plugins/autoaccept.c
rename to libpurple/plugins/autoaccept/autoaccept.c
diff --git a/libpurple/plugins/autoaccept/meson.build b/libpurple/plugins/autoaccept/meson.build
new file mode 100644
--- /dev/null
+++ b/libpurple/plugins/autoaccept/meson.build
@@ -0,0 +1,7 @@
+autoaccept = library('autoaccept', 'autoaccept.c',
+    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-AutoAccept"'],
+    dependencies : [libpurple_dep, glib],
+    name_prefix : '',
+    install : true, install_dir : PURPLE_PLUGINDIR)
+
+devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
diff --git a/libpurple/plugins/buddynote.c b/libpurple/plugins/buddynote/buddynote.c
rename from libpurple/plugins/buddynote.c
rename to libpurple/plugins/buddynote/buddynote.c
diff --git a/libpurple/plugins/buddynote/meson.build b/libpurple/plugins/buddynote/meson.build
new file mode 100644
--- /dev/null
+++ b/libpurple/plugins/buddynote/meson.build
@@ -0,0 +1,7 @@
+buddynote = library('buddynote', 'buddynote.c',
+    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-BuddyNote"'],
+    dependencies : [libpurple_dep],
+    name_prefix : '',
+    install : true, install_dir : PURPLE_PLUGINDIR)
+
+devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
diff --git a/libpurple/plugins/idle.c b/libpurple/plugins/idle/idle.c
rename from libpurple/plugins/idle.c
rename to libpurple/plugins/idle/idle.c
diff --git a/libpurple/plugins/idle/meson.build b/libpurple/plugins/idle/meson.build
new file mode 100644
--- /dev/null
+++ b/libpurple/plugins/idle/meson.build
@@ -0,0 +1,7 @@
+idle = library('idle', 'idle.c',
+    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-Idle"'],
+    dependencies : [libpurple_dep],
+    name_prefix : '',
+    install : true, install_dir : PURPLE_PLUGINDIR)
+
+devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
diff --git a/libpurple/plugins/joinpart.c b/libpurple/plugins/joinpart/joinpart.c
rename from libpurple/plugins/joinpart.c
rename to libpurple/plugins/joinpart/joinpart.c
diff --git a/libpurple/plugins/joinpart/meson.build b/libpurple/plugins/joinpart/meson.build
new file mode 100644
--- /dev/null
+++ b/libpurple/plugins/joinpart/meson.build
@@ -0,0 +1,7 @@
+joinpart = library('joinpart', 'joinpart.c',
+    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-JoinPart"'],
+    dependencies : [libpurple_dep],
+    name_prefix : '',
+    install : true, install_dir : PURPLE_PLUGINDIR)
+
+devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
diff --git a/libpurple/plugins/meson.build b/libpurple/plugins/meson.build
--- a/libpurple/plugins/meson.build
+++ b/libpurple/plugins/meson.build
@@ -1,49 +1,12 @@
+subdir('autoaccept')
+subdir('buddynote')
+subdir('idle')
+subdir('joinpart')
 subdir('keychain-access')
 subdir('kwallet')
 subdir('libsecret')
 subdir('notification-sound')
+subdir('psychic')
+subdir('purple-toast')
+subdir('statenotify')
 subdir('wincred')
-
-autoaccept = library('autoaccept', 'autoaccept.c',
-    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-AutoAccept"'],
-    dependencies : [libpurple_dep, glib],
-    name_prefix : '',
-    install : true, install_dir : PURPLE_PLUGINDIR)
-
-buddynote = library('buddynote', 'buddynote.c',
-    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-BuddyNote"'],
-    dependencies : [libpurple_dep],
-    name_prefix : '',
-    install : true, install_dir : PURPLE_PLUGINDIR)
-
-idle = library('idle', 'idle.c',
-    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-Idle"'],
-    dependencies : [libpurple_dep],
-    name_prefix : '',
-    install : true, install_dir : PURPLE_PLUGINDIR)
-
-joinpart = library('joinpart', 'joinpart.c',
-    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-JoinPart"'],
-    dependencies : [libpurple_dep],
-    name_prefix : '',
-    install : true, install_dir : PURPLE_PLUGINDIR)
-
-psychic = library('psychic', 'psychic.c',
-    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-Psychic"'],
-    dependencies : [libpurple_dep],
-    name_prefix : '',
-    install : true, install_dir : PURPLE_PLUGINDIR)
-
-statenotify = library('statenotify', 'statenotify.c',
-    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-StateNotify"'],
-    dependencies : [libpurple_dep],
-    name_prefix : '',
-    install : true, install_dir : PURPLE_PLUGINDIR)
-
-purple_toast = library('purple-toast', 'purple-toast.c',
-	c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-Toast"'],
-	dependencies : [libpurple_dep],
-	name_prefix: '',
-	install : true, install_dir : PURPLE_PLUGINDIR)
-
-devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
diff --git a/libpurple/plugins/psychic.c b/libpurple/plugins/psychic/psychic.c
rename from libpurple/plugins/psychic.c
rename to libpurple/plugins/psychic/psychic.c
diff --git a/libpurple/plugins/psychic/meson.build b/libpurple/plugins/psychic/meson.build
new file mode 100644
--- /dev/null
+++ b/libpurple/plugins/psychic/meson.build
@@ -0,0 +1,7 @@
+psychic = library('psychic', 'psychic.c',
+    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-Psychic"'],
+    dependencies : [libpurple_dep],
+    name_prefix : '',
+    install : true, install_dir : PURPLE_PLUGINDIR)
+
+devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
diff --git a/libpurple/plugins/purple-toast.c b/libpurple/plugins/purple-toast/purple-toast.c
rename from libpurple/plugins/purple-toast.c
rename to libpurple/plugins/purple-toast/purple-toast.c
diff --git a/libpurple/plugins/purple-toast/meson.build b/libpurple/plugins/purple-toast/meson.build
new file mode 100644
--- /dev/null
+++ b/libpurple/plugins/purple-toast/meson.build
@@ -0,0 +1,7 @@
+purple_toast = library('purple-toast', 'purple-toast.c',
+	c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-Toast"'],
+	dependencies : [libpurple_dep],
+	name_prefix: '',
+	install : true, install_dir : PURPLE_PLUGINDIR)
+
+devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
diff --git a/libpurple/plugins/statenotify.c b/libpurple/plugins/statenotify/statenotify.c
rename from libpurple/plugins/statenotify.c
rename to libpurple/plugins/statenotify/statenotify.c
diff --git a/libpurple/plugins/statenotify/meson.build b/libpurple/plugins/statenotify/meson.build
new file mode 100644
--- /dev/null
+++ b/libpurple/plugins/statenotify/meson.build
@@ -0,0 +1,7 @@
+statenotify = library('statenotify', 'statenotify.c',
+    c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="PurplePlugin-StateNotify"'],
+    dependencies : [libpurple_dep],
+    name_prefix : '',
+    install : true, install_dir : PURPLE_PLUGINDIR)
+
+devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
