summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libnss-pgsql/ChangeLog10
-rw-r--r--sys-libs/libnss-pgsql/Manifest5
-rw-r--r--sys-libs/libnss-pgsql/files/digest-libnss-pgsql-1.0.01
-rw-r--r--sys-libs/libnss-pgsql/files/postgres-and-glibc.patch35
-rw-r--r--sys-libs/libnss-pgsql/libnss-pgsql-1.0.0.ebuild45
-rw-r--r--sys-libs/libnss-pgsql/metadata.xml5
6 files changed, 101 insertions, 0 deletions
diff --git a/sys-libs/libnss-pgsql/ChangeLog b/sys-libs/libnss-pgsql/ChangeLog
new file mode 100644
index 000000000000..0b6b24af7d3e
--- /dev/null
+++ b/sys-libs/libnss-pgsql/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sys-libs/libnss-pgsql
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libnss-pgsql/ChangeLog,v 1.1 2005/01/12 10:26:13 nakano Exp $
+
+*libnss-pgsql-1.0.0 (12 Jan 2005)
+
+ 12 Jan 2005; Masatomo Nakano <nakano@gentoo.org> +metadata.xml,
+ +files/postgres-and-glibc.patch, +libnss-pgsql-1.0.0.ebuild:
+ Initil import. (#34627)
+
diff --git a/sys-libs/libnss-pgsql/Manifest b/sys-libs/libnss-pgsql/Manifest
new file mode 100644
index 000000000000..0a236cbc465f
--- /dev/null
+++ b/sys-libs/libnss-pgsql/Manifest
@@ -0,0 +1,5 @@
+MD5 42f23c2adc59ef134212a10979e7e96f libnss-pgsql-1.0.0.ebuild 1380
+MD5 1d98858649f4f617a8989fd2c5dd8726 ChangeLog 406
+MD5 f8d3d207746da2a3cd14dcaab8daab76 metadata.xml 163
+MD5 f4cf9036a52e45d2a0aa66c50a691d9f files/postgres-and-glibc.patch 1289
+MD5 9d469fca29b34e6f7bcf3b41674f3c42 files/digest-libnss-pgsql-1.0.0 70
diff --git a/sys-libs/libnss-pgsql/files/digest-libnss-pgsql-1.0.0 b/sys-libs/libnss-pgsql/files/digest-libnss-pgsql-1.0.0
new file mode 100644
index 000000000000..e86a40e1c38c
--- /dev/null
+++ b/sys-libs/libnss-pgsql/files/digest-libnss-pgsql-1.0.0
@@ -0,0 +1 @@
+MD5 73b29c27ad0784baea985f0cf77eec48 libnss-pgsql-1.0.0.tar.gz 176959
diff --git a/sys-libs/libnss-pgsql/files/postgres-and-glibc.patch b/sys-libs/libnss-pgsql/files/postgres-and-glibc.patch
new file mode 100644
index 000000000000..8e96fb00b71d
--- /dev/null
+++ b/sys-libs/libnss-pgsql/files/postgres-and-glibc.patch
@@ -0,0 +1,35 @@
+diff -Nur libnss-pgsql-1.0.0.orig/conf/dbschema.sql libnss-pgsql-1.0.0/conf/dbschema.sql
+--- libnss-pgsql-1.0.0.orig/conf/dbschema.sql 2001-10-22 18:06:32.000000000 +0200
++++ libnss-pgsql-1.0.0/conf/dbschema.sql 2003-11-27 17:20:34.000000000 +0100
+@@ -7,7 +7,7 @@
+ );
+
+ CREATE TABLE "accounts" (
+- "uid" serial NOT NULL,
++ "uid" serial UNIQUE NOT NULL,
+ "login" character varying(8) NOT NULL,
+ "passwd" character varying(30) NOT NULL,
+ "shell" character varying DEFAULT '/bin/bash' NOT NULL,
+diff -Nur libnss-pgsql-1.0.0.orig/src/backend.c libnss-pgsql-1.0.0/src/backend.c
+--- libnss-pgsql-1.0.0.orig/src/backend.c 2001-10-18 13:32:52.000000000 +0200
++++ libnss-pgsql-1.0.0/src/backend.c 2003-11-28 16:14:38.000000000 +0100
+@@ -9,7 +9,7 @@
+ */
+
+ #include "nss-pgsql.h"
+-#include <postgresql/libpq-fe.h>
++#include <libpq-fe.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
+diff -Nur libnss-pgsql-1.0.0.orig/src/interface.c libnss-pgsql-1.0.0/src/interface.c
+--- libnss-pgsql-1.0.0.orig/src/interface.c 2001-10-18 13:32:53.000000000 +0200
++++ libnss-pgsql-1.0.0/src/interface.c 2003-11-27 15:47:52.000000000 +0100
+@@ -12,6 +12,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #define _LIBC
++#define NOT_IN_libc
+ #include <bits/libc-lock.h>
+
+ static __libc_lock_t lock;
diff --git a/sys-libs/libnss-pgsql/libnss-pgsql-1.0.0.ebuild b/sys-libs/libnss-pgsql/libnss-pgsql-1.0.0.ebuild
new file mode 100644
index 000000000000..575fc0e71993
--- /dev/null
+++ b/sys-libs/libnss-pgsql/libnss-pgsql-1.0.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libnss-pgsql/libnss-pgsql-1.0.0.ebuild,v 1.1 2005/01/12 10:26:13 nakano Exp $
+
+inherit eutils
+
+DESCRIPTION="Name Service Switch module for use with PostgreSQL"
+HOMEPAGE="http://sourceforge.net/projects/sysauth-pgsql"
+SRC_URI="mirror://sourceforge/sysauth-pgsql/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+DEPEND="virtual/libc
+ >=dev-db/postgresql-7.4-r1"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/postgres-and-glibc.patch
+}
+
+src_compile() {
+ econf --libdir=/lib || die "econf failure"
+ emake || die "emake failure"
+}
+
+src_install() {
+ make DESTDIR=${D} install || die "make install failure"
+ dodoc AUTHORS ChangeLog INSTALL NEWS README
+ insinto etc && doins conf/nss-pgsql.conf
+ docinto conf && dodoc conf/{dbschema.sql,nsswitch.conf}
+ docinto doc && dodoc doc/{nss-pgsql.{ps,sgml,txt}}
+}
+
+pkg_postinst() {
+ einfo "Now create the required SQL tables in a database, eg.:"
+ einfo " $ zcat /usr/share/doc/${P}/conf/dbschema.sql.gz | psql dbtest"
+ einfo "Then edit the config file to match your need:"
+ einfo " /etc/nss-pgsql.conf"
+ einfo "Now edit /etc/nsswitch.conf to use the NSS service 'pgsql', an"
+ einfo "example is available here:"
+ einfo " /usr/share/doc/${P}/conf/nsswitch.conf.gz"
+}
diff --git a/sys-libs/libnss-pgsql/metadata.xml b/sys-libs/libnss-pgsql/metadata.xml
new file mode 100644
index 000000000000..309b51e9a965
--- /dev/null
+++ b/sys-libs/libnss-pgsql/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>postgresql</herd>
+</pkgmetadata>