summaryrefslogtreecommitdiff
blob: 26e562d421f8ed9240f686f5c46f7cc73a9e6b06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

inherit eutils pam

DESCRIPTION="A module for pam to authenticate users with PostgreSQL"
HOMEPAGE="http://pgfoundry.org/frs/?group_id=1000039"
SRC_URI="mirror://postgresql/projects/pgFoundry/sysauth/${PN/_/-}-${PV}.tgz"

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

DEPEND=">=sys-libs/pam-0.78-r3
	>=app-crypt/mhash-0.9.1
	dev-db/postgresql"
RDEPEND="${DEPEND}"

S=${WORKDIR}/${PN/_/-}

src_prepare() {
	epatch "${FILESDIR}"/${PV}-gcc46.patch
}

src_install() {
	insinto /etc
	newins "${FILESDIR}/pam_pgsql.conf" pam_pgsql.conf || die "newins failed"
	dopammod pam_pgsql.so
	dodoc debian/changelog CREDITS README || die "dodoc failed"
}

pkg_postinst() {
	einfo "From version 0.6 you can also use new style configuration (overrides"
	einfo "legacy values). See /usr/share/doc/${PF}/README for more info."
}