*/*: Specify EAPI=0 explicitly, to ease greps
[gentoo.git] / sys-auth / libnss-pgsql / libnss-pgsql-1.5.0_beta.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=0
5
6 inherit autotools eutils multilib
7
8 KEYWORDS="~amd64 ~x86"
9
10 DESCRIPTION="Name Service Switch module for use with PostgreSQL"
11 HOMEPAGE="http://pgfoundry.org/projects/sysauth/"
12
13 MY_P="${P/_/-}"
14 SRC_URI="http://pgfoundry.org/frs/download.php/1878/${MY_P}.tgz"
15 S="${WORKDIR}/${MY_P}"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 IUSE=""
20
21 RDEPEND="dev-db/postgresql"
22 DEPEND="${RDEPEND}
23                 app-text/xmlto"
24
25 src_unpack() {
26         unpack ${A}
27         cd "${S}"
28         epatch "${FILESDIR}/${P}-gentoo.patch"
29         eautoreconf
30 }
31
32 src_compile() {
33         econf \
34                 --htmldir=/usr/share/doc/${PF}/html || die "econf failed"
35         emake || die "emake failed"
36 }
37
38 src_install() {
39         emake DESTDIR="${D}" install || die
40         find "${D}" -name '*.la' -delete || die
41
42         dodoc AUTHORS ChangeLog NEWS README || die
43         insinto /usr/share/doc/${PF}/examples
44         doins conf/* || die
45 }
46
47 pkg_postinst() {
48         elog "Next steps:"
49         elog "1. Create the required tables in the database:"
50         elog "   $ psql a_database -f /usr/share/doc/${PF}/examples/dbschema.sql"
51         elog "2. Create the configuration file '/etc/nss-pgsql.conf'"
52         elog "   You can copy the example from /usr/share/doc/${PF}/examples/nss-pgsql.conf"
53         elog "3. Edit /etc/nsswitch.conf to use the NSS service 'pgsql'"
54         elog "   An example is available here: /usr/share/doc/${PF}/examples/nsswitch.conf"
55 }