Neels Hofmeyr | 1804aa8 | 2017-03-29 16:45:51 +0200 | [diff] [blame] | 1 | DESCRIPTION = "OsmoHNBGW, libosmo-ranap" |
| 2 | DEPENDS = "libosmocore libosmo-abis libosmo-netif libasn1c" |
| 3 | HOMEPAGE = "http://osmocom.org/projects/cellular-infrastructure" |
| 4 | LICENSE = "AGPLv3+" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" |
| 6 | |
| 7 | SRC_URI = "file://osmo-hnbgw.init" |
| 8 | |
| 9 | INC_PR = "r1.${META_TELEPHONY_OSMO_INC}" |
| 10 | |
| 11 | #EXTRA_OECONF += " " |
| 12 | |
| 13 | inherit autotools update-rc.d pkgconfig |
| 14 | |
| 15 | # because "${WORKDIR}/git" is not a git repo, it can't figure out the version |
| 16 | do_configure_prepend() { |
| 17 | echo "${PV}" > ${S}/.tarball-version |
| 18 | } |
| 19 | |
| 20 | do_install_append() { |
| 21 | install -d ${D}${sysconfdir}/osmocom |
| 22 | install -m 0660 ${S}/doc/examples/osmo-hnbgw.cfg ${D}${sysconfdir}/osmocom/osmo-hnbgw.cfg |
| 23 | |
| 24 | # Install sysv-init files |
| 25 | install -d ${D}${sysconfdir}/init.d |
| 26 | install -d ${D}${sysconfdir}/rc5.d |
| 27 | install -m 0775 ${WORKDIR}/osmo-hnbgw.init ${D}${sysconfdir}/init.d/osmo-hnbgw |
| 28 | |
| 29 | # Install systemd files and enable on sysinit |
| 30 | install -d ${D}${systemd_unitdir}/system |
| 31 | for i in `ls ${S}/contrib/systemd`; do |
| 32 | install -m 0644 ${S}/contrib/systemd/$i ${D}${systemd_unitdir}/system/ |
| 33 | done |
| 34 | |
| 35 | install -d ${D}/var/lib/osmocom |
| 36 | } |
| 37 | |
| 38 | PACKAGES =+ "osmo-hnbgw libosmo-ranap" |
| 39 | |
| 40 | INITSCRIPT_PACKAGES = "osmo-hnbgw" |
| 41 | |
| 42 | # Do not start any of the services by default |
| 43 | SYSTEMD_AUTO_ENABLE = "disable" |
| 44 | |
| 45 | CONFFILES_osmo-hnbgw = "${sysconfdir}/osmocom/osmo-hnbgw.cfg" |
| 46 | INITSCRIPT_NAME_osmo-hnbgw = "osmo-hnbgw" |
| 47 | INITSCRIPT_PARAMS_osmo-hnbgw = "defaults 30 30" |
| 48 | FILES_osmo-hnbgw = " ${bindir}/osmo-hnbgw \ |
| 49 | /var/lib/osmocom \ |
| 50 | ${sysconfdir}/init.d/osmo-hnbgw \ |
| 51 | ${sysconfdir}/osmocom/osmo-hnbgw.cfg \ |
| 52 | ${systemd_unitdir}/system/osmo-hnbgw.service \ |
| 53 | " |
| 54 | |
| 55 | # ????? |
| 56 | FILES_libosmo-ranap = " ${libdir}/libosmo-ranap " |