# Copyright 2025 Gabriel Sanches
# Distributed under the terms of the Zero-Clause BSD License

EAPI=8

inherit multilib

DESCRIPTION="PAM module to create and set XDG_RUNTIME_DIR on login"
HOMEPAGE="https://github.com/ifreund/dumb_runtime_dir"
SRC_URI="https://github.com/ifreund/dumb_runtime_dir/releases/download/v${PV}/${P}.tar.gz"
LICENSE="0BSD"

SLOT="0"
KEYWORDS="~amd64"

RDEPEND="sys-libs/pam"
DEPEND="${RDEPEND}"

src_compile() {
	emake PREFIX="${D}" PAMDIR="${D}/$(get_libdir)/security"
}

src_install() {
	emake PREFIX="${D}" PAMDIR="${D}/$(get_libdir)/security" install
}