blob: 785ae50e9ebd816148dc49763fae49453a580d08 [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001SUMMARY = "Y2038 safe version of wtmp"
2HOMEPAGE = "https://github.com/thkukuk/wtmpdb"
3DESCRIPTION = "last reports the login and logout times of users and when the machine got rebooted."
4LICENSE = "BSD-2-Clause"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=020090a00b69dd2af9ab82eb0003ea2c"
6SECTION = "libs"
7
Patrick Williams03514f12024-04-05 07:04:11 -05008SRCREV = "493e9704dbc50f141d5fbd41c823311e79d7e8d3"
Patrick Williamsac13d5f2023-11-24 18:59:46 -06009
10SRC_URI = "git://github.com/thkukuk/wtmpdb.git;branch=main;protocol=https \
Patrick Williams03514f12024-04-05 07:04:11 -050011 file://0001-include-libgen.h-for-basename.patch"
Patrick Williamsac13d5f2023-11-24 18:59:46 -060012
13S = "${WORKDIR}/git"
14
15inherit meson pkgconfig systemd features_check
16
17DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} sqlite3 "
18REQUIRED_DISTRO_FEATURES = "pam"
19
20SYSTEMD_SERVICE:${PN} = "wtmpdb-update-boot.service wtmpdb-rotate.service"
21
22EXTRA_OEMESON = " -Dpamlibdir=${libdir}"
23
24do_install:append () {
25 if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then
26 # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
27 # without usrmerge distro feature enabled
28 install -d `dirname ${D}${systemd_unitdir}`
29 mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
30 fi
31}
32
33FILES:${PN} += " ${systemd_system_unitdir} "
34FILES:${PN} += " ${libdir} "
35FILES:${PN} += " ${nonarch_libdir}/tmpfiles.d/* "