Neels Hofmeyr | 1804aa8 | 2017-03-29 16:45:51 +0200 | [diff] [blame] | 1 | DESCRIPTION = "Osmocom GSM/UMTS Home Location Register" |
Daniel Willmann | 9e88443 | 2017-05-08 15:55:16 +0200 | [diff] [blame^] | 2 | DEPENDS = "libosmocore libosmo-abis sqlite3 sqlite3-native" |
Neels Hofmeyr | 1804aa8 | 2017-03-29 16:45:51 +0200 | [diff] [blame] | 3 | HOMEPAGE = "http://osmocom.org/projects/osmo-hlr" |
| 4 | LICENSE = "AGPLv3+" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" |
| 6 | |
| 7 | SRC_URI = "file://osmo-hlr.init" |
| 8 | |
| 9 | INC_PR = "r1.${META_TELEPHONY_OSMO_INC}" |
| 10 | |
| 11 | inherit autotools update-rc.d pkgconfig |
| 12 | |
| 13 | # because "${WORKDIR}/git" is not a git repo, it can't figure out the version |
| 14 | do_configure_prepend() { |
| 15 | echo "${PV}" > ${S}/.tarball-version |
| 16 | } |
| 17 | |
| 18 | do_install_append() { |
| 19 | install -d ${D}${sysconfdir}/osmocom |
Daniel Willmann | 9e88443 | 2017-05-08 15:55:16 +0200 | [diff] [blame^] | 20 | install -m 0660 ${S}/doc/examples/osmo-hlr.cfg ${D}${sysconfdir}/osmocom/osmo-hlr.cfg |
Neels Hofmeyr | 1804aa8 | 2017-03-29 16:45:51 +0200 | [diff] [blame] | 21 | |
| 22 | # Install sysv-init files |
| 23 | install -d ${D}${sysconfdir}/init.d |
| 24 | install -d ${D}${sysconfdir}/rc5.d |
| 25 | install -m 0775 ${WORKDIR}/osmo-hlr.init ${D}${sysconfdir}/init.d/osmo-hlr |
| 26 | |
| 27 | # Install systemd files and enable on sysinit |
| 28 | install -d ${D}${systemd_unitdir}/system |
Daniel Willmann | 9e88443 | 2017-05-08 15:55:16 +0200 | [diff] [blame^] | 29 | install -m 0644 ${S}/contrib/systemd/osmo-hlr.service ${D}${systemd_unitdir}/system/ |
Neels Hofmeyr | 1804aa8 | 2017-03-29 16:45:51 +0200 | [diff] [blame] | 30 | |
| 31 | install -d ${D}/var/lib/osmocom |
Daniel Willmann | 9e88443 | 2017-05-08 15:55:16 +0200 | [diff] [blame^] | 32 | sqlite3 ${D}/var/lib/osmocom/hlr.db < ${S}/sql/hlr.sql |
Neels Hofmeyr | 1804aa8 | 2017-03-29 16:45:51 +0200 | [diff] [blame] | 33 | } |
| 34 | |
Neels Hofmeyr | 1804aa8 | 2017-03-29 16:45:51 +0200 | [diff] [blame] | 35 | INITSCRIPT_PACKAGES = "osmo-hlr" |
| 36 | |
| 37 | # Do not start any of the services by default |
| 38 | SYSTEMD_AUTO_ENABLE = "disable" |
| 39 | |
Daniel Willmann | 9e88443 | 2017-05-08 15:55:16 +0200 | [diff] [blame^] | 40 | CONFFILES_${PN} = "${sysconfdir}/osmocom/osmo-hlr.cfg" |
| 41 | INITSCRIPT_NAME_${PN} = "osmo-hlr" |
| 42 | INITSCRIPT_PARAMS_${PN} = "defaults 30 30" |
| 43 | |
| 44 | FILES_${PN} += "${systemd_unitdir}/system/osmo-hlr.service" |