]> git.ipfire.org Git - people/ms/bricklayer.git/commitdiff
Add dummy systemd files
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 10 May 2021 20:29:55 +0000 (20:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 10 May 2021 20:29:55 +0000 (20:29 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
configure.ac
src/systemd/.gitignore [new file with mode: 0644]
src/systemd/bricklayer-first-install.service.in [new file with mode: 0644]
src/systemd/bricklayer.service.in [new file with mode: 0644]

index 0f93d6b9d28c6d0b7cd8a2dcf6902780084e2a90..3e52766f063c5d16915d0eedf1a2fd0479f94634 100644 (file)
@@ -55,3 +55,17 @@ dist_pkgpython_PYTHON = \
        src/python/timezones.py \
        src/python/tui.py \
        src/python/util.py
+
+if HAVE_SYSTEMD
+systemdsystemunit_DATA = \
+       src/systemd/bricklayer.service \
+       src/systemd/bricklayer-first-install.service
+
+EXTRA_DIST += \
+       src/systemd/bricklayer.service.in \
+       src/systemd/bricklayer-first-install.service.in
+
+CLEANFILES += \
+       src/systemd/bricklayer.service \
+       src/systemd/bricklayer-first-install.service
+endif
index 02a63b4663520683e6e494813769f160da83b576..1af49e5c2f7641988247616386ddfbdae9e39ca2 100644 (file)
@@ -30,9 +30,22 @@ XGETTEXT="${XGETTEXT} -L Python --keyword=_:1,2 --keyword=N_:1,2 --no-location"
 GETTEXT_PACKAGE=${PACKAGE_TARNAME}
 AC_SUBST(GETTEXT_PACKAGE)
 
+# pkg-config
+PKG_PROG_PKG_CONFIG
+# This makes sure pkg.m4 is available.
+m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
+
 AC_PROG_SED
 AC_PROG_MKDIR_P
 
+# - systemd --------------------------------------------------------------------
+
+AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
+       [Directory for systemd service files]), [],
+       [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"])
+
 # - man ------------------------------------------------------------------------
 
 have_man_pages=no
@@ -78,6 +91,7 @@ AC_MSG_RESULT([
         sysconfdir:             ${sysconfdir}
         libdir:                 ${libdir}
         includedir:             ${includedir}
+        systemdsystemunitdir:   ${systemdsystemunitdir}
 
         debug:                  ${enable_debug}
 ])
diff --git a/src/systemd/.gitignore b/src/systemd/.gitignore
new file mode 100644 (file)
index 0000000..5e607c4
--- /dev/null
@@ -0,0 +1,2 @@
+/bricklayer.service
+/bricklayer-first-install.service
diff --git a/src/systemd/bricklayer-first-install.service.in b/src/systemd/bricklayer-first-install.service.in
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/systemd/bricklayer.service.in b/src/systemd/bricklayer.service.in
new file mode 100644 (file)
index 0000000..e69de29