mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-msc.git
synced 2025-10-23 08:12:10 +00:00
Install systemd services with autotools
Change-Id: I3a87d5ad4cb43efdcfc25828144f825f4d3b1594
This commit is contained in:
@@ -12,12 +12,16 @@ SUBDIRS = \
|
||||
doc \
|
||||
include \
|
||||
src \
|
||||
contrib \
|
||||
tests \
|
||||
$(NULL)
|
||||
|
||||
BUILT_SOURCES = $(top_srcdir)/.version
|
||||
EXTRA_DIST = git-version-gen osmoappdesc.py .version
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
|
||||
|
||||
@RELMAKE@
|
||||
|
||||
$(top_srcdir)/.version:
|
||||
|
18
configure.ac
18
configure.ac
@@ -181,6 +181,22 @@ AC_MSG_CHECKING([whether to enable VTY/CTRL tests])
|
||||
AC_MSG_RESULT([$enable_ext_tests])
|
||||
AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes")
|
||||
|
||||
# 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"])
|
||||
|
||||
AC_MSG_RESULT([CFLAGS="$CFLAGS"])
|
||||
AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
|
||||
|
||||
@@ -203,4 +219,6 @@ AC_OUTPUT(
|
||||
tests/msc_vlr/Makefile
|
||||
doc/Makefile
|
||||
doc/examples/Makefile
|
||||
contrib/Makefile
|
||||
contrib/systemd/Makefile
|
||||
Makefile)
|
||||
|
1
contrib/Makefile.am
Normal file
1
contrib/Makefile.am
Normal file
@@ -0,0 +1 @@
|
||||
SUBDIRS = systemd
|
5
contrib/systemd/Makefile.am
Normal file
5
contrib/systemd/Makefile.am
Normal file
@@ -0,0 +1,5 @@
|
||||
if HAVE_SYSTEMD
|
||||
EXTRA_DIST = osmo-msc.service
|
||||
systemdsystemunit_DATA = \
|
||||
osmo-msc.service
|
||||
endif
|
1
debian/osmo-msc.install
vendored
1
debian/osmo-msc.install
vendored
@@ -1,3 +1,4 @@
|
||||
lib/systemd/system/osmo-msc.service
|
||||
usr/bin/osmo-msc
|
||||
usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc.cfg usr/share/doc/osmo-msc/examples
|
||||
usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc_custom-sccp.cfg usr/share/doc/osmo-msc/examples
|
||||
|
1
debian/osmo-msc.service
vendored
1
debian/osmo-msc.service
vendored
@@ -1 +0,0 @@
|
||||
../contrib/systemd/osmo-msc.service
|
4
debian/rules
vendored
4
debian/rules
vendored
@@ -42,11 +42,11 @@
|
||||
|
||||
# main packaging script based on dh7 syntax
|
||||
%:
|
||||
dh $@ --with autoreconf
|
||||
dh $@ --with autoreconf
|
||||
|
||||
# debmake generated override targets
|
||||
# Set options for ./configure
|
||||
CONFIGURE_FLAGS += --enable-iu --enable-smpp
|
||||
CONFIGURE_FLAGS += --enable-iu --enable-smpp --with-systemdsystemunitdir=/lib/systemd/system
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- $(CONFIGURE_FLAGS)
|
||||
#
|
||||
|
Reference in New Issue
Block a user