blob: 164b492b0a0de8409f447a5a20e17a908bf1d4e2 [file] [log] [blame]
Holger Hans Peter Freyther85d5ea42013-03-16 11:25:39 +01001DESCRIPTION = "OpenBSC a Free Software GSM BaseStationController"
Pau Espin Pedrol73eade52017-09-25 17:46:29 +02002DEPENDS = "libdbi libosmocore libosmo-sccp libosmo-abis libosmo-netif osmo-ggsn libsmpp34 bcg729 libgsm libpcap c-ares"
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +08003HOMEPAGE = "http://openbsc.osmocom.org/"
Holger Hans Peter Freytherd24c97d2012-05-30 17:50:06 +08004LICENSE = "AGPLv3+"
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +08005LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
6
7RDEPENDS_osmo-nitb = "libdbd-sqlite3"
8
9SRC_URI = "file://osmo-nitb.init \
10 file://osmo-bsc_mgcp.init \
Harald Welte4aad6362013-01-29 19:54:07 +010011 file://osmo-bsc.init \
12 file://osmo-sgsn.init"
Henning Heinoldbcc81552014-02-18 17:41:56 +010013
Pau Espin Pedrol73eade52017-09-25 17:46:29 +020014INC_PR = "r22.${META_TELEPHONY_OSMO_INC}"
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080015
16
Holger Hans Peter Freyther023ca5d2014-06-16 18:16:02 +020017EXTRA_OECONF += " --enable-nat --enable-osmo-bsc --enable-smpp --enable-mgcp-transcoding --with-g729"
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080018
Holger Hans Peter Freyther3884c622014-09-25 20:16:28 +020019inherit autotools update-rc.d pkgconfig
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080020
21# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
22do_configure_prepend() {
23 echo "${PV}" > ${S}/.tarball-version
24}
25
26do_install_append() {
27 install -d ${D}${sysconfdir}/osmocom
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080028 install -m 0660 ${S}/doc/examples/osmo-nitb/nanobts/openbsc.cfg ${D}${sysconfdir}/osmocom/osmo-nitb.cfg
29 install -m 0660 ${S}/doc/examples/osmo-bsc/osmo-bsc.cfg ${D}${sysconfdir}/osmocom/osmo-bsc.cfg
30 install -m 0660 ${S}/doc/examples/osmo-bsc_mgcp/mgcp.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg
Harald Welte4aad6362013-01-29 19:54:07 +010031 install -m 0660 ${S}/doc/examples/osmo-sgsn/osmo-sgsn.cfg ${D}${sysconfdir}/osmocom/osmo-sgsn.cfg
Henning Heinoldbcc81552014-02-18 17:41:56 +010032
33 # Install sysv-init files
34 install -d ${D}${sysconfdir}/init.d
35 install -d ${D}${sysconfdir}/rc5.d
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080036 install -m 0775 ${WORKDIR}/osmo-nitb.init ${D}${sysconfdir}/init.d/osmo-nitb
37 install -m 0775 ${WORKDIR}/osmo-bsc_mgcp.init ${D}${sysconfdir}/init.d/osmo-bsc-mgcp
38 install -m 0775 ${WORKDIR}/osmo-bsc.init ${D}${sysconfdir}/init.d/osmo-bsc
Harald Welte4aad6362013-01-29 19:54:07 +010039 install -m 0775 ${WORKDIR}/osmo-sgsn.init ${D}${sysconfdir}/init.d/osmo-sgsn
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080040
Henning Heinoldbcc81552014-02-18 17:41:56 +010041 # Install systemd files and enable on sysinit
42 install -d ${D}${systemd_unitdir}/system
43 for i in `ls ${S}/contrib/systemd`; do
44 install -m 0644 ${S}/contrib/systemd/$i ${D}${systemd_unitdir}/system/
45 done
46
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080047 install -d ${D}/var/lib/osmocom
48}
49
50PACKAGES =+ "osmo-bsc osmo-nitb osmo-gbproxy osmo-gbproxy-dbg osmo-sgsn ipaccess-utils osmo-bsc-mgcp osmo-bsc-nat"
51
Holger Hans Peter Freythere673cd62014-06-09 19:29:13 +020052INITSCRIPT_PACKAGES = "osmo-bsc osmo-bsc-mgcp osmo-nitb osmo-sgsn"
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080053
Holger Hans Peter Freytherf244a252014-12-24 15:24:57 +010054# Do not start any of the services by default
55SYSTEMD_AUTO_ENABLE = "disable"
56
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080057CONFFILES_osmo-bsc = "${sysconfdir}/osmocom/osmo-bsc.cfg"
58INITSCRIPT_NAME_osmo-bsc = "osmo-bsc"
59INITSCRIPT_PARAMS_osmo-bsc = "defaults 30 30"
60FILES_osmo-bsc = " ${bindir}/osmo-bsc \
61 ${sysconfdir}/osmocom/osmo-bsc.cfg \
Henning Heinoldbcc81552014-02-18 17:41:56 +010062 ${sysconfdir}/init.d/osmo-bsc \
63 ${systemd_unitdir}/system/osmo-bsc.service \
64 "
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080065
66CONFFILES_osmo-bsc-mgcp = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg"
67INITSCRIPT_NAME_osmo-bsc-mgcp = "osmo-bsc-mgcp"
68INITSCRIPT_PARAMS_osmo-bsc-mgcp = "defaults 30 30"
Holger Hans Peter Freythere005f8d2012-04-14 19:39:29 +080069FILES_osmo-bsc-mgcp = " ${bindir}/osmo-bsc_mgcp \
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080070 ${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \
Henning Heinoldbcc81552014-02-18 17:41:56 +010071 ${sysconfdir}/init.d/osmo-bsc-mgcp \
72 ${systemd_unitdir}/system/osmo-bsc-mgcp.service \
73 "
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080074
75CONFFILES_osmo-nitb = "${sysconfdir}/osmocom/osmo-nitb.cfg"
76INITSCRIPT_NAME_osmo-nitb = "osmo-nitb"
77INITSCRIPT_PARAMS_osmo-nitb = "defaults 30 30"
78FILES_osmo-nitb = " ${bindir}/osmo-nitb \
79 /var/lib/osmocom \
80 ${sysconfdir}/init.d/osmo-nitb \
Henning Heinoldbcc81552014-02-18 17:41:56 +010081 ${sysconfdir}/osmocom/osmo-nitb.cfg \
82 ${systemd_unitdir}/system/osmo-nitb.service \
83 "
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080084
Harald Welte4aad6362013-01-29 19:54:07 +010085CONFFILES_osmo-sgsn = "${sysconfdir}/osmocom/osmo-sgsn.cfg"
86INITSCRIPT_NAME_osmo-sgsn = "osmo-sgsn"
87INITSCRIPT_PARAMS_osmo-sgsn = "defaults 30 30"
88FILES_osmo-sgsn = " ${bindir}/osmo-sgsn \
89 ${sysconfdir}/init.d/osmo-sgsn \
Holger Hans Peter Freytherd496a8d2014-03-21 18:32:49 +010090 ${sysconfdir}/osmocom/osmo-sgsn.cfg \
91 ${systemd_unitdir}/system/osmo-sgsn.service \
92 "
Harald Welte4aad6362013-01-29 19:54:07 +010093
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080094FILES_ipaccess-utils = " ${bindir}/ipaccess-find ${bindir}/ipaccess-config ${bindir}/ipaccess-proxy "
95FILES_osmo-bsc-nat = " ${bindir}/osmo-bsc_nat "
Max3b2076a2017-05-02 11:22:31 +020096FILES_osmo-gbproxy = " ${bindir}/osmo-gbproxy \
97 ${systemd_unitdir}/system/osmo-gbproxy.service \
98 "
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080099FILES_osmo-gbproxy-dbg = " ${bindir}/.debug/osmo-gbproxy "