mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-01 20:43:47 +00:00
Install systemd services with autotools
Change-Id: I7e4dae6b8c1685e8a673c58a843c41fa0af1b35c
This commit is contained in:
@@ -24,6 +24,9 @@ pkgconfig_DATA = \
|
|||||||
BUILT_SOURCES = $(top_srcdir)/.version
|
BUILT_SOURCES = $(top_srcdir)/.version
|
||||||
EXTRA_DIST = git-version-gen osmoappdesc.py .version
|
EXTRA_DIST = git-version-gen osmoappdesc.py .version
|
||||||
|
|
||||||
|
DISTCHECK_CONFIGURE_FLAGS = \
|
||||||
|
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
|
||||||
|
|
||||||
@RELMAKE@
|
@RELMAKE@
|
||||||
|
|
||||||
$(top_srcdir)/.version:
|
$(top_srcdir)/.version:
|
||||||
|
|||||||
17
configure.ac
17
configure.ac
@@ -128,6 +128,22 @@ AC_MSG_CHECKING([whether to enable VTY/CTRL tests])
|
|||||||
AC_MSG_RESULT([$enable_ext_tests])
|
AC_MSG_RESULT([$enable_ext_tests])
|
||||||
AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes")
|
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([CFLAGS="$CFLAGS"])
|
||||||
AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
|
AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
|
||||||
|
|
||||||
@@ -151,4 +167,5 @@ AC_OUTPUT(
|
|||||||
doc/Makefile
|
doc/Makefile
|
||||||
doc/examples/Makefile
|
doc/examples/Makefile
|
||||||
contrib/Makefile
|
contrib/Makefile
|
||||||
|
contrib/systemd/Makefile
|
||||||
Makefile)
|
Makefile)
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
SUBDIRS = systemd
|
||||||
|
|
||||||
EXTRA_DIST = ipa.py
|
EXTRA_DIST = ipa.py
|
||||||
|
|||||||
5
contrib/systemd/Makefile.am
Normal file
5
contrib/systemd/Makefile.am
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
if HAVE_SYSTEMD
|
||||||
|
EXTRA_DIST = osmo-mgw.service
|
||||||
|
systemdsystemunit_DATA = \
|
||||||
|
osmo-mgw.service
|
||||||
|
endif
|
||||||
1
debian/osmo-mgw.install
vendored
1
debian/osmo-mgw.install
vendored
@@ -1,2 +1,3 @@
|
|||||||
|
lib/systemd/system/osmo-mgw.service
|
||||||
usr/bin/osmo-mgw
|
usr/bin/osmo-mgw
|
||||||
usr/share/doc/osmo-mgw/examples/osmo-mgw/osmo-mgw.cfg
|
usr/share/doc/osmo-mgw/examples/osmo-mgw/osmo-mgw.cfg
|
||||||
|
|||||||
1
debian/osmo-mgw.service
vendored
1
debian/osmo-mgw.service
vendored
@@ -1 +0,0 @@
|
|||||||
../contrib/systemd/osmo-mgw.service
|
|
||||||
5
debian/rules
vendored
5
debian/rules
vendored
@@ -14,7 +14,7 @@ CFLAGS += -g
|
|||||||
|
|
||||||
# main packaging script based on dh7 syntax
|
# main packaging script based on dh7 syntax
|
||||||
%:
|
%:
|
||||||
dh $@ --with autoreconf
|
dh $@ --with autoreconf
|
||||||
|
|
||||||
# debmake generated override targets
|
# debmake generated override targets
|
||||||
# Set options for ./configure
|
# Set options for ./configure
|
||||||
@@ -29,4 +29,7 @@ CFLAGS += -g
|
|||||||
override_dh_auto_test:
|
override_dh_auto_test:
|
||||||
dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
|
dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
|
||||||
|
|
||||||
|
override_dh_auto_configure:
|
||||||
|
dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system
|
||||||
|
|
||||||
# See https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-dbg
|
# See https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-dbg
|
||||||
|
|||||||
Reference in New Issue
Block a user