blob: e1a93ee81cb7a5a6ae8b6618c50e19c017f760cc [file] [log] [blame]
Holger Hans Peter Freyther85d5ea42013-03-16 11:25:39 +01001DESCRIPTION = "OpenBSC a Free Software GSM BaseStationController"
Harald Welte29263f12013-03-13 15:54:58 +01002DEPENDS = "libdbi libosmocore libosmo-sccp libosmo-abis openggsn libsmpp34"
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
14INC_PR = "r16.${META_TELEPHONY_OSMO_INC}"
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080015
16
Harald Welte29263f12013-03-13 15:54:58 +010017EXTRA_OECONF += " --enable-nat --enable-osmo-bsc --enable-smpp"
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080018
19inherit autotools update-rc.d
20
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
52INITSCRIPT_PACKAGES = "osmo-bsc osmo-bsc-mgcp osmo-nitb"
53
54CONFFILES_osmo-bsc = "${sysconfdir}/osmocom/osmo-bsc.cfg"
55INITSCRIPT_NAME_osmo-bsc = "osmo-bsc"
56INITSCRIPT_PARAMS_osmo-bsc = "defaults 30 30"
57FILES_osmo-bsc = " ${bindir}/osmo-bsc \
58 ${sysconfdir}/osmocom/osmo-bsc.cfg \
Henning Heinoldbcc81552014-02-18 17:41:56 +010059 ${sysconfdir}/init.d/osmo-bsc \
60 ${systemd_unitdir}/system/osmo-bsc.service \
61 "
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080062
63CONFFILES_osmo-bsc-mgcp = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg"
64INITSCRIPT_NAME_osmo-bsc-mgcp = "osmo-bsc-mgcp"
65INITSCRIPT_PARAMS_osmo-bsc-mgcp = "defaults 30 30"
Holger Hans Peter Freythere005f8d2012-04-14 19:39:29 +080066FILES_osmo-bsc-mgcp = " ${bindir}/osmo-bsc_mgcp \
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080067 ${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \
Henning Heinoldbcc81552014-02-18 17:41:56 +010068 ${sysconfdir}/init.d/osmo-bsc-mgcp \
69 ${systemd_unitdir}/system/osmo-bsc-mgcp.service \
70 "
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080071
72CONFFILES_osmo-nitb = "${sysconfdir}/osmocom/osmo-nitb.cfg"
73INITSCRIPT_NAME_osmo-nitb = "osmo-nitb"
74INITSCRIPT_PARAMS_osmo-nitb = "defaults 30 30"
75FILES_osmo-nitb = " ${bindir}/osmo-nitb \
76 /var/lib/osmocom \
77 ${sysconfdir}/init.d/osmo-nitb \
Henning Heinoldbcc81552014-02-18 17:41:56 +010078 ${sysconfdir}/osmocom/osmo-nitb.cfg \
79 ${systemd_unitdir}/system/osmo-nitb.service \
80 "
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080081
Harald Welte4aad6362013-01-29 19:54:07 +010082CONFFILES_osmo-sgsn = "${sysconfdir}/osmocom/osmo-sgsn.cfg"
83INITSCRIPT_NAME_osmo-sgsn = "osmo-sgsn"
84INITSCRIPT_PARAMS_osmo-sgsn = "defaults 30 30"
85FILES_osmo-sgsn = " ${bindir}/osmo-sgsn \
86 ${sysconfdir}/init.d/osmo-sgsn \
87 ${sysconfdir}/osmocom/osmo-sgsn.cfg"
88
Holger Hans Peter Freyther60ee4cd2011-11-11 21:26:06 +080089FILES_ipaccess-utils = " ${bindir}/ipaccess-find ${bindir}/ipaccess-config ${bindir}/ipaccess-proxy "
90FILES_osmo-bsc-nat = " ${bindir}/osmo-bsc_nat "
91FILES_osmo-gbproxy = " ${bindir}/osmo-gbproxy "
92FILES_osmo-gbproxy-dbg = " ${bindir}/.debug/osmo-gbproxy "
93