osmo-ggsn: handle systemd and cfg files through autotools

Change-Id: I3c220c11f58793c644d750040c7fad347500bb8a
diff --git a/recipes-osmocom/osmo-ggsn/osmo-ggsn.inc b/recipes-osmocom/osmo-ggsn/osmo-ggsn.inc
index fe0170f..0aaf418 100644
--- a/recipes-osmocom/osmo-ggsn/osmo-ggsn.inc
+++ b/recipes-osmocom/osmo-ggsn/osmo-ggsn.inc
@@ -5,22 +5,19 @@
 
 DEPENDS = "libosmocore"
 
-INC_PR="r1.${META_TELEPHONY_OSMO_INC}"
+INC_PR="r2.${META_TELEPHONY_OSMO_INC}"
+
+inherit autotools pkgconfig systemd
+
+PACKAGECONFIG ??= "\
+    ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+    "
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir},--without-systemdsystemunitdir"
 
 PACKAGES =+ " libgtp libgtp-dev libgtp-staticdev osmo-sgsnemu"
 RDEPENDS_${PN} += "iptables"
 RRECOMMENDS_${PN} += "kernel-module-ipt-masquerade kernel-module-tun"
 
-inherit autotools pkgconfig systemd
-
-do_install_append() {
-	install -d ${D}${systemd_system_unitdir}/
-	install -d ${D}/${sysconfdir}/osmocom/
-
-	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"
 
 CONFFILES_osmo-ggsn = "${sysconfdir}/osmocom/osmo-ggsn.cfg"