You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.6 KiB

  1. DESCRIPTION = "sysmocom OsmoBTS"
  2. LICENSE = "AGPLv3"
  3. LIC_FILES_CHKSUM="file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
  4. SRC_URI = "git://git.osmocom.org/osmo-bts.git;protocol=git;branch=sysmocom/0.3.5-stable;name=osmobts;destsuffix=git \
  5. git://git.osmocom.org/openbsc;protocol=git;branch=master;name=openbsc;destsuffix=openbsc"
  6. SRCREV_osmobts = "af0ed4ee1417d165a530dcfc319143c4989c1444"
  7. SRCREV_openbsc = "57ee78078905c7499bd4e6857f8981d22badfcac"
  8. PV = "0.4.3+git${SRCPV}"
  9. PR = "r18.${META_TELEPHONY_OSMO_INC}"
  10. S = "${WORKDIR}/git"
  11. SRCREV_FORMAT = "openbsc-rosmobts"
  12. DEPENDS = "libosmocore libosmo-abis femtobts-api gpsd"
  13. RDEPENDS_${PN} += "coreutils sysmobts-firmware (>= 5.1)"
  14. RCONFLICTS_${PN} = "sysmobts-firmware (< 5.1)"
  15. EXTRA_OECONF += "--enable-sysmocom-bts"
  16. inherit autotools update-rc.d pkgconfig
  17. # Select the API version
  18. inherit femtobts_api
  19. CPPFLAGS += " ${BTS_HW_VERSION} "
  20. do_configure_prepend() {
  21. ln -sf ../openbsc openbsc || true
  22. }
  23. do_compile_append_sysmobts-v2() {
  24. cd ${S}/contrib/sysmobts-calib/
  25. oe_runmake
  26. }
  27. do_install_append() {
  28. install -d ${D}${sysconfdir}/osmocom
  29. install -m 0660 ${S}/doc/examples/osmo-bts.cfg ${D}${sysconfdir}/osmocom
  30. install -m 0755 ${S}/contrib/respawn.sh ${D}${sysconfdir}/osmocom/
  31. install -m 0755 ${S}/contrib/respawn-only.sh ${D}${sysconfdir}/osmocom/
  32. install -m 0644 ${S}/contrib/screenrc-sysmobts ${D}${sysconfdir}/osmocom/
  33. install -d ${D}${sysconfdir}/init.d
  34. install -m 0755 ${S}/contrib/sysmobts.init ${D}${sysconfdir}/init.d/sysmobts
  35. # Install systemd and enable on sysinit
  36. install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/
  37. install -m 0644 ${S}/contrib/sysmobts.service ${D}${systemd_unitdir}/system/
  38. ln -sf ../sysmobts.service ${D}${systemd_unitdir}/system/multi-user.target.wants/
  39. # Future sysmobts-mgr handling
  40. install -m 0660 ${S}/doc/examples/sysmobts-mgr.cfg ${D}${sysconfdir}/osmocom
  41. install -m 0644 ${S}/contrib/sysmobts-mgr.service ${D}${systemd_unitdir}/system/
  42. ln -sf ../sysmobts-mgr.service ${D}${systemd_unitdir}/system/multi-user.target.wants/
  43. }
  44. do_install_append_sysmobts-v2() {
  45. install -m 0755 ${S}/contrib/sysmobts-calib/sysmobts-calib ${D}${bindir}/
  46. }
  47. CONFFILES_${PN} = "${sysconfdir}/osmocom/osmo-bts.cfg"
  48. CONFFILES_${PN} += "${sysconfdir}/osmocom/sysmobts-mgr.cfg"
  49. INITSCRIPT_PACKAGES = "${PN}"
  50. INITSCRIPT_NAME_${PN} = "sysmobts"
  51. INITSCRIPT_PARAMS_${PN} = "defaults 30 30"
  52. PACKAGES =+ "osmo-bts-remote sysmobts-calib sysmobts-util"
  53. FILES_${PN} += "${systemd_unitdir}"
  54. FILES_osmo-bts-remote = " ${bindir}/sysmobts-remote "
  55. FILES_sysmobts-calib = " ${bindir}/sysmobts-calib "
  56. FILES_sysmobts-util = " ${bindir}/sysmobts-util "