meta-sysmocom-bsp/recipes-sysmobts/osmo-bts/osmo-bts_git.bb

90 lines
3.2 KiB
BlitzBasic

DESCRIPTION = "sysmocom OsmoBTS"
LICENSE = "AGPLv3"
LIC_FILES_CHKSUM="file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
SRC_URI = "git://git.osmocom.org/osmo-bts.git;protocol=git;branch=master;name=osmobts;destsuffix=git \
git://git.osmocom.org/openbsc;protocol=git;branch=master;name=openbsc;destsuffix=openbsc"
SRCREV_osmobts = "d208132ab90e3314ae5fbd9830bf43c1b3fa1893"
SRCREV_openbsc = "ba66e79953cb1c2230fe2916ef7d8de78500c7fd"
PV = "0.4.3+git${SRCPV}"
PR = "r20.${META_TELEPHONY_OSMO_INC}"
S = "${WORKDIR}/git"
SRCREV_FORMAT = "openbsc-rosmobts"
DEPENDS = "libosmocore libosmo-abis femtobts-api gpsd"
DEPENDS_append_sysmobts-v2 = " femtobts-api"
DEPENDS_append_sysmobts2100 = " lc15-firmware"
RDEPENDS_${PN} += "coreutils"
RDEPENDS_${PN}_append_sysmobts-v2 = " sysmobts-firmware (>= 5.1)"
RCONFLICTS_${PN}_append_sysmobts-v2 = " sysmobts-firmware (< 5.1)"
RDEPENDS_${PN}_append_sysmobts2100 = " lc15-firmware"
EXTRA_OECONF_sysmobts-v2 += "--enable-sysmocom-bts"
EXTRA_OECONF_sysmobts2100 += "--enable-litecell15"
inherit autotools pkgconfig systemd
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_AUTO_ENABLE_${PN}="enable"
# Select the API version
inherit femtobts_api
CPPFLAGS_append_sysmobts-v2 = " ${BTS_HW_VERSION} "
do_configure_prepend() {
ln -sf ../openbsc openbsc || true
}
do_compile_append_sysmobts-v2() {
cd ${S}/contrib/sysmobts-calib/
oe_runmake
}
do_install_append() {
install -d ${D}${sysconfdir}/osmocom
install -d ${D}/${systemd_unitdir}/system
}
do_install_append_sysmobts-v2() {
install -m 0755 ${S}/contrib/sysmobts-calib/sysmobts-calib ${D}${bindir}/
install -m 0660 ${S}/doc/examples/sysmo/osmo-bts.cfg ${D}${sysconfdir}/osmocom
# Install systemd and enable on sysinit
install -m 0660 ${S}/doc/examples/sysmo/sysmobts-mgr.cfg ${D}${sysconfdir}/osmocom
install -m 0644 ${S}/contrib/sysmobts-mgr.service ${D}${systemd_unitdir}/system/
install -m 0644 ${S}/contrib/osmo-bts-sysmo.service ${D}${systemd_unitdir}/system/
}
do_install_append_sysmobts2100() {
install -m 0660 ${S}/doc/examples/litecell15/osmo-bts.cfg ${D}${sysconfdir}/osmocom
# ensure consistent naming
cp ${D}/${bindir}/lc15bts-util ${D}/${bindir}/sysmobts-util
cp ${D}/${bindir}/lc15bts-mgr ${D}/${bindir}/sysmobts-mgr
# Install systemd and enable on sysinit
install -m 0644 ${S}/contrib/sysmobts-mgr.service ${D}${systemd_unitdir}/system/lc15bts-mgr.service
install -m 0660 ${S}/doc/examples/litecell15/lc15bts-mgr.cfg ${D}${sysconfdir}/osmocom/
install -m 0644 ${S}/contrib/osmo-bts-lc15.service ${D}${systemd_unitdir}/system/
}
SYSTEMD_SERVICE_${PN}_append_sysmobts-v2 = "sysmobts-mgr.service osmo-bts-sysmo.service"
SYSTEMD_SERVICE_${PN}_append_sysmobts2100 = "lc15bts-mgr.service osmo-bts-lc15.service"
CONFFILES_${PN} = "${sysconfdir}/osmocom/osmo-bts.cfg"
CONFFILES_${PN}_append_sysmobts-v2 = " ${sysconfdir}/osmocom/sysmobts-mgr.cfg"
# somehow it seems not posible to use _append constructs on PACKAGES
#PACKAGES_append_sysmobts-v2 = " osmo-bts-remote sysmobts-calib sysmobts-util"
PACKAGES =+ "osmo-bts-remote sysmobts-calib sysmobts-util"
FILES_osmo-bts-remote_sysmobts-v2 = " ${bindir}/osmo-bts-sysmo-remote "
FILES_sysmobts-calib_sysmobts-v2 = " ${bindir}/sysmobts-calib "
FILES_sysmobts-util = " ${bindir}/sysmobts-util "