blob: e64ca88cf0d15faaefe12546dd858b16c7cae9a1 [file] [log] [blame]
Pau Espin Pedrol4b85e1a2017-07-21 13:37:18 +02001DESCRITOPN = "Osmocom PCAP client (probe) and server (aggregator)"
2HOMEPAGE = "https://osmocom.org/"
3LICENSE = "AGPLv3+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
5
6DEPENDS = "libosmocore zeromq libpcap gnutls"
7
Oliver Smithc9f254d2024-04-19 15:56:59 +02008INC_PR="r2.${META_TELEPHONY_OSMO_INC}"
Pau Espin Pedrol4b85e1a2017-07-21 13:37:18 +02009
10inherit autotools pkgconfig systemd
11
12PACKAGECONFIG ??= "\
13 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
14 "
15PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir},--without-systemdsystemunitdir"
16
Pau Espin Pedroldf5ac432023-02-17 14:57:14 +010017do_install_append() {
Oliver Smithc9f254d2024-04-19 15:56:59 +020018 # StateDirectory requires systemd >= v235, but poky pyro ships with v232 (SYS#6340):
Pau Espin Pedroldf5ac432023-02-17 14:57:14 +010019 sed -i '/^StateDirectory=/d' "${D}${systemd_system_unitdir}/osmo-pcap-server.service"
20 sed -i '/^WorkingDirectory=/d' "${D}${systemd_system_unitdir}/osmo-pcap-server.service"
21 sed -i '/^StateDirectory=/d' "${D}${systemd_system_unitdir}/osmo-pcap-client.service"
22 sed -i '/^WorkingDirectory=/d' "${D}${systemd_system_unitdir}/osmo-pcap-client.service"
Oliver Smithc9f254d2024-04-19 15:56:59 +020023
24 # Run as root (OS#5684):
25 sed -i '/^User=/d' "${D}${systemd_system_unitdir}/osmo-pcap-server.service"
26 sed -i '/^Group=/d' "${D}${systemd_system_unitdir}/osmo-pcap-server.service"
27 sed -i '/^User=/d' "${D}${systemd_system_unitdir}/osmo-pcap-client.service"
28 sed -i '/^Group=/d' "${D}${systemd_system_unitdir}/osmo-pcap-client.service"
Pau Espin Pedroldf5ac432023-02-17 14:57:14 +010029}
30
Pau Espin Pedrol4b85e1a2017-07-21 13:37:18 +020031PACKAGES =+ "osmo-pcap-server osmo-pcap-client"
32
33SYSTEMD_PACKAGES = "osmo-pcap-server osmo-pcap-client"
34SYSTEMD_SERVICE_osmo-pcap-server = "osmo-pcap-server.service"
35SYSTEMD_SERVICE_osmo-pcap-client = "osmo-pcap-client.service"
36
37CONFFILES_osmo-pcap-server = "${sysconfdir}/osmocom/osmo-pcap-server.cfg"
38CONFFILES_osmo-pcap-client = "${sysconfdir}/osmocom/osmo-pcap-client.cfg"
39
40EXTRA_OECONF += "--with-pcap-config=no"
41
42do_configure_prepend() {
43 export PCAP_LIBS="-lpcap"
44}
45
46FILES_osmo-pcap-server = "${bindir}/osmo-pcap-server \
47 ${sysconfdir}/osmocom/osmo-pcap-server.cfg \
48 ${datadir}/osmo-pcap/osmo_pcap_clean_old \
49 "
50
51FILES_osmo-pcap-client = "${bindir}/osmo-pcap-client \
52 ${sysconfdir}/osmocom/osmo-pcap-client.cfg \
53 "