You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.9 KiB
74 lines
1.9 KiB
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
12 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
4 years ago
|
EAPI=7
|
||
12 years ago
|
|
||
4 years ago
|
inherit flag-o-matic pam toolchain-funcs
|
||
12 years ago
|
|
||
|
DESCRIPTION="A Unix Web Authenticator"
|
||
9 years ago
|
HOMEPAGE="https://github.com/phokz/pwauth/tree/master/pwauth"
|
||
9 years ago
|
SRC_URI="https://pwauth.googlecode.com/files/${P}.tar.gz"
|
||
12 years ago
|
|
||
|
LICENSE="Apache-1.1"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~ppc ~x86"
|
||
|
IUSE="faillog pam ignore-case domain-aware"
|
||
|
|
||
3 years ago
|
DEPEND="pam? ( sys-libs/pam )
|
||
|
!pam? ( virtual/libcrypt:= )"
|
||
12 years ago
|
RDEPEND="${DEPEND}"
|
||
|
|
||
|
PATCHES=(
|
||
|
"${FILESDIR}/${P}-config.patch"
|
||
|
"${FILESDIR}/${P}-makefile.patch"
|
||
|
"${FILESDIR}/${PN}-strchr.patch"
|
||
|
)
|
||
|
|
||
|
pkg_setup() {
|
||
|
einfo "You can configure various build time options with ENV variables:"
|
||
|
einfo
|
||
|
einfo " PWAUTH_FAILLOG Path to logfile for login failures"
|
||
|
einfo " (default: /var/log/pwauth.log)"
|
||
|
einfo " PWAUTH_SERVERUIDS Comma seperated list of UIDs allowed to run pwauth"
|
||
|
einfo " (default: 81)"
|
||
|
einfo " PWAUTH_MINUID Minimum UID for which authentication will succeed"
|
||
|
einfo " (default: 1000)"
|
||
|
einfo
|
||
|
|
||
|
PWAUTH_FAILLOG="${PWAUTH_FAILLOG:-/var/log/pwauth.log}"
|
||
|
PWAUTH_SERVERUIDS="${PWAUTH_SERVERUIDS:-81}"
|
||
|
PWAUTH_MINUID="${PWAUTH_MINUID:-1000}"
|
||
|
|
||
3 years ago
|
append-cppflags "-DSERVER_UIDS=${PWAUTH_SERVERUIDS}"
|
||
|
append-cppflags "-DMIN_UNIX_UID=${PWAUTH_MINUID}"
|
||
12 years ago
|
|
||
|
if use faillog; then
|
||
3 years ago
|
append-cppflags -DFAILLOG_PWAUTH
|
||
|
append-cppflags "-DPATH_FAILLOG=\"\\\"${PWAUTH_FAILLOG}\\\"\""
|
||
12 years ago
|
fi
|
||
|
|
||
|
if use pam; then
|
||
3 years ago
|
append-cppflags -DPAM
|
||
12 years ago
|
append-libs pam
|
||
|
else
|
||
3 years ago
|
append-cppflags -DSHADOW_SUN
|
||
12 years ago
|
append-libs crypt
|
||
|
fi
|
||
|
|
||
3 years ago
|
use ignore-case && append-cppflags -DIGNORE_CASE
|
||
|
use domain-aware && append-cppflags -DOMAIN_AWARE
|
||
12 years ago
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
dosbin pwauth unixgroup
|
||
|
fperms 4755 /usr/sbin/pwauth
|
||
|
|
||
|
use pam && newpamd "${FILESDIR}"/pwauth.pam-include pwauth
|
||
|
|
||
|
dodoc CHANGES FORM_AUTH INSTALL README
|
||
|
}
|