From d30d9bf0acbd8dce97299b7485691f6309810da6 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Mon, 12 Jun 2023 00:41:49 +0100
Subject: [PATCH] meson: add systemd.pc and udev.pc to 'devel' target/tag

Same as the other pkg-config files, it is useful to install these in a specific
target that doesn't require compiling anything
---
 meson.build          |  4 ++--
 src/core/meson.build | 10 +++++++++-
 src/udev/meson.build |  3 ++-
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 5e97284786f..87af0ea15e9 100644
--- a/meson.build
+++ b/meson.build
@@ -2214,8 +2214,6 @@ subdir('src/udev')
 subdir('src/libudev')
 subdir('src/cryptsetup/cryptsetup-tokens')
 
-alias_target('devel', libsystemd_pc, libudev_pc)
-
 libsystemd = shared_library(
         'systemd',
         version : libsystemd_version,
@@ -2410,6 +2408,8 @@ subdir('rules.d')
 subdir('test')
 subdir('src/ukify/test')  # needs to be last for test_env variable
 
+alias_target('devel', libsystemd_pc, libudev_pc, systemd_pc, udev_pc)
+
 ############################################################
 
 # only static linking apart from libdl, to make sure that the
diff --git a/src/core/meson.build b/src/core/meson.build
index 152b5d4c5d2..91477afc9cf 100644
--- a/src/core/meson.build
+++ b/src/core/meson.build
@@ -144,7 +144,6 @@ systemd_sources = files(
 
 in_files = [['system.conf',                     pkgsysconfdir],
             ['user.conf',                       pkgsysconfdir],
-            ['systemd.pc',                      pkgconfigdatadir],
             ['org.freedesktop.systemd1.policy', polkitpolicydir]]
 
 foreach item : in_files
@@ -160,6 +159,15 @@ foreach item : in_files
                 install_dir : dir)
 endforeach
 
+systemd_pc = custom_target(
+        'systemd.pc',
+        input : 'systemd.pc.in',
+        output : 'systemd.pc',
+        command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
+        install : pkgconfigdatadir != 'no',
+        install_tag : 'devel',
+        install_dir : pkgconfigdatadir)
+
 install_data('org.freedesktop.systemd1.conf',
              install_dir : dbuspolicydir)
 install_data('org.freedesktop.systemd1.service',
diff --git a/src/udev/meson.build b/src/udev/meson.build
index 081948d223f..369db33fe4a 100644
--- a/src/udev/meson.build
+++ b/src/udev/meson.build
@@ -154,12 +154,13 @@ if install_sysconfdir_samples
                      install_dir : sysconfdir / 'udev')
 endif
 
-custom_target(
+udev_pc = custom_target(
         'udev.pc',
         input : 'udev.pc.in',
         output : 'udev.pc',
         command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
         install : pkgconfigdatadir != 'no',
+        install_tag : 'devel',
         install_dir : pkgconfigdatadir)
 
 if install_sysconfdir