%define name libnss-pgsql %define version 1.4.0 %define release %mkrel 7 Summary: NSS library for postgresql Name: %{name} Version: %{version} Release: %{release} Source0: http://ovh.dl.sourceforge.net/sourceforge/sysauth-pgsql/%{name}-%{version}.tar.bz2 Patch0: libnss-pgsql.includedir.patch Patch1: libnss-pgsql.readconfigsilentfailed.patch Patch2: libnss-pgsql-1.4.0-automake-1.13.patch License: GPL Group: System/Libraries Url: http://sourceforge.net/projects/sysauth-pgsql BuildRequires: libpq-devel BuildRequires: postgresql-devel BuildRequires: xmlto BuildRequires: automake BuildRequires: docbook-style-xsl %description This library provide the capability to have all classical users definitions in a PostgreSQL server instead than in the old plain text files in /etc passwd,group,shadow. All is done without any trick or something like, simply connecting to the nss (name servica switch) facility offered by the libc (2.x) as nis and nisplus already did. All without recompiling or touching any application configurations. Just compile and install nss_postgresql library and set up a PostgreSQL server. %if %{_lib} != lib %package -n %{_lib}nss-pgsql Summary: NSS library for postgresql Group: System/Libraries %description -n %{_lib}nss-pgsql This library provide the capability to have all classical users definitions in a PostgreSQL server instead than in the old plain text files in /etc passwd,group,shadow. All is done without any trick or something like, simply connecting to the nss (name servica switch) facility offered by the libc (2.x) as nis and nisplus already did. All without recompiling or touching any application configurations. Just compile and install nss_postgresql library and set up a PostgreSQL server. %endif %prep %setup -q %patch0 -p0 -b .pgsqlinclude %patch1 -p0 -b .readconfigsilentfailed %patch2 -p1 %build autoreconf --force --install %configure %make CFLAGS="%optflags -fPIC" %install rm -rf %{buildroot} mkdir -p %{buildroot}/{%{_libdir},%{_sysconfdir}} %makeinstall_std install -m644 conf/nss-pgsql.conf %{buildroot}/%{_sysconfdir}/nss-pgsql.conf install -m600 conf/nss-pgsql-root.conf %{buildroot}/%{_sysconfdir}/nss-pgsql-root.conf rm -fr %{buildroot}/%{_prefix}/doc %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean rm -rf %{buildroot} %if %{_lib} != lib %files -n %{_lib}nss-pgsql %else %files %endif %doc conf/dbschema.sql README* TODO AUTHORS %doc doc/caution.png doc/nss-pgsql.html %{_libdir}/libnss_pgsql.* %config(noreplace) %{_sysconfdir}/*.conf %changelog * Sun Jan 13 2013 luigiwalser <luigiwalser> 1.4.0-7.mga3 + Revision: 362027 - fix for automake 1.13 - fix for UsrMove + umeabot <umeabot> - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Aug 13 2012 nanardon <nanardon> 1.4.0-5.mga3 + Revision: 281195 - imported package libnss-pgsql * Fri Aug 03 2007 Olivier Thauvin <nanardon@mandriva.org> 1.4.0-5mdv2008.0 + Revision: 58652 - libidification - Import libnss-pgsql * Tue Mar 14 2006 Nicolas Lécureuil <neoclust@mandriva.org> 1.4.0-4mdk - Add BuildRequires * Sat Feb 04 2006 Olivier Thauvin <nanardon@mandriva.org> 1.4.0-3mdk - add post/postun * Sat Feb 04 2006 Olivier Thauvin <nanardon@mandriva.org> 1.4.0-2mdk - patch1: if can't read root config file, don't complain about bad connection * Sat Feb 04 2006 Olivier Thauvin <nanardon@mandriva.org> 1.4.0-1mdk - Initial mdv package