ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
21255d
From a6d76bf2d21e01a2e031e204966d946925ecc3f6 Mon Sep 17 00:00:00 2001
21255d
From: Jan Synacek <jsynacek@redhat.com>
21255d
Date: Mon, 17 Aug 2020 14:29:04 +0200
21255d
Subject: [PATCH] build: use simple project version in pkgconfig files
21255d
21255d
Loosely based on commit a67c318df8800ba98d7361308937ed276dc73982.
21255d
21255d
Resolves: #1862714
21255d
---
21255d
 meson.build                     | 2 ++
21255d
 src/core/systemd.pc.in          | 2 +-
21255d
 src/libsystemd/libsystemd.pc.in | 2 +-
21255d
 src/libudev/libudev.pc.in       | 2 +-
21255d
 src/udev/udev.pc.in             | 2 +-
21255d
 5 files changed, 6 insertions(+), 4 deletions(-)
21255d
21255d
diff --git a/meson.build b/meson.build
21255d
index 0ba3f924ea..65c1d0785e 100644
21255d
--- a/meson.build
21255d
+++ b/meson.build
21255d
@@ -27,12 +27,14 @@ endif
21255d
 # names, sometimes. Not all variables are included in every
21255d
 # set. Ugh, ugh, ugh!
21255d
 conf = configuration_data()
21255d
+conf.set_quoted('PROJECT_VERSION', meson.project_version())
21255d
 conf.set_quoted('PACKAGE_STRING',  meson.project_name() + ' ' + dist_version)
21255d
 conf.set_quoted('PACKAGE_VERSION', dist_version)
21255d
 
21255d
 substs = configuration_data()
21255d
 substs.set('PACKAGE_URL',          'https://www.freedesktop.org/wiki/Software/systemd')
21255d
 substs.set('PACKAGE_VERSION',      dist_version)
21255d
+substs.set('PROJECT_VERSION',      meson.project_version())
21255d
 
21255d
 #####################################################################
21255d
 
21255d
diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
21255d
index 655773ea8a..a350737cf2 100644
21255d
--- a/src/core/systemd.pc.in
21255d
+++ b/src/core/systemd.pc.in
21255d
@@ -37,4 +37,4 @@ containeruidbasemax=@containeruidbasemax@
21255d
 Name: systemd
21255d
 Description: systemd System and Service Manager
21255d
 URL: @PACKAGE_URL@
21255d
-Version: @PACKAGE_VERSION@
21255d
+Version: @PROJECT_VERSION@
21255d
diff --git a/src/libsystemd/libsystemd.pc.in b/src/libsystemd/libsystemd.pc.in
21255d
index c861905b67..85d6ebf293 100644
21255d
--- a/src/libsystemd/libsystemd.pc.in
21255d
+++ b/src/libsystemd/libsystemd.pc.in
21255d
@@ -15,6 +15,6 @@ includedir=@includedir@
21255d
 Name: systemd
21255d
 Description: systemd Library
21255d
 URL: @PACKAGE_URL@
21255d
-Version: @PACKAGE_VERSION@
21255d
+Version: @PROJECT_VERSION@
21255d
 Libs: -L${libdir} -lsystemd
21255d
 Cflags: -I${includedir}
21255d
diff --git a/src/libudev/libudev.pc.in b/src/libudev/libudev.pc.in
21255d
index 69f5c6463e..40b340362e 100644
21255d
--- a/src/libudev/libudev.pc.in
21255d
+++ b/src/libudev/libudev.pc.in
21255d
@@ -14,6 +14,6 @@ includedir=@includedir@
21255d
 
21255d
 Name: libudev
21255d
 Description: Library to access udev device information
21255d
-Version: @PACKAGE_VERSION@
21255d
+Version: @PROJECT_VERSION@
21255d
 Libs: -L${libdir} -ludev
21255d
 Cflags: -I${includedir}
21255d
diff --git a/src/udev/udev.pc.in b/src/udev/udev.pc.in
21255d
index e384a6f7c9..5acbb2d01a 100644
21255d
--- a/src/udev/udev.pc.in
21255d
+++ b/src/udev/udev.pc.in
21255d
@@ -1,5 +1,5 @@
21255d
 Name: udev
21255d
 Description: udev
21255d
-Version: @PACKAGE_VERSION@
21255d
+Version: @PROJECT_VERSION@
21255d
 
21255d
 udevdir=@udevlibexecdir@