File nfsidmap.spec of Package nfsidmap

#
# spec file for package nfsidmap
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           nfsidmap
Version:        0.26
Release:        0
Summary:        NFSv4 ID Mapping Library
License:        BSD-3-Clause
Group:          Productivity/Networking/NFS
Url:            http://nfs.sourceforge.net

Source0:        https://fedorapeople.org/~steved/libnfsidmap/%{version}/libnfsidmap-%{version}.tar.bz2
Source1:        nfsv4.schema
Patch0:         fix-prototype.patch
Patch1:         libnfsidmap-export-symbols.patch
Patch2:         0001-libnfsidmap-add-options-to-aid-id-mapping-in-multi-d.patch
Patch3:         0002-nss_gss_princ_to_ids-and-nss_gss_princ_to_grouplist-.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  libtool
BuildRequires:  openldap2-devel
BuildRequires:  pkg-config
BuildRequires:  tcpd-devel

%description
In NFSv4, identities of users are conveyed by names rather than user ID
and group ID. Both the NFS server and client code in the kernel need to
translate these to numeric IDs.

%package devel
Summary:        NFSv4 ID Mapping Library development libraries
Group:          Development/Libraries/C and C++
Requires:       nfsidmap = %version

%description devel
In NFSv4, identities of users are conveyed by names rather than user ID
and group ID. Both the NFS server and client code in the kernel need to
translate these to numeric IDs.

%prep
%setup -q -n libnfsidmap-%version
%patch0 -p0
%patch1
%patch2 -p1
%patch3 -p1
cp %{S:1} .

%build
autoreconf -fiv
export CFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED -DENABLE_LDAP"
%configure --disable-static --with-pic --with-pluginpath=%_libdir/libnfsidmap
%{__make} %{?_smp_mflags}

%check
make check

%install
make DESTDIR=$RPM_BUILD_ROOT install
%{__rm} -f %{buildroot}%{_libdir}/*.la
%{__rm} -f %{buildroot}%{_libdir}/libnfsidmap/*.la

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc README nfsv4.schema
%{_libdir}/libnfsidmap/
%{_libdir}/libnfsidmap.so.0*
%{_mandir}/man?/*

%files devel
%defattr(-,root,root)
%{_libdir}/libnfsidmap.so
%{_includedir}/*.h
%{_libdir}/pkgconfig/libnfsidmap.pc

%changelog
openSUSE Build Service is sponsored by