Systemd/src/core/systemd.pc.in

45 lines
2.2 KiB
PkgConfig
Raw Normal View History

# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
prefix=@prefix@
rootprefix=@rootprefix_noslash@
pkgconfig: define variables relative to ${prefix}/${rootprefix}/${sysconfdir} Fixes #4549. People want to be able to redefine the prefixes relative to which the other variables are defined. Something like pkgconf --define-variable=prefix=/home/user/installpath --variable=systemdsystemunitdir systemd I'm not convinced that this entirely useful, because the installed systemd will not look at those paths, but maybe it's OK as an alternative type of $DESTDIR. This has been requested a few times over the years, so let's just provide this. I thought this would be more complicated, since we allow all kinds of directories to be overrides in the compilation configuration. But it turns out that all the directories defined in systemd.pc are relative to three prefixes: $prefix, $rootprefix, and $sysconfdir. So this patch adds $rootprefix and $sysconfdir to the .pc file and then changes the subsequent definitions in the .pc file to use them. In the end we define each path twice using the same rules: once in meson.build and once in the .pc file. Without overrides: $ for i in $(pkgconf --with-path=build/src/core systemd --print-variables); do echo -n "$i = "; pkgconf --with-path=$PWD/build/src/core --variable=$i systemd done containeruidbasemax = 1878982656 containeruidbasemin = 524288 dynamicuidmax = 65519 dynamicuidmin = 61184 systemgidmax = 999 systemuidmax = 999 catalogdir = /usr/lib/systemd/catalog modulesloaddir = /usr/lib/modules-load.d binfmtdir = /usr/lib/binfmt.d sysctldir = /usr/lib/sysctl.d sysusersdir = /usr/lib/sysusers.d tmpfilesdir = /usr/lib/tmpfiles.d systemdshutdowndir = /usr/lib/systemd/system-shutdown systemdsleepdir = /usr/lib/systemd/system-sleep systemdusergeneratordir = /usr/lib/systemd/user-generators systemdsystemgeneratordir = /usr/lib/systemd/system-generators systemduserunitpath = /etc/systemd/user:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:/usr/lib/systemd/user:/usr/lib/systemd/user:/usr/share/systemd/user systemdsystemunitpath = /etc/systemd/system:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:/usr/lib/systemd/system:/usr/lib/systemd/system:/lib/systemd/system systemduserconfdir = /etc/systemd/user systemdsystemconfdir = /etc/systemd/system systemduserpresetdir = /usr/lib/systemd/user-preset systemduserunitdir = /usr/lib/systemd/user systemdsystempresetdir = /usr/lib/systemd/system-preset systemdsystemunitdir = /usr/lib/systemd/system systemdutildir = /usr/lib/systemd sysconfdir = /etc rootprefix = /usr prefix = /usr pcfiledir = /usr/share/pkgconfig With overrides: $ for i in $(pkgconf --with-path=build/src/core systemd --print-variables); do echo -n "$i = "; pkgconf --with-path=$PWD/build/src/core \ --define-variable=prefix=/PREFIX \ --define-variable=rootprefix=/ROOTPREFIX \ --define-variable=sysconfdir=/SYSCONF --variable=$i systemd done containeruidbasemax = 1878982656 containeruidbasemin = 524288 dynamicuidmax = 65519 dynamicuidmin = 61184 systemgidmax = 999 systemuidmax = 999 catalogdir = /PREFIX/lib/systemd/catalog modulesloaddir = /PREFIX/lib/modules-load.d binfmtdir = /PREFIX/lib/binfmt.d sysctldir = /PREFIX/lib/sysctl.d sysusersdir = /PREFIX/lib/sysusers.d tmpfilesdir = /PREFIX/lib/tmpfiles.d systemdshutdowndir = /ROOTPREFIX/lib/systemd/system-shutdown systemdsleepdir = /ROOTPREFIX/lib/systemd/system-sleep systemdusergeneratordir = /PREFIX/lib/systemd/user-generators systemdsystemgeneratordir = /ROOTPREFIX/lib/systemd/system-generators systemduserunitpath = /SYSCONF/systemd/user:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:/PREFIX/lib/systemd/user:/usr/lib/systemd/user:/usr/share/systemd/user systemdsystemunitpath = /SYSCONF/systemd/system:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:/ROOTPREFIX/lib/systemd/system:/usr/lib/systemd/system:/lib/systemd/system systemduserconfdir = /SYSCONF/systemd/user systemdsystemconfdir = /SYSCONF/systemd/system systemduserpresetdir = /PREFIX/lib/systemd/user-preset systemduserunitdir = /PREFIX/lib/systemd/user systemdsystempresetdir = /ROOTPREFIX/lib/systemd/system-preset systemdsystemunitdir = /ROOTPREFIX/lib/systemd/system systemdutildir = /usr/lib/systemd sysconfdir = /SYSCONF rootprefix = /ROOTPREFIX prefix = /PREFIX pcfiledir = /usr/share/pkgconfig (pkgconf doesn't provide a way to print all variables together with their definitions, according to the man page. Disappointing.)
2018-11-17 15:38:15 +01:00
sysconfdir=@sysconfdir@
systemdutildir=${rootprefix}/lib/systemd
systemdsystemunitdir=${rootprefix}/lib/systemd/system
systemdsystempresetdir=${rootprefix}/lib/systemd/system-preset
systemduserunitdir=${prefix}/lib/systemd/user
systemduserpresetdir=${prefix}/lib/systemd/user-preset
systemdsystemconfdir=${sysconfdir}/systemd/system
systemduserconfdir=${sysconfdir}/systemd/user
systemdsystemunitpath=${systemdsystemconfdir}:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:${systemdsystemunitdir}:/usr/lib/systemd/system:/lib/systemd/system
systemduserunitpath=${systemduserconfdir}:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:${systemduserunitdir}:/usr/lib/systemd/user:/usr/share/systemd/user
pkgconfig: define variables relative to ${prefix}/${rootprefix}/${sysconfdir} Fixes #4549. People want to be able to redefine the prefixes relative to which the other variables are defined. Something like pkgconf --define-variable=prefix=/home/user/installpath --variable=systemdsystemunitdir systemd I'm not convinced that this entirely useful, because the installed systemd will not look at those paths, but maybe it's OK as an alternative type of $DESTDIR. This has been requested a few times over the years, so let's just provide this. I thought this would be more complicated, since we allow all kinds of directories to be overrides in the compilation configuration. But it turns out that all the directories defined in systemd.pc are relative to three prefixes: $prefix, $rootprefix, and $sysconfdir. So this patch adds $rootprefix and $sysconfdir to the .pc file and then changes the subsequent definitions in the .pc file to use them. In the end we define each path twice using the same rules: once in meson.build and once in the .pc file. Without overrides: $ for i in $(pkgconf --with-path=build/src/core systemd --print-variables); do echo -n "$i = "; pkgconf --with-path=$PWD/build/src/core --variable=$i systemd done containeruidbasemax = 1878982656 containeruidbasemin = 524288 dynamicuidmax = 65519 dynamicuidmin = 61184 systemgidmax = 999 systemuidmax = 999 catalogdir = /usr/lib/systemd/catalog modulesloaddir = /usr/lib/modules-load.d binfmtdir = /usr/lib/binfmt.d sysctldir = /usr/lib/sysctl.d sysusersdir = /usr/lib/sysusers.d tmpfilesdir = /usr/lib/tmpfiles.d systemdshutdowndir = /usr/lib/systemd/system-shutdown systemdsleepdir = /usr/lib/systemd/system-sleep systemdusergeneratordir = /usr/lib/systemd/user-generators systemdsystemgeneratordir = /usr/lib/systemd/system-generators systemduserunitpath = /etc/systemd/user:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:/usr/lib/systemd/user:/usr/lib/systemd/user:/usr/share/systemd/user systemdsystemunitpath = /etc/systemd/system:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:/usr/lib/systemd/system:/usr/lib/systemd/system:/lib/systemd/system systemduserconfdir = /etc/systemd/user systemdsystemconfdir = /etc/systemd/system systemduserpresetdir = /usr/lib/systemd/user-preset systemduserunitdir = /usr/lib/systemd/user systemdsystempresetdir = /usr/lib/systemd/system-preset systemdsystemunitdir = /usr/lib/systemd/system systemdutildir = /usr/lib/systemd sysconfdir = /etc rootprefix = /usr prefix = /usr pcfiledir = /usr/share/pkgconfig With overrides: $ for i in $(pkgconf --with-path=build/src/core systemd --print-variables); do echo -n "$i = "; pkgconf --with-path=$PWD/build/src/core \ --define-variable=prefix=/PREFIX \ --define-variable=rootprefix=/ROOTPREFIX \ --define-variable=sysconfdir=/SYSCONF --variable=$i systemd done containeruidbasemax = 1878982656 containeruidbasemin = 524288 dynamicuidmax = 65519 dynamicuidmin = 61184 systemgidmax = 999 systemuidmax = 999 catalogdir = /PREFIX/lib/systemd/catalog modulesloaddir = /PREFIX/lib/modules-load.d binfmtdir = /PREFIX/lib/binfmt.d sysctldir = /PREFIX/lib/sysctl.d sysusersdir = /PREFIX/lib/sysusers.d tmpfilesdir = /PREFIX/lib/tmpfiles.d systemdshutdowndir = /ROOTPREFIX/lib/systemd/system-shutdown systemdsleepdir = /ROOTPREFIX/lib/systemd/system-sleep systemdusergeneratordir = /PREFIX/lib/systemd/user-generators systemdsystemgeneratordir = /ROOTPREFIX/lib/systemd/system-generators systemduserunitpath = /SYSCONF/systemd/user:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:/PREFIX/lib/systemd/user:/usr/lib/systemd/user:/usr/share/systemd/user systemdsystemunitpath = /SYSCONF/systemd/system:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:/ROOTPREFIX/lib/systemd/system:/usr/lib/systemd/system:/lib/systemd/system systemduserconfdir = /SYSCONF/systemd/user systemdsystemconfdir = /SYSCONF/systemd/system systemduserpresetdir = /PREFIX/lib/systemd/user-preset systemduserunitdir = /PREFIX/lib/systemd/user systemdsystempresetdir = /ROOTPREFIX/lib/systemd/system-preset systemdsystemunitdir = /ROOTPREFIX/lib/systemd/system systemdutildir = /usr/lib/systemd sysconfdir = /SYSCONF rootprefix = /ROOTPREFIX prefix = /PREFIX pcfiledir = /usr/share/pkgconfig (pkgconf doesn't provide a way to print all variables together with their definitions, according to the man page. Disappointing.)
2018-11-17 15:38:15 +01:00
systemdsystemgeneratordir=${rootprefix}/lib/systemd/system-generators
systemdusergeneratordir=${prefix}/lib/systemd/user-generators
2020-01-18 09:17:57 +01:00
systemdsystemgeneratorpath=/run/systemd/system-generators:/etc/systemd/system-generators:/usr/local/lib/systemd/system-generators:${systemdsystemgeneratordir}
systemdusergeneratorpath=/run/systemd/user-generators:/etc/systemd/user-generators:/usr/local/lib/systemd/user-generators:${systemdusergeneratordir}
pkgconfig: define variables relative to ${prefix}/${rootprefix}/${sysconfdir} Fixes #4549. People want to be able to redefine the prefixes relative to which the other variables are defined. Something like pkgconf --define-variable=prefix=/home/user/installpath --variable=systemdsystemunitdir systemd I'm not convinced that this entirely useful, because the installed systemd will not look at those paths, but maybe it's OK as an alternative type of $DESTDIR. This has been requested a few times over the years, so let's just provide this. I thought this would be more complicated, since we allow all kinds of directories to be overrides in the compilation configuration. But it turns out that all the directories defined in systemd.pc are relative to three prefixes: $prefix, $rootprefix, and $sysconfdir. So this patch adds $rootprefix and $sysconfdir to the .pc file and then changes the subsequent definitions in the .pc file to use them. In the end we define each path twice using the same rules: once in meson.build and once in the .pc file. Without overrides: $ for i in $(pkgconf --with-path=build/src/core systemd --print-variables); do echo -n "$i = "; pkgconf --with-path=$PWD/build/src/core --variable=$i systemd done containeruidbasemax = 1878982656 containeruidbasemin = 524288 dynamicuidmax = 65519 dynamicuidmin = 61184 systemgidmax = 999 systemuidmax = 999 catalogdir = /usr/lib/systemd/catalog modulesloaddir = /usr/lib/modules-load.d binfmtdir = /usr/lib/binfmt.d sysctldir = /usr/lib/sysctl.d sysusersdir = /usr/lib/sysusers.d tmpfilesdir = /usr/lib/tmpfiles.d systemdshutdowndir = /usr/lib/systemd/system-shutdown systemdsleepdir = /usr/lib/systemd/system-sleep systemdusergeneratordir = /usr/lib/systemd/user-generators systemdsystemgeneratordir = /usr/lib/systemd/system-generators systemduserunitpath = /etc/systemd/user:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:/usr/lib/systemd/user:/usr/lib/systemd/user:/usr/share/systemd/user systemdsystemunitpath = /etc/systemd/system:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:/usr/lib/systemd/system:/usr/lib/systemd/system:/lib/systemd/system systemduserconfdir = /etc/systemd/user systemdsystemconfdir = /etc/systemd/system systemduserpresetdir = /usr/lib/systemd/user-preset systemduserunitdir = /usr/lib/systemd/user systemdsystempresetdir = /usr/lib/systemd/system-preset systemdsystemunitdir = /usr/lib/systemd/system systemdutildir = /usr/lib/systemd sysconfdir = /etc rootprefix = /usr prefix = /usr pcfiledir = /usr/share/pkgconfig With overrides: $ for i in $(pkgconf --with-path=build/src/core systemd --print-variables); do echo -n "$i = "; pkgconf --with-path=$PWD/build/src/core \ --define-variable=prefix=/PREFIX \ --define-variable=rootprefix=/ROOTPREFIX \ --define-variable=sysconfdir=/SYSCONF --variable=$i systemd done containeruidbasemax = 1878982656 containeruidbasemin = 524288 dynamicuidmax = 65519 dynamicuidmin = 61184 systemgidmax = 999 systemuidmax = 999 catalogdir = /PREFIX/lib/systemd/catalog modulesloaddir = /PREFIX/lib/modules-load.d binfmtdir = /PREFIX/lib/binfmt.d sysctldir = /PREFIX/lib/sysctl.d sysusersdir = /PREFIX/lib/sysusers.d tmpfilesdir = /PREFIX/lib/tmpfiles.d systemdshutdowndir = /ROOTPREFIX/lib/systemd/system-shutdown systemdsleepdir = /ROOTPREFIX/lib/systemd/system-sleep systemdusergeneratordir = /PREFIX/lib/systemd/user-generators systemdsystemgeneratordir = /ROOTPREFIX/lib/systemd/system-generators systemduserunitpath = /SYSCONF/systemd/user:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:/PREFIX/lib/systemd/user:/usr/lib/systemd/user:/usr/share/systemd/user systemdsystemunitpath = /SYSCONF/systemd/system:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:/ROOTPREFIX/lib/systemd/system:/usr/lib/systemd/system:/lib/systemd/system systemduserconfdir = /SYSCONF/systemd/user systemdsystemconfdir = /SYSCONF/systemd/system systemduserpresetdir = /PREFIX/lib/systemd/user-preset systemduserunitdir = /PREFIX/lib/systemd/user systemdsystempresetdir = /ROOTPREFIX/lib/systemd/system-preset systemdsystemunitdir = /ROOTPREFIX/lib/systemd/system systemdutildir = /usr/lib/systemd sysconfdir = /SYSCONF rootprefix = /ROOTPREFIX prefix = /PREFIX pcfiledir = /usr/share/pkgconfig (pkgconf doesn't provide a way to print all variables together with their definitions, according to the man page. Disappointing.)
2018-11-17 15:38:15 +01:00
systemdsleepdir=${rootprefix}/lib/systemd/system-sleep
systemdshutdowndir=${rootprefix}/lib/systemd/system-shutdown
tmpfilesdir=${prefix}/lib/tmpfiles.d
sysusersdir=${prefix}/lib/sysusers.d
sysctldir=${prefix}/lib/sysctl.d
binfmtdir=${prefix}/lib/binfmt.d
modulesloaddir=${prefix}/lib/modules-load.d
catalogdir=${prefix}/lib/systemd/catalog
systemuidmax=@systemuidmax@
systemgidmax=@systemgidmax@
dynamicuidmin=@dynamicuidmin@
dynamicuidmax=@dynamicuidmax@
containeruidbasemin=@containeruidbasemin@
containeruidbasemax=@containeruidbasemax@
Name: systemd
Description: systemd System and Service Manager
URL: @PROJECT_URL@
Version: @PROJECT_VERSION@