Drop openggsn and introduce osmo-ggsn

Take the opportunity to enable systemd service instead of sysvint like other osmocom
services already do.

Change-Id: Ie6018ef78ff18f2e6809fee957c9d645e35c7c9a
diff --git a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb
new file mode 100644
index 0000000..5a383b9
--- /dev/null
+++ b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb
@@ -0,0 +1,42 @@
+DESCRIPTION = "Osmocom GGSN implementation"
+HOMEPAGE = "https://osmocom.org/projects/openggsn"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+PV = "1.0.0+gitr${SRCPV}"
+PR = "r0"
+
+SRCREV = "b5624c3d4838cd774c3a6df4208b709890174a25"
+SRC_URI = "git://git.osmocom.org/osmo-ggsn                   \
+           file://osmo-ggsn.init                             \
+	   file://libgtp-queue_depth_32.patch		    \
+          "
+S = "${WORKDIR}/git"
+
+DEPENDS = "libosmocore"
+
+PACKAGES =+ " libgtp libgtp-dev libgtp-staticdev osmo-sgsnemu"
+RDEPENDS_${PN} += "iptables kernel-module-ipt-masquerade kernel-module-tun"
+
+inherit autotools update-rc.d pkgconfig systemd
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/init.d
+	install -d ${D}${systemd_system_unitdir}/
+	install -d ${D}/${sysconfdir}/osmocom/
+
+	install -m 0776 ${WORKDIR}/osmo-ggsn.init ${D}${sysconfdir}/init.d/osmo-ggsn
+	install -m 0644 ${S}/contrib/osmo-ggsn.service ${D}${systemd_system_unitdir}/
+	install -m 0644 ${S}/doc/examples/osmo-ggsn.cfg ${D}${sysconfdir}/osmocom/
+}
+
+SYSTEMD_SERVICE_osmo-ggsn = "osmo-ggsn.service"
+
+INITSCRIPT_PACKAGES = "osmo-ggsn"
+INITSCRIPT_NAME_osmo-ggsn = "osmo-ggsn"
+INITSCRIPT_PARAMS_osmo-ggsn = "defaults 29 29"
+
+FILES_libgtp = "${libdir}/*${SOLIBS}"
+FILES_libgtp-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la"
+FILES_libgtp-staticdev = "${libdir}/*.a"
+
+FILES_osmo-sgsnemu = "${bindir}/sgsnemu"