From 80dc69aa2e424257bbdf96a03aecf7a6829ac8b6 Mon Sep 17 00:00:00 2001
From: Björn Persson
Date: Sun, 15 Jun 2025 21:39:47 +0200
Subject: Added directory variables for SystemD unit files.
---
INSTALL | 11 ++++++++++-
comfignat.mk | 7 +++++++
manual.en.html | 8 +++++++-
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/INSTALL b/INSTALL
index 9d4e002..4cea3e3 100644
--- a/INSTALL
+++ b/INSTALL
@@ -124,6 +124,15 @@ are relevant during the build:
programs from trying to access a device or other resource at the same time.
Default: /lock
+ unitdir
+ The directory for SystemD unit files that are independent of user sessions.
+ Default: /lib/systemd/system
+
+ userunitdir
+ The directory for SystemD unit files for services that run as part of a
+ user session.
+ Default: /lib/systemd/user
+
includedir
The top-level directory for source files to be used in the compilation of
software using libraries; may be provided by a directories project.
@@ -296,7 +305,7 @@ arguments are passed to them:
Copyright of This File
----------------------
-Copyright 2013 - 2016 B. Persson, Bjorn@Rombobeorn.se
+Copyright 2013 - 2025 B. Persson, Bjorn@Rombobeorn.se
This material is provided as is, with absolutely no warranty expressed
or implied. Any use is at your own risk.
diff --git a/comfignat.mk b/comfignat.mk
index 2412018..c2945b7 100644
--- a/comfignat.mk
+++ b/comfignat.mk
@@ -168,6 +168,8 @@ cachedir = ${localstatedir}/cache
logdir = ${localstatedir}/log
runstatedir = /run
lockdir = ${runstatedir}/lock
+unitdir = ${prefix}/lib/systemd/system
+userunitdir = ${prefix}/lib/systemd/user
includedir = ${prefix}/include
archincludedir = ${includedir}
libdir = ${exec_prefix}/lib
@@ -233,6 +235,8 @@ stage_sysconfdir = ${stagedir}${sysconfdir}
stage_statedir = ${stagedir}${statedir}
stage_cachedir = ${stagedir}${cachedir}
stage_logdir = ${stagedir}${logdir}
+stage_unitdir = ${stagedir}${unitdir}
+stage_userunitdir = ${stagedir}${userunitdir}
stage_includedir = ${stagedir}${includedir}
stage_archincludedir = ${stagedir}${archincludedir}
stage_libdir = ${stagedir}${libdir}
@@ -257,6 +261,8 @@ Make_sysconfdir = ${call Make_pathname,stage_sysconfdir}
Make_statedir = ${call Make_pathname,stage_statedir}
Make_cachedir = ${call Make_pathname,stage_cachedir}
Make_logdir = ${call Make_pathname,stage_logdir}
+Make_unitdir = ${call Make_pathname,stage_unitdir}
+Make_userunitdir = ${call Make_pathname,stage_userunitdir}
Make_includedir = ${call Make_pathname,stage_includedir}
Make_archincludedir = ${call Make_pathname,stage_archincludedir}
Make_libdir = ${call Make_pathname,stage_libdir}
@@ -413,6 +419,7 @@ configuration_variables += \
prefix exec_prefix datarootdir localstatedir \
bindir libexecdir \
datadir sysconfdir statedir cachedir logdir runstatedir lockdir \
+ unitdir userunitdir \
includedir archincludedir libdir alidir gprdir \
localedir mandir infodir miscdocdir \
objdir stagedir \
diff --git a/manual.en.html b/manual.en.html
index 1601e1c..b69237d 100755
--- a/manual.en.html
+++ b/manual.en.html
@@ -355,9 +355,15 @@ subdirectories under stage_mandir.
stage_miscdocdir.
-System State
+System Integration
+SystemD unit files that are independent of user sessions shall be placed
+in stage_unitdir.
+
+SystemD unit files for services that run as part of a user session shall
+be placed in stage_userunitdir.
+
Small files that take part in describing the state of the system and
that exist only while the program is running, such as process identifier files
and transient Unix-domain sockets, shall be sought and created under
--
cgit v1.2.3