Skip to content

Commit

Permalink
app-misc/physlock: Use upstream PAM config
Browse files Browse the repository at this point in the history
Following the recommendation at
xyb3rt/physlock@66957ee
Also more closely follow the configuration format the build system
expects.

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Closes: https://bugs.gentoo.org/731824
Signed-off-by: Jason Pizzuco <[email protected]>
Closes: gentoo#16649
Signed-off-by: Joonas Niilola <[email protected]>
  • Loading branch information
toshokan authored and juippis committed Jul 11, 2020
1 parent a487d1a commit 6d4cf4d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions app-misc/physlock/physlock-13-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit toolchain-funcs pam

DESCRIPTION="Lightweight Linux console locking tool"
HOMEPAGE="https://github.com/muennich/physlock"
SRC_URI="https://github.com/muennich/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"

IUSE="elogind systemd"
REQUIRED_USE="?? ( elogind systemd )"

RDEPEND="sys-libs/pam"
DEPEND="${RDEPEND}
elogind? ( sys-auth/elogind )
systemd? ( sys-apps/systemd )
"

pkg_setup() {
export MY_CONF="HAVE_SYSTEMD=$(usex systemd 1 0) HAVE_ELOGIND=$(usex elogind 1 0)"
}

src_prepare() {
default
tc-export CC
}

src_compile() {
emake ${MY_CONF}
}

src_install() {
emake ${MY_CONF} DESTDIR="${D}" PREFIX=/usr install
newpamd physlock.pam ${PN}
}

0 comments on commit 6d4cf4d

Please sign in to comment.