Change in osmo-remsim[master]: configure.ac + debian: Add systemd service file support

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Mar 4 16:38:47 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17365 )


Change subject: configure.ac + debian: Add systemd service file support
......................................................................

configure.ac + debian: Add systemd service file support

Closes: OS#4326
Change-Id: I0d7b6562c1127f005ddbd47298c03942ac3d241d
---
M configure.ac
M contrib/systemd/Makefile.am
M debian/osmo-remsim-bankd.install
M debian/osmo-remsim-client.install
M debian/osmo-remsim-server.install
5 files changed, 26 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/65/17365/1

diff --git a/configure.ac b/configure.ac
index 9b19280..6954204 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,6 +162,22 @@
 	AC_SUBST([OSMO_GSM_MANUALS_DIR])
 fi
 
+# https://www.freedesktop.org/software/systemd/man/daemon.html
+AC_ARG_WITH([systemdsystemunitdir],
+     [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,
+     [with_systemdsystemunitdir=auto])
+AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [
+     def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+
+     AS_IF([test "x$def_systemdsystemunitdir" = "x"],
+   [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
+    [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
+    with_systemdsystemunitdir=no],
+   [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
+AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
+      [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
+AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])
+
 CFLAGS="$CFLAGS -Wall"
 CPPFLAGS="$CPPFLAGS -Wall"
 
diff --git a/contrib/systemd/Makefile.am b/contrib/systemd/Makefile.am
index 642920c..2cc64df 100644
--- a/contrib/systemd/Makefile.am
+++ b/contrib/systemd/Makefile.am
@@ -1 +1,8 @@
 EXTRA_DIST = osmo-remsim-bankd.service osmo-remsim-client at .service osmo-remsim-server.service
+
+if HAVE_SYSTEMD
+systemdsystemunit_DATA = \
+	osmo-remsim-bankd.service \
+	osmo-remsim-server.service \
+	osmo-remsim-client at .service
+endif
diff --git a/debian/osmo-remsim-bankd.install b/debian/osmo-remsim-bankd.install
index d8168d5..58de089 100644
--- a/debian/osmo-remsim-bankd.install
+++ b/debian/osmo-remsim-bankd.install
@@ -1 +1,2 @@
 usr/bin/osmo-remsim-bankd
+lib/systemd/system/osmo-remsim-bankd.service
diff --git a/debian/osmo-remsim-client.install b/debian/osmo-remsim-client.install
index 8e73dc1..85ffb82 100644
--- a/debian/osmo-remsim-client.install
+++ b/debian/osmo-remsim-client.install
@@ -1 +1,2 @@
 usr/bin/osmo-remsim-client*
+lib/systemd/system/osmo-remsim-client*
diff --git a/debian/osmo-remsim-server.install b/debian/osmo-remsim-server.install
index f6f14a1..497f7e1 100644
--- a/debian/osmo-remsim-server.install
+++ b/debian/osmo-remsim-server.install
@@ -1 +1,2 @@
 usr/bin/osmo-remsim-server
+lib/systemd/system/osmo-remsim-server.service

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17365
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I0d7b6562c1127f005ddbd47298c03942ac3d241d
Gerrit-Change-Number: 17365
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200304/61ddfb39/attachment.htm>


More information about the gerrit-log mailing list