aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/wtmpdb/wtmpdb_0.7.1.bb
blob: cffae2d432377204624551ac24d439c86cab8878 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
SUMMARY = "Y2038 safe version of wtmp"
HOMEPAGE = "https://github.com/thkukuk/wtmpdb"
DESCRIPTION = "last reports the login and logout times of users and when the machine got rebooted."
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=020090a00b69dd2af9ab82eb0003ea2c"
SECTION = "libs"

SRCREV = "502b19a41c7a3b1b5e70969b18088683825f71f8"

SRC_URI = "git://github.com/thkukuk/wtmpdb.git;branch=main;protocol=https \
           file://0001-remove-lto-to-fix-link-error-of-clang.patch \
"

S = "${WORKDIR}/git"

inherit meson pkgconfig systemd features_check

DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} sqlite3 "
REQUIRED_DISTRO_FEATURES = "pam"

SYSTEMD_SERVICE:${PN} = "wtmpdb-update-boot.service wtmpdb-rotate.service"

EXTRA_OEMESON = " -Dpamlibdir=${libdir}"

do_install:append () {
      if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then
          # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
          # without usrmerge distro feature enabled
          install -d `dirname ${D}${systemd_unitdir}`
          mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
      fi
}

FILES:${PN} += " ${systemd_system_unitdir} "
FILES:${PN} += " ${libdir} "
FILES:${PN} += " ${nonarch_libdir}/tmpfiles.d/* "