summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-30 19:38:19 +0100
committerSam James <sam@gentoo.org>2021-06-30 19:38:19 +0100
commitcef6715d153a01312d8dc77aeeb52a37f1bf466a (patch)
tree208064bfa69883c55a0fa13a51930ccb1b1e4ead /www-apache/pwauth/pwauth-2.3.10-r1.ebuild
parentwww-servers/thttpd: add missing libcrypt dependency (diff)
downloadgentoo-cef6715d153a01312d8dc77aeeb52a37f1bf466a.tar.gz
gentoo-cef6715d153a01312d8dc77aeeb52a37f1bf466a.tar.bz2
gentoo-cef6715d153a01312d8dc77aeeb52a37f1bf466a.zip
www-apache/pwauth: add missing libcrypt dependency
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'www-apache/pwauth/pwauth-2.3.10-r1.ebuild')
-rw-r--r--www-apache/pwauth/pwauth-2.3.10-r1.ebuild73
1 files changed, 73 insertions, 0 deletions
diff --git a/www-apache/pwauth/pwauth-2.3.10-r1.ebuild b/www-apache/pwauth/pwauth-2.3.10-r1.ebuild
new file mode 100644
index 000000000000..99e0dfdf3fe0
--- /dev/null
+++ b/www-apache/pwauth/pwauth-2.3.10-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic pam toolchain-funcs
+
+DESCRIPTION="A Unix Web Authenticator"
+HOMEPAGE="https://github.com/phokz/pwauth/tree/master/pwauth"
+SRC_URI="https://pwauth.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="Apache-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="faillog pam ignore-case domain-aware"
+
+DEPEND="pam? ( sys-libs/pam )
+ !pam? ( virtual/libcrypt:= )"
+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}"
+
+ append-cppflags "-DSERVER_UIDS=${PWAUTH_SERVERUIDS}"
+ append-cppflags "-DMIN_UNIX_UID=${PWAUTH_MINUID}"
+
+ if use faillog; then
+ append-cppflags -DFAILLOG_PWAUTH
+ append-cppflags "-DPATH_FAILLOG=\"\\\"${PWAUTH_FAILLOG}\\\"\""
+ fi
+
+ if use pam; then
+ append-cppflags -DPAM
+ append-libs pam
+ else
+ append-cppflags -DSHADOW_SUN
+ append-libs crypt
+ fi
+
+ use ignore-case && append-cppflags -DIGNORE_CASE
+ use domain-aware && append-cppflags -DOMAIN_AWARE
+}
+
+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
+}