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/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.orgPau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/10894 Change subject: Install systemd services with autotools ...................................................................... Install systemd services with autotools Change-Id: I103bf3468d53578045593eac31b61f7e0248495e --- M Makefile.am M configure.ac A contrib/Makefile.am A contrib/systemd/Makefile.am M debian/osmo-gbproxy.install D debian/osmo-gbproxy.service M debian/osmo-gtphub.install D debian/osmo-gtphub.service M debian/osmo-sgsn.install D debian/osmo-sgsn.service M debian/rules 11 files changed, 37 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/94/10894/1 diff --git a/Makefile.am b/Makefile.am index 38fdcba..1883ab5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,6 +12,7 @@ doc \ include \ src \ + contrib \ tests \ $(NULL) @@ -21,6 +22,9 @@ 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: diff --git a/configure.ac b/configure.ac index c233fa3..73b6dce 100644 --- a/configure.ac +++ b/configure.ac @@ -176,6 +176,22 @@ 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"]) @@ -201,4 +217,6 @@ tests/v42bis/Makefile doc/Makefile doc/examples/Makefile + contrib/Makefile + contrib/systemd/Makefile Makefile) diff --git a/contrib/Makefile.am b/contrib/Makefile.am new file mode 100644 index 0000000..3439c97 --- /dev/null +++ b/contrib/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = systemd diff --git a/contrib/systemd/Makefile.am b/contrib/systemd/Makefile.am new file mode 100644 index 0000000..b644f34 --- /dev/null +++ b/contrib/systemd/Makefile.am @@ -0,0 +1,9 @@ +if HAVE_SYSTEMD +SYSTEMD_SERVICES = \ + osmo-gbproxy.service \ + osmo-gtphub.service \ + osmo-sgsn.service + +EXTRA_DIST = $(SYSTEMD_SERVICES) +systemdsystemunit_DATA = $(SYSTEMD_SERVICES) +endif diff --git a/debian/osmo-gbproxy.install b/debian/osmo-gbproxy.install index 8272551..9c7fb77 100644 --- a/debian/osmo-gbproxy.install +++ b/debian/osmo-gbproxy.install @@ -1,3 +1,4 @@ +lib/systemd/system/osmo-gbproxy.service usr/bin/osmo-gbproxy usr/share/doc/osmo-sgsn/examples/osmo-gbproxy/osmo-gbproxy-legacy.cfg usr/share/doc/osmo-gbproxy/examples usr/share/doc/osmo-sgsn/examples/osmo-gbproxy/osmo-gbproxy.cfg usr/share/doc/osmo-gbproxy/examples diff --git a/debian/osmo-gbproxy.service b/debian/osmo-gbproxy.service deleted file mode 120000 index d23c649..0000000 --- a/debian/osmo-gbproxy.service +++ /dev/null @@ -1 +0,0 @@ -../contrib/systemd/osmo-gbproxy.service \ No newline at end of file diff --git a/debian/osmo-gtphub.install b/debian/osmo-gtphub.install index ed0bd1b..568caaf 100644 --- a/debian/osmo-gtphub.install +++ b/debian/osmo-gtphub.install @@ -1,3 +1,4 @@ +lib/systemd/system/osmo-gtphub.service usr/bin/osmo-gtphub usr/share/doc/osmo-sgsn/examples/osmo-gtphub/osmo-gtphub-1iface.cfg usr/share/doc/osmo-gtphub/examples usr/share/doc/osmo-sgsn/examples/osmo-gtphub/osmo-gtphub.cfg usr/share/doc/osmo-gtphub/examples diff --git a/debian/osmo-gtphub.service b/debian/osmo-gtphub.service deleted file mode 120000 index 81a0eb4..0000000 --- a/debian/osmo-gtphub.service +++ /dev/null @@ -1 +0,0 @@ -../contrib/systemd/osmo-gtphub.service \ No newline at end of file diff --git a/debian/osmo-sgsn.install b/debian/osmo-sgsn.install index 9390deb..9d603f9 100644 --- a/debian/osmo-sgsn.install +++ b/debian/osmo-sgsn.install @@ -1,3 +1,4 @@ +lib/systemd/system/osmo-sgsn.service usr/bin/osmo-sgsn usr/share/doc/osmo-sgsn/examples/osmo-sgsn/osmo-sgsn.cfg usr/share/doc/osmo-sgsn/examples usr/share/doc/osmo-sgsn/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg usr/share/doc/osmo-sgsn/examples diff --git a/debian/osmo-sgsn.service b/debian/osmo-sgsn.service deleted file mode 120000 index de22d90..0000000 --- a/debian/osmo-sgsn.service +++ /dev/null @@ -1 +0,0 @@ -../contrib/systemd/osmo-sgsn.service \ No newline at end of file diff --git a/debian/rules b/debian/rules index 58ea9bb..e4b3d80 100755 --- a/debian/rules +++ b/debian/rules @@ -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 +CONFIGURE_FLAGS += --enable-iu --with-systemdsystemunitdir=/lib/systemd/system override_dh_configure: dh_auto_configure -- $(CONFIGURE_FLAGS) # -- To view, visit https://gerrit.osmocom.org/10894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I103bf3468d53578045593eac31b61f7e0248495e Gerrit-Change-Number: 10894 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180912/c0ea47fd/attachment.htm>