On 4/11/23 17:57, Max Kellermann wrote:
On 2023/04/11 17:40, Andreas Henriksson <andr...@fatal.se> wrote:
I think 2 is better myself and I'm attaching a proof of concept
debdiff to implement it. (You might want to make a cleaner version.)
Agree. I think your patch looks quite clean, and if it were submitted
to me, I'd merge it (the same would probably be necessary for the user
units).
Here is an updated version (with user unit patch).
I did not get through all the thread in #1031695 then I'm not sure about
user unit location, but relying on systemd.pc ship them in
/usr/lib/systemd/user/, hopes it's fine.
Please review, I'm not super confident with my meson expertise.
I wont be able push these changes until next week, then please go ahead
if needed.
Cheers,
k
diff -Nru mpd-0.23.12/debian/changelog mpd-0.23.12/debian/changelog
--- mpd-0.23.12/debian/changelog 2023-01-21 21:32:37.000000000 +0100
+++ mpd-0.23.12/debian/changelog 2023-04-11 19:36:16.000000000 +0200
@@ -1,3 +1,11 @@
+mpd (0.23.12-2) UNRELEASED; urgency=medium
+
+ [ Andreas Henriksson ]
+ * Add debian/patches/systemdsystemunitdir.patch
+ * Add systemd build-dep for systemd.pc
+
+ -- Geoffroy Youri Berret <kal...@debian.org> Tue, 11 Apr 2023 19:36:16 +0200
+
mpd (0.23.12-1) unstable; urgency=medium
* New upstream version 0.23.12
diff -Nru mpd-0.23.12/debian/control mpd-0.23.12/debian/control
--- mpd-0.23.12/debian/control 2023-01-21 21:32:37.000000000 +0100
+++ mpd-0.23.12/debian/control 2023-04-11 19:36:16.000000000 +0200
@@ -55,6 +55,7 @@
libsoxr-dev,
libsqlite3-dev,
libsystemd-dev [linux-any],
+ systemd [linux-any],
libupnp-dev (>= 1.8~),
liburing-dev [linux-any],
libvorbis-dev [!armel],
diff -Nru mpd-0.23.12/debian/patches/series mpd-0.23.12/debian/patches/series
--- mpd-0.23.12/debian/patches/series 2023-01-21 21:32:37.000000000 +0100
+++ mpd-0.23.12/debian/patches/series 2023-04-11 19:36:16.000000000 +0200
@@ -1,3 +1,4 @@
# Debian-specific
systemd_honor_MPDCONF.patch
mpd.service.documentation.user.patch
+systemdsystemunitdir.patch
diff -Nru mpd-0.23.12/debian/patches/systemdsystemunitdir.patch
mpd-0.23.12/debian/patches/systemdsystemunitdir.patch
--- mpd-0.23.12/debian/patches/systemdsystemunitdir.patch 1970-01-01
01:00:00.000000000 +0100
+++ mpd-0.23.12/debian/patches/systemdsystemunitdir.patch 2023-04-11
19:36:16.000000000 +0200
@@ -0,0 +1,28 @@
+--- a/systemd/system/meson.build
++++ b/systemd/system/meson.build
+@@ -1,5 +1,11 @@
+ systemd_system_unit_dir = get_option('systemd_system_unit_dir')
+ if systemd_system_unit_dir == ''
++ systemd = dependency('systemd', required: false)
++ if systemd.found()
++ systemd_system_unit_dir =
systemd.get_pkgconfig_variable('systemdsystemunitdir')
++ endif
++endif
++if systemd_system_unit_dir == ''
+ systemd_system_unit_dir = join_paths(get_option('prefix'), 'lib',
'systemd', 'system')
+ endif
+
+--- a/systemd/user/meson.build
++++ b/systemd/user/meson.build
+@@ -1,5 +1,11 @@
+ systemd_user_unit_dir = get_option('systemd_user_unit_dir')
+ if systemd_user_unit_dir == ''
++ systemd = dependency('systemd', required: false)
++ if systemd.found()
++ systemd_user_unit_dir =
systemd.get_pkgconfig_variable('systemduserunitdir')
++ endif
++endif
++if systemd_user_unit_dir == ''
+ systemd_user_unit_dir = join_paths(get_option('prefix'), 'lib', 'systemd',
'user')
+ endif
+