commit:     5a91d497a2780e4d8ea0cbb145ddea0e3ed8a570
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  2 10:33:33 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Jun  2 10:33:33 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a91d497

sys-auth/pam_u2f: Fix install-exec-hook to respect DESTDIR

Closes: https://bugs.gentoo.org/793797
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-auth/pam_u2f/files/pam_u2f-1.1.1-fix-Makefile.patch | 13 +++++++++++++
 sys-auth/pam_u2f/pam_u2f-1.1.1.ebuild                   |  9 ++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/sys-auth/pam_u2f/files/pam_u2f-1.1.1-fix-Makefile.patch 
b/sys-auth/pam_u2f/files/pam_u2f-1.1.1-fix-Makefile.patch
new file mode 100644
index 00000000000..5ce95aa3b91
--- /dev/null
+++ b/sys-auth/pam_u2f/files/pam_u2f-1.1.1-fix-Makefile.patch
@@ -0,0 +1,13 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -43,8 +43,8 @@
+ # Release
+ 
+ install-exec-hook:
+-      rm -f $(PAMDIR)/pam_u2f.la
+-      chmod -f 644 $(PAMDIR)/pam_u2f.so || true
++      rm -f $(DESTDIR)/$(PAMDIR)/pam_u2f.la
++      chmod -f 644 $(DESTDIR)/$(PAMDIR)/pam_u2f.so || true
+ 
+ indent:
+       clang-format -i *.c *.h pamu2fcfg/*.c pamu2fcfg/*.h

diff --git a/sys-auth/pam_u2f/pam_u2f-1.1.1.ebuild 
b/sys-auth/pam_u2f/pam_u2f-1.1.1.ebuild
index 5d50caedc75..a8dd23c88d4 100644
--- a/sys-auth/pam_u2f/pam_u2f-1.1.1.ebuild
+++ b/sys-auth/pam_u2f/pam_u2f-1.1.1.ebuild
@@ -21,6 +21,8 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}"/${PN}-1.1.1-fix-Makefile.patch )
+
 src_prepare() {
        default
        eautoreconf
@@ -30,10 +32,3 @@ src_configure() {
        use debug || append-cppflags -UDEBUG_PAM -UPAM_DEBUG
        econf --with-pam-dir=$(getpam_mod_dir)
 }
-
-src_install() {
-       default
-
-       # plugin only
-       find "${ED}" -name '*.la' -delete || die
-}

Reply via email to