Add recipe for osmo-pcap, both server and client

Change-Id: I5bb85b118029d1559a958803184690a9d0f23e4a
diff --git a/recipes-osmocom/osmo-pcap/osmo-pcap.inc b/recipes-osmocom/osmo-pcap/osmo-pcap.inc
new file mode 100644
index 0000000..a7d3a60
--- /dev/null
+++ b/recipes-osmocom/osmo-pcap/osmo-pcap.inc
@@ -0,0 +1,39 @@
+DESCRITOPN = "Osmocom PCAP client (probe) and server (aggregator)"
+HOMEPAGE = "https://osmocom.org/"
+LICENSE = "AGPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
+
+DEPENDS = "libosmocore zeromq libpcap gnutls"
+
+INC_PR="r0.${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 =+ "osmo-pcap-server osmo-pcap-client"
+
+SYSTEMD_PACKAGES = "osmo-pcap-server osmo-pcap-client"
+SYSTEMD_SERVICE_osmo-pcap-server = "osmo-pcap-server.service"
+SYSTEMD_SERVICE_osmo-pcap-client = "osmo-pcap-client.service"
+
+CONFFILES_osmo-pcap-server = "${sysconfdir}/osmocom/osmo-pcap-server.cfg"
+CONFFILES_osmo-pcap-client = "${sysconfdir}/osmocom/osmo-pcap-client.cfg"
+
+EXTRA_OECONF += "--with-pcap-config=no"
+
+do_configure_prepend() {
+	export PCAP_LIBS="-lpcap"
+}
+
+FILES_osmo-pcap-server = "${bindir}/osmo-pcap-server \
+			  ${sysconfdir}/osmocom/osmo-pcap-server.cfg \
+			  ${datadir}/osmo-pcap/osmo_pcap_clean_old \
+			  "
+
+FILES_osmo-pcap-client = "${bindir}/osmo-pcap-client \
+			  ${sysconfdir}/osmocom/osmo-pcap-client.cfg \
+			  "