ryantimwilson / rpms / systemd

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