daandemeyer / rpms / systemd

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