File nfsidmap.spec of Package nfsidmap

#
# spec file for package nfsidmap (Version 0.23)
#
# Copyright (c) 2010 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
BuildRequires:  openldap2-devel tcpd-devel
Url:            http://nfs.sourceforge.net
Summary:        NFSv4 ID Mapping Library
Version:        0.23
Release:        10
Group:          Productivity/Networking/NFS
License:        BSD3c
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %fillup_prereq %insserv_prereq
AutoReqProv:    on
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/libnfsidmap-%{version}.tar.bz2
Source1:        nfsv4.schema
Patch0:         fix-prototype.patch
Patch1:         libnfsidmap-export-symbols.patch

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

%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.



Authors:
--------
    J. Bruce Fields <bfields@citi.umich.edu>

%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.



Authors:
--------
    J. Bruce Fields <bfields@citi.umich.edu>

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

%build
mkdir m4
autoreconf -fiv
export CFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED"
%configure --disable-static --with-pic
%{__make} %{?_smp_mflags}

%install
make DESTDIR=$RPM_BUILD_ROOT install
%{__rm} -f %{buildroot}%{_libdir}/*.la
%{__rm} -f %{buildroot}%{_libdir}/libnfsidmap/*.la
# why is it included, we are not building the binary?
rm %{buildroot}/usr/share/man/man5/idmapd.conf.5*

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(444,root,root,755)
%doc README nfsv4.schema
%dir %{_libdir}/libnfsidmap/
%attr(555,root,root) %{_libdir}/libnfsidmap/*.so*
%attr(555,root,root) %{_libdir}/libnfsidmap.so.*
%attr(444,root,root) %{_mandir}/man?/*

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

%changelog