aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-09-14 14:38:42 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-01-30 22:47:10 +0100
commit89d343fd41d3902b32923e5e99a33624b9628d3d (patch)
treeb5875d2c57cc12b5e323bc8f47c42de53bd52c23
parentea0eb26644814d81704324c9e12f464349050a54 (diff)
osmo-sgsn: handle systemd and cfg files through autotools
At the same time systemd services were installed by autotools, osmo-gtphub service became available too. Change-Id: Ib84a3c8634db2282b2d3757ae7c044a196720852
-rw-r--r--recipes-osmocom/osmo-sgsn/osmo-sgsn.inc23
1 files changed, 8 insertions, 15 deletions
diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc
index 4711a2c..45256a5 100644
--- a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc
+++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc
@@ -5,29 +5,22 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
DEPENDS = "c-ares libosmocore libosmo-netif osmo-ggsn"
-INC_PR="r0.${META_TELEPHONY_OSMO_INC}"
+INC_PR="r1.${META_TELEPHONY_OSMO_INC}"
inherit autotools pkgconfig systemd
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'iu', d)}"
+PACKAGECONFIG ??= "\
+ ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'iu', d)} \
+ "
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir},--without-systemdsystemunitdir"
PACKAGECONFIG[iu] = "--enable-iu,--disable-iu,libasn1c libosmo-sccp osmo-iuh,"
-do_install_append() {
- install -d ${D}${systemd_system_unitdir}/
- install -d ${D}${sysconfdir}/osmocom/
-
- install -m 0644 ${S}/doc/examples/osmo-sgsn/osmo-sgsn.cfg ${D}${sysconfdir}/osmocom/
- install -m 0644 ${S}/doc/examples/osmo-gbproxy/osmo-gbproxy.cfg ${D}${sysconfdir}/osmocom/
- install -m 0644 ${S}/doc/examples/osmo-gtphub/osmo-gtphub.cfg ${D}${sysconfdir}/osmocom/
-
- install -m 0644 ${S}/contrib/systemd/osmo-sgsn.service ${D}${systemd_system_unitdir}/
- install -m 0644 ${S}/contrib/systemd/osmo-gbproxy.service ${D}${systemd_system_unitdir}/
-}
-
PACKAGES =+ "osmo-gbproxy-doc osmo-gtphub-doc osmo-gbproxy osmo-gtphub"
-SYSTEMD_PACKAGES = "osmo-sgsn osmo-gbproxy"
+SYSTEMD_PACKAGES = "osmo-sgsn osmo-gbproxy osmo-gtphub"
SYSTEMD_SERVICE_osmo-sgsn = "osmo-sgsn.service"
SYSTEMD_SERVICE_osmo-gbproxy = "osmo-gbproxy.service"
+SYSTEMD_SERVICE_osmo-gtphub = "osmo-gtphub.service"
CONFFILES_osmo-sgsn = "${sysconfdir}/osmocom/osmo-sgsn.cfg"