pam_dumb_runtime_dir-1.0.4.ebuild 823 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit pam toolchain-funcs
  5. MY_PN="${PN#pam_}"
  6. DESCRIPTION="Creates an XDG_RUNTIME_DIR on login and never removes it"
  7. HOMEPAGE="https://github.com/ifreund/dumb_runtime_dir"
  8. SRC_URI="https://github.com/ifreund/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  9. S="${WORKDIR}/${MY_PN}-${PV}"
  10. LICENSE="0BSD"
  11. SLOT="0"
  12. KEYWORDS="amd64"
  13. DEPEND="sys-libs/pam"
  14. RDEPEND="${DEPEND}"
  15. src_prepare() {
  16. sed -i ./Makefile \
  17. -e '/^CFLAGS/{s/=/+&/;s/-\(g\|O.\)\s\+//g}' \
  18. -e '/^CC/d' \
  19. || die
  20. default
  21. }
  22. src_compile() {
  23. tc-env_build emake
  24. }
  25. src_install() {
  26. einstalldocs
  27. dopammod "${PN}.so"
  28. }
  29. pkg_postinst() {
  30. einfo "to use this PAM module, add to '/etc/pam.d/system-login':"
  31. einfo "'session optional ${PN}.so'"
  32. }