Neels Hofmeyr | 1804aa8 | 2017-03-29 16:45:51 +0200 | [diff] [blame] | 1 | DESCRIPTION = "OsmoMSC, OsmoSGSN, OsmoMGCP" |
| 2 | DEPENDS = "libdbi libosmocore libosmo-sccp libosmo-abis libosmo-netif openggsn libsmpp34 bcg729 libgsm libpcap c-ares libasn1c osmo-iuh" |
| 3 | HOMEPAGE = "http://osmocom.org/projects/osmomsc" |
| 4 | LICENSE = "AGPLv3+" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" |
| 6 | |
| 7 | RDEPENDS_osmo-msc = "libdbd-sqlite3" |
| 8 | |
| 9 | SRC_URI = "file://osmo-msc.init \ |
| 10 | file://osmo-bsc_mgcp.init \ |
| 11 | file://osmo-sgsn.init" |
| 12 | |
| 13 | INC_PR = "r1.${META_TELEPHONY_OSMO_INC}" |
| 14 | |
| 15 | |
| 16 | EXTRA_OECONF += " --enable-iu --enable-smpp --enable-mgcp-transcoding --with-g729" |
| 17 | |
| 18 | inherit autotools update-rc.d pkgconfig |
| 19 | |
| 20 | # because "${WORKDIR}/git" is not a git repo, it can't figure out the version |
| 21 | do_configure_prepend() { |
| 22 | echo "${PV}" > ${S}/.tarball-version |
| 23 | } |
| 24 | |
| 25 | do_install_append() { |
| 26 | install -d ${D}${sysconfdir}/osmocom |
| 27 | install -m 0660 ${S}/doc/examples/osmo-msc/osmo-msc.cfg ${D}${sysconfdir}/osmocom/osmo-msc.cfg |
| 28 | install -m 0660 ${S}/doc/examples/osmo-bsc_mgcp/mgcp.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg |
| 29 | install -m 0660 ${S}/doc/examples/osmo-sgsn/osmo-sgsn.cfg ${D}${sysconfdir}/osmocom/osmo-sgsn.cfg |
| 30 | |
| 31 | # Install sysv-init files |
| 32 | install -d ${D}${sysconfdir}/init.d |
| 33 | install -d ${D}${sysconfdir}/rc5.d |
| 34 | install -m 0775 ${WORKDIR}/osmo-msc.init ${D}${sysconfdir}/init.d/osmo-msc |
| 35 | install -m 0775 ${WORKDIR}/osmo-bsc_mgcp.init ${D}${sysconfdir}/init.d/osmo-bsc-mgcp |
| 36 | install -m 0775 ${WORKDIR}/osmo-sgsn.init ${D}${sysconfdir}/init.d/osmo-sgsn |
| 37 | |
| 38 | # Install systemd files and enable on sysinit |
| 39 | install -d ${D}${systemd_unitdir}/system |
Daniel Willmann | ef80bf1 | 2017-05-08 16:09:18 +0200 | [diff] [blame] | 40 | install -m 0644 ${S}/contrib/systemd/osmo-msc.service ${D}${systemd_unitdir}/system/ |
| 41 | install -m 0644 ${S}/contrib/systemd/osmo-sgsn.service ${D}${systemd_unitdir}/system/ |
| 42 | install -m 0644 ${S}/contrib/systemd/osmo-bsc-mgcp.service ${D}${systemd_unitdir}/system/ |
Neels Hofmeyr | 1804aa8 | 2017-03-29 16:45:51 +0200 | [diff] [blame] | 43 | |
| 44 | install -d ${D}/var/lib/osmocom |
| 45 | } |
| 46 | |
| 47 | PACKAGES =+ "osmo-msc osmo-sgsn osmo-bsc-mgcp ipaccess-utils" |
| 48 | |
| 49 | INITSCRIPT_PACKAGES = "osmo-msc osmo-sgsn osmo-bsc-mgcp" |
| 50 | |
| 51 | # Do not start any of the services by default |
| 52 | SYSTEMD_AUTO_ENABLE = "disable" |
| 53 | |
| 54 | CONFFILES_osmo-msc = "${sysconfdir}/osmocom/osmo-msc.cfg" |
| 55 | INITSCRIPT_NAME_osmo-msc = "osmo-msc" |
| 56 | INITSCRIPT_PARAMS_osmo-msc = "defaults 30 30" |
| 57 | FILES_osmo-msc = " ${bindir}/osmo-msc \ |
| 58 | /var/lib/osmocom \ |
| 59 | ${sysconfdir}/init.d/osmo-msc \ |
| 60 | ${sysconfdir}/osmocom/osmo-msc.cfg \ |
| 61 | ${systemd_unitdir}/system/osmo-msc.service \ |
| 62 | " |
| 63 | |
| 64 | CONFFILES_osmo-sgsn = "${sysconfdir}/osmocom/osmo-sgsn.cfg" |
| 65 | INITSCRIPT_NAME_osmo-sgsn = "osmo-sgsn" |
| 66 | INITSCRIPT_PARAMS_osmo-sgsn = "defaults 30 30" |
| 67 | FILES_osmo-sgsn = " ${bindir}/osmo-sgsn \ |
| 68 | ${sysconfdir}/init.d/osmo-sgsn \ |
| 69 | ${sysconfdir}/osmocom/osmo-sgsn.cfg \ |
| 70 | ${systemd_unitdir}/system/osmo-sgsn.service \ |
| 71 | " |
| 72 | |
| 73 | CONFFILES_osmo-bsc-mgcp = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg" |
| 74 | INITSCRIPT_NAME_osmo-bsc-mgcp = "osmo-bsc-mgcp" |
| 75 | INITSCRIPT_PARAMS_osmo-bsc-mgcp = "defaults 30 30" |
| 76 | FILES_osmo-bsc-mgcp = " ${bindir}/osmo-bsc_mgcp \ |
| 77 | ${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \ |
| 78 | ${sysconfdir}/init.d/osmo-bsc-mgcp \ |
| 79 | ${systemd_unitdir}/system/osmo-bsc-mgcp.service \ |
| 80 | " |
| 81 | |
| 82 | FILES_ipaccess-utils = " ${bindir}/ipaccess-find ${bindir}/ipaccess-config ${bindir}/ipaccess-proxy " |