Added patch to fix the db schema, ebuild rewritten, removed old version, bug #138034
authorTiziano Müller <dev-zero@gentoo.org>
Sat, 11 Nov 2006 21:24:39 +0000 (21:24 +0000)
committerTiziano Müller <dev-zero@gentoo.org>
Sat, 11 Nov 2006 21:24:39 +0000 (21:24 +0000)
Package-Manager: portage-2.1.2_rc1-r5

sys-auth/libnss-pgsql/ChangeLog
sys-auth/libnss-pgsql/files/digest-libnss-pgsql-1.4.0
sys-auth/libnss-pgsql/files/libnss-pgsql-1.4.0-schema.patch [new file with mode: 0644]
sys-auth/libnss-pgsql/libnss-pgsql-1.4.0.ebuild

index 5935fa0ca608598aed76a9485e99488d4862c577..ec913ce4d2c3043a1576f2440f2e883c182c2986 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for sys-auth/libnss-pgsql
 # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/libnss-pgsql/ChangeLog,v 1.2 2006/03/20 05:59:21 nakano Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/libnss-pgsql/ChangeLog,v 1.3 2006/11/11 21:24:39 dev-zero Exp $
+
+  11 Nov 2006; Tiziano Müller <dev-zero@gentoo.org>
+  -files/libnss-pgsql-1.3-gentoo.patch,
+  +files/libnss-pgsql-1.4.0-schema.patch, -files/postgres-and-glibc.patch,
+  -libnss-pgsql-1.0.0.ebuild, -libnss-pgsql-1.3.ebuild,
+  libnss-pgsql-1.4.0.ebuild:
+  Added patch to fix the db schema, ebuild rewritten, removed old version, bug
+  #138034
 
 *libnss-pgsql-1.4.0 (20 Mar 2006)
 
index cd62ef72bdf76c5546a1fc7ec34d2923b7219b6b..960ec187e54c919adfc2c8c63009cfbfcd212f47 100644 (file)
@@ -1 +1,3 @@
 MD5 a0507f407a9efb564562969af1130d25 libnss-pgsql-1.4.0.tgz 244076
+RMD160 88fccc1e58776916e1b258c79466b1d13cfb2bb0 libnss-pgsql-1.4.0.tgz 244076
+SHA256 776efc43b21323380f9b1cf32b4463eddd7050d19912418ea58b856b96c9ee25 libnss-pgsql-1.4.0.tgz 244076
diff --git a/sys-auth/libnss-pgsql/files/libnss-pgsql-1.4.0-schema.patch b/sys-auth/libnss-pgsql/files/libnss-pgsql-1.4.0-schema.patch
new file mode 100644 (file)
index 0000000..6d2b338
--- /dev/null
@@ -0,0 +1,22 @@
+--- conf/dbschema.sql.orig     2005-05-04 04:27:51.000000000 +0200
++++ conf/dbschema.sql  2006-11-11 22:37:01.000000000 +0100
+@@ -19,15 +19,16 @@
+       "gecos" character varying(128),
+       "homedir" character varying(256) NOT NULL,
+       "shell" character varying DEFAULT '/bin/bash' NOT NULL,
+-      PRIMARY KEY ("username")
++      PRIMARY KEY ("username"),
++      UNIQUE ("uid")
+ );
+ CREATE TABLE "usergroups" (
+       "gid" int4 NOT NULL,
+       "uid" int4 NOT NULL,
+       PRIMARY KEY ("gid", "uid"),
+-      CONSTRAINT "ug_gid_fkey" FOREIGN KEY ("gid") REFERENCES "groups"("gid"),
+-      CONSTRAINT "ug_uid_fkey" FOREIGN KEY ("uid") REFERENCES "accounts"("uid")
++      CONSTRAINT "ug_gid_fkey" FOREIGN KEY ("gid") REFERENCES "group_table"("gid"),
++      CONSTRAINT "ug_uid_fkey" FOREIGN KEY ("uid") REFERENCES "passwd_table"("uid")
+ );
+   
+ CREATE TABLE "shadow_table" (
index 9f8dd3b5839fdb9a765edd57cce4bf911a5ad406..4d981f1873ce10403c845733d0cd8e3b24f84b35 100644 (file)
@@ -1,47 +1,55 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/libnss-pgsql/libnss-pgsql-1.4.0.ebuild,v 1.1 2006/03/20 05:59:21 nakano Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/libnss-pgsql/libnss-pgsql-1.4.0.ebuild,v 1.2 2006/11/11 21:24:39 dev-zero Exp $
 
-inherit eutils
+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"
-KEYWORDS="~x86"
 IUSE=""
-DEPEND="virtual/libc
-       dev-db/libpq
-       app-text/xmlto"
+
+DEPEND="dev-db/libpq
+               app-text/xmlto"
+RDEPEND="${DEPEND}"
 
 src_unpack() {
        unpack ${A}
-       cd ${S}
-       epatch ${FILESDIR}/${P}-gentoo.patch
+       cd "${S}"
+       epatch "${FILESDIR}/${P}-gentoo.patch"
+       epatch "${FILESDIR}/${P}-schema.patch"
+       eautoreconf
 }
 
 src_compile() {
-       econf --libdir=/lib || die "econf failure"
-       libtoolize --copy --force || die "libtoolize failure"
-       emake || die "emake failure"
+       econf \
+               --libdir=/lib \
+               --with-docdir=/usr/share/doc/${PF}/html || die "econf failed"
+       emake || die "emake failed"
 }
 
 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}}
+       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() {
-       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"
+       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"
 }