blob: 00300cdb9c3e1cf3ece8639f21794b3890832fb1 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
inherit autotools eutils multilib
KEYWORDS="~x86"
DESCRIPTION="Name Service Switch module for use with PostgreSQL"
HOMEPAGE="http://pgfoundry.org/projects/sysauth/"
SRC_URI="http://pgfoundry.org/frs/download.php/605/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
DEPEND="dev-db/postgresql
app-text/xmlto"
RDEPEND="${DEPEND}"
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}/${P}-gentoo.patch"
epatch "${FILESDIR}/${P}-schema.patch"
eautoreconf
}
src_compile() {
econf \
--libdir=/lib \
--with-docdir=/usr/share/doc/${PF}/html || die "econf failed"
emake || die "emake failed"
}
src_install() {
insinto /$(get_libdir)
doins src/.libs/libnss_pgsql.so.2.0.0
dosym libnss_pgsql.so.2.0.0 /lib/libnss_pgsql.so.2
dosym libnss_pgsql.so.2.0.0 /lib/libnss_pgsql.so
dodoc AUTHORS ChangeLog NEWS README
dohtml doc/*.{png,html}
insinto /usr/share/doc/${PF}/examples
doins conf/*
}
pkg_postinst() {
elog "Next steps:"
elog "1. Create the required tables in the database:"
elog " $ psql a_database -f ${ROOT}usr/share/${PN}/conf/dbschema.sql"
elog "2. Create the configuration file '/etc/nss-pgsql.conf'"
elog " You can copy the example from ${ROOT}usr/share/doc/${PF}/examples/nss-pgsql.conf"
elog "3. Edit /etc/nsswitch.conf to use the NSS service 'pgsql'"
elog " An example is available here: ${ROOT}usr/share/doc/${PF}/examples/nsswitch.conf"
}
|