Browse Source

configure.ac + debian: Add systemd service file support

Closes: OS#4326
Change-Id: I0d7b6562c1127f005ddbd47298c03942ac3d241d
changes/65/17365/3
Harald Welte 2 years ago
parent
commit
75b8eb3bcc
  1. 16
      configure.ac
  2. 7
      contrib/systemd/Makefile.am
  3. 1
      debian/osmo-remsim-bankd.install
  4. 1
      debian/osmo-remsim-client.install
  5. 1
      debian/osmo-remsim-server.install

16
configure.ac

@ -160,6 +160,22 @@ then
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"

7
contrib/systemd/Makefile.am

@ -1 +1,8 @@
EXTRA_DIST = osmo-remsim-bankd.service osmo-remsim-client@.service osmo-remsim-server.service
if HAVE_SYSTEMD
systemdsystemunit_DATA = \
osmo-remsim-bankd.service \
osmo-remsim-server.service \
osmo-remsim-client@.service
endif

1
debian/osmo-remsim-bankd.install vendored

@ -1 +1,2 @@
usr/bin/osmo-remsim-bankd
lib/systemd/system/osmo-remsim-bankd.service

1
debian/osmo-remsim-client.install vendored

@ -1 +1,2 @@
usr/bin/osmo-remsim-client*
lib/systemd/system/osmo-remsim-client*

1
debian/osmo-remsim-server.install vendored

@ -1 +1,2 @@
usr/bin/osmo-remsim-server
lib/systemd/system/osmo-remsim-server.service

Loading…
Cancel
Save