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 submitted this change and it was merged. ( https://gerrit.osmocom.org/10892 ) Change subject: Install systemd services with autotools ...................................................................... Install systemd services with autotools Change-Id: Id81ae8e2d8a2c9456ac0dac2c30c0d24dab3b694 --- M Makefile.am M configure.ac A contrib/Makefile.am A contrib/systemd/Makefile.am M debian/osmo-hlr.install D debian/osmo-hlr.service M debian/rules 7 files changed, 32 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Pau Espin Pedrol: Verified diff --git a/Makefile.am b/Makefile.am index 8e18167..210e499 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,7 @@ src \ include \ sql \ + contrib \ tests \ $(NULL) @@ -12,6 +13,9 @@ .version \ $(NULL) +DISTCHECK_CONFIGURE_FLAGS = \ + --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) + pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libosmo-gsup-client.pc diff --git a/configure.ac b/configure.ac index 16c8b51..368f1cc 100644 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,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"]) @@ -103,6 +119,8 @@ include/Makefile libosmo-gsup-client.pc sql/Makefile + contrib/Makefile + contrib/systemd/Makefile tests/Makefile tests/auc/Makefile tests/auc/gen_ts_55_205_test_sets/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..520e720 --- /dev/null +++ b/contrib/systemd/Makefile.am @@ -0,0 +1,5 @@ +if HAVE_SYSTEMD +EXTRA_DIST = osmo-hlr.service +systemdsystemunit_DATA = \ + osmo-hlr.service +endif diff --git a/debian/osmo-hlr.install b/debian/osmo-hlr.install index 7991522..5a7c37b 100644 --- a/debian/osmo-hlr.install +++ b/debian/osmo-hlr.install @@ -1,3 +1,4 @@ +/lib/systemd/system/osmo-hlr.service /usr/bin/osmo-hlr /usr/bin/osmo-hlr-db-tool /usr/share/doc/osmo-hlr/sql/hlr.sql diff --git a/debian/osmo-hlr.service b/debian/osmo-hlr.service deleted file mode 120000 index 184f5aa..0000000 --- a/debian/osmo-hlr.service +++ /dev/null @@ -1 +0,0 @@ -../contrib/systemd/osmo-hlr.service \ No newline at end of file diff --git a/debian/rules b/debian/rules index 1d8d8ab..9e97c6c 100755 --- a/debian/rules +++ b/debian/rules @@ -15,3 +15,6 @@ # Print test results in case of a failure override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) + +override_dh_auto_configure: + dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system -- To view, visit https://gerrit.osmocom.org/10892 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id81ae8e2d8a2c9456ac0dac2c30c0d24dab3b694 Gerrit-Change-Number: 10892 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180913/14b492c1/attachment.htm>