mirror of
https://github.com/systemd/systemd.git
synced 2025-01-12 13:18:14 +03:00
meson: define PROJECT_VERSION as the "bare" project version
Let's not use atoi() if we can simply provide the project version as a number. In C code, this is the numerical project version. In substitutions in other files, this is just the bare substitution. The "PACKAGE_" prefix is from autotools, and is strange. We call systemd a "project", and "package" is something that distros build. Let's rename. PACKAGE_URL is renamed to PROJECT_URL for the same reasons and for consistency. (This leave PACKAGE_VERSION as the stringified define for C code.)
This commit is contained in:
parent
d2aaf13099
commit
a67c318df8
@ -20,11 +20,12 @@ libudev_version = '1.6.11'
|
|||||||
# names, sometimes. Not all variables are included in every
|
# names, sometimes. Not all variables are included in every
|
||||||
# set. Ugh, ugh, ugh!
|
# set. Ugh, ugh, ugh!
|
||||||
conf = configuration_data()
|
conf = configuration_data()
|
||||||
|
conf.set('PROJECT_VERSION', meson.project_version())
|
||||||
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||||
|
|
||||||
substs = configuration_data()
|
substs = configuration_data()
|
||||||
substs.set('PACKAGE_URL', 'https://www.freedesktop.org/wiki/Software/systemd')
|
substs.set('PROJECT_URL', 'https://www.freedesktop.org/wiki/Software/systemd')
|
||||||
substs.set('PACKAGE_VERSION', meson.project_version())
|
substs.set('PROJECT_VERSION', meson.project_version())
|
||||||
|
|
||||||
want_ossfuzz = get_option('oss-fuzz')
|
want_ossfuzz = get_option('oss-fuzz')
|
||||||
want_libfuzzer = get_option('llvm-fuzz')
|
want_libfuzzer = get_option('llvm-fuzz')
|
||||||
|
@ -36,5 +36,5 @@ containeruidbasemax=@containeruidbasemax@
|
|||||||
|
|
||||||
Name: systemd
|
Name: systemd
|
||||||
Description: systemd System and Service Manager
|
Description: systemd System and Service Manager
|
||||||
URL: @PACKAGE_URL@
|
URL: @PROJECT_URL@
|
||||||
Version: @PACKAGE_VERSION@
|
Version: @PROJECT_VERSION@
|
||||||
|
@ -14,7 +14,7 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: systemd
|
Name: systemd
|
||||||
Description: systemd Library
|
Description: systemd Library
|
||||||
URL: @PACKAGE_URL@
|
URL: @PROJECT_URL@
|
||||||
Version: @PACKAGE_VERSION@
|
Version: @PROJECT_VERSION@
|
||||||
Libs: -L${libdir} -lsystemd
|
Libs: -L${libdir} -lsystemd
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
@ -367,7 +367,7 @@ static int trie_store(struct trie *trie, const char *filename, bool compat) {
|
|||||||
int64_t size;
|
int64_t size;
|
||||||
struct trie_header_f h = {
|
struct trie_header_f h = {
|
||||||
.signature = HWDB_SIG,
|
.signature = HWDB_SIG,
|
||||||
.tool_version = htole64(atoi(PACKAGE_VERSION)),
|
.tool_version = htole64(PROJECT_VERSION),
|
||||||
.header_size = htole64(sizeof(struct trie_header_f)),
|
.header_size = htole64(sizeof(struct trie_header_f)),
|
||||||
.node_size = htole64(sizeof(struct trie_node_f)),
|
.node_size = htole64(sizeof(struct trie_node_f)),
|
||||||
.child_entry_size = htole64(sizeof(struct trie_child_entry_f)),
|
.child_entry_size = htole64(sizeof(struct trie_child_entry_f)),
|
||||||
|
@ -14,6 +14,6 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: libudev
|
Name: libudev
|
||||||
Description: Library to access udev device information
|
Description: Library to access udev device information
|
||||||
Version: @PACKAGE_VERSION@
|
Version: @PROJECT_VERSION@
|
||||||
Libs: -L${libdir} -ludev
|
Libs: -L${libdir} -ludev
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
@ -531,7 +531,7 @@ static void test_hidden_or_backup_file(void) {
|
|||||||
|
|
||||||
static void test_systemd_installation_has_version(const char *path) {
|
static void test_systemd_installation_has_version(const char *path) {
|
||||||
int r;
|
int r;
|
||||||
const unsigned versions[] = {0, 231, atoi(PACKAGE_VERSION), 999};
|
const unsigned versions[] = {0, 231, PROJECT_VERSION, 999};
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
for (i = 0; i < ELEMENTSOF(versions); i++) {
|
for (i = 0; i < ELEMENTSOF(versions); i++) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Name: udev
|
Name: udev
|
||||||
Description: udev
|
Description: udev
|
||||||
Version: @PACKAGE_VERSION@
|
Version: @PROJECT_VERSION@
|
||||||
|
|
||||||
udevdir=@udevlibexecdir@
|
udevdir=@udevlibexecdir@
|
||||||
|
Loading…
Reference in New Issue
Block a user