blob: 6bef6615c95cb03902d92afdf1f4adca62bfdc50 [file] [log] [blame]
Neels Hofmeyr1804aa82017-03-29 16:45:51 +02001DESCRIPTION = "Osmocom GSM/UMTS Home Location Register"
Daniel Willmann9e884432017-05-08 15:55:16 +02002DEPENDS = "libosmocore libosmo-abis sqlite3 sqlite3-native"
Neels Hofmeyr1804aa82017-03-29 16:45:51 +02003HOMEPAGE = "http://osmocom.org/projects/osmo-hlr"
4LICENSE = "AGPLv3+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
6
7SRC_URI = "file://osmo-hlr.init"
8
9INC_PR = "r1.${META_TELEPHONY_OSMO_INC}"
10
11inherit autotools update-rc.d pkgconfig
12
13# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
14do_configure_prepend() {
15 echo "${PV}" > ${S}/.tarball-version
16}
17
18do_install_append() {
19 install -d ${D}${sysconfdir}/osmocom
Daniel Willmann9e884432017-05-08 15:55:16 +020020 install -m 0660 ${S}/doc/examples/osmo-hlr.cfg ${D}${sysconfdir}/osmocom/osmo-hlr.cfg
Neels Hofmeyr1804aa82017-03-29 16:45:51 +020021
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 Willmann9e884432017-05-08 15:55:16 +020029 install -m 0644 ${S}/contrib/systemd/osmo-hlr.service ${D}${systemd_unitdir}/system/
Neels Hofmeyr1804aa82017-03-29 16:45:51 +020030
31 install -d ${D}/var/lib/osmocom
Daniel Willmann9e884432017-05-08 15:55:16 +020032 sqlite3 ${D}/var/lib/osmocom/hlr.db < ${S}/sql/hlr.sql
Neels Hofmeyr1804aa82017-03-29 16:45:51 +020033}
34
Neels Hofmeyr1804aa82017-03-29 16:45:51 +020035INITSCRIPT_PACKAGES = "osmo-hlr"
36
37# Do not start any of the services by default
38SYSTEMD_AUTO_ENABLE = "disable"
39
Daniel Willmann9e884432017-05-08 15:55:16 +020040CONFFILES_${PN} = "${sysconfdir}/osmocom/osmo-hlr.cfg"
41INITSCRIPT_NAME_${PN} = "osmo-hlr"
42INITSCRIPT_PARAMS_${PN} = "defaults 30 30"
43
44FILES_${PN} += "${systemd_unitdir}/system/osmo-hlr.service"