8f2b80
Summary: LDAP Perl module that wraps the OpenLDAP C SDK
8f2b80
Name: perl-Mozilla-LDAP
8f2b80
Version: 1.5.3
842dcd
Release: 12%{?dist}
8f2b80
License: GPLv2+ and LGPLv2+ and MPLv1.1
8f2b80
Group: Development/Libraries
8f2b80
URL: http://www.mozilla.org/directory/perldap.html
8f2b80
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
8f2b80
Requires: perl >= 2:5.8.0
8f2b80
BuildRequires: perl >= 2:5.8.0
8f2b80
BuildRequires: perl(ExtUtils::MakeMaker)
8f2b80
BuildRequires: nspr-devel
8f2b80
BuildRequires: nss-devel
8f2b80
BuildRequires: openldap-devel >= 2.4.22
8f2b80
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/directory/perldap/releases/%{version}/src/perl-mozldap-%{version}.tar.gz
8f2b80
Source1: ftp://ftp.mozilla.org/pub/mozilla.org/directory/perldap/releases/1.5/src/Makefile.PL.rpm
8f2b80
8f2b80
%description
8f2b80
%{summary}.
8f2b80
8f2b80
%prep
8f2b80
%setup -q -n perl-mozldap-%{version}
8f2b80
# Filter unwanted Provides:
8f2b80
cat << \EOF > %{name}-prov
8f2b80
#!/bin/sh
8f2b80
%{__perl_provides} $* |\
8f2b80
  sed -e '/perl(Mozilla::LDAP::Entry)$/d'
8f2b80
EOF
8f2b80
8f2b80
%define __perl_provides %{_builddir}/perl-mozldap-%{version}/%{name}-prov
8f2b80
chmod +x %{__perl_provides}
8f2b80
8f2b80
# Filter unwanted Requires:
8f2b80
cat << \EOF > %{name}-req
8f2b80
#!/bin/sh
8f2b80
%{__perl_requires} $* |\
8f2b80
  sed -e '/perl(Mozilla::LDAP::Entry)/d'
8f2b80
EOF
8f2b80
8f2b80
%define __perl_requires %{_builddir}/perl-mozldap-%{version}/%{name}-req
8f2b80
chmod +x %{__perl_requires}
8f2b80
8f2b80
%build
8f2b80
8f2b80
LDAPPKGNAME=openldap CFLAGS="$RPM_OPT_FLAGS" perl %{SOURCE1} PREFIX=$RPM_BUILD_ROOT%{_prefix} INSTALLDIRS=vendor < /dev/null
8f2b80
make OPTIMIZE="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" 
8f2b80
make test
8f2b80
8f2b80
%install
8f2b80
rm -rf $RPM_BUILD_ROOT
8f2b80
eval `perl '-V:installarchlib'`
8f2b80
8f2b80
%makeinstall
8f2b80
8f2b80
# remove files we don't want to package
8f2b80
rm -f `find $RPM_BUILD_ROOT -type f -name perllocal.pod -o -name .packlist`
8f2b80
find $RPM_BUILD_ROOT -name API.bs -a -size 0 -exec rm -f {} \;
8f2b80
8f2b80
# make sure shared lib is correct mode
8f2b80
find $RPM_BUILD_ROOT -name API.so -exec chmod 755 {} \;
8f2b80
8f2b80
8f2b80
# find and run the correct version of brp-compress
8f2b80
if [ -x /usr/lib/rpm/brp-compress ] ; then
8f2b80
    /usr/lib/rpm/brp-compress
8f2b80
elif [ -x %{_libdir}/rpm/brp-compress ] ; then
8f2b80
    %{_libdir}/rpm/brp-compress
8f2b80
fi
8f2b80
8f2b80
# make sure files refer to %{_prefix} instead of buildroot/%prefix
8f2b80
find $RPM_BUILD_ROOT%{_prefix} -type f -print | \
8f2b80
	sed "s@^$RPM_BUILD_ROOT@@g" > %{name}-%{version}-%{release}-filelist
8f2b80
if [ "$(cat %{name}-%{version}-%{release}-filelist)X" = "X" ] ; then
8f2b80
    echo "ERROR: EMPTY FILE LIST"
8f2b80
    exit 1
8f2b80
fi
8f2b80
8f2b80
%clean
8f2b80
rm -rf $RPM_BUILD_ROOT
8f2b80
8f2b80
%files -f %{name}-%{version}-%{release}-filelist
8f2b80
%defattr(-,root,root,-)
8f2b80
%doc CREDITS ChangeLog README MPL-1.1.txt
8f2b80
8f2b80
%changelog
842dcd
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.5.3-12
842dcd
- Mass rebuild 2014-01-24
842dcd
842dcd
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.5.3-11
842dcd
- Mass rebuild 2013-12-27
842dcd
8f2b80
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.3-10
8f2b80
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8f2b80
8f2b80
* Tue Nov 20 2012 Nathan Kinder <nkinder@redhat.com> - 1.5.3-9
8f2b80
- Corrected upstream source URLs
8f2b80
8f2b80
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.3-7
8f2b80
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8f2b80
8f2b80
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.3-6
8f2b80
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8f2b80
8f2b80
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.3-5
8f2b80
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8f2b80
8f2b80
* Tue Nov 23 2010 Rich Megginson <rmeggins@redhat.com> - 1.5.3-4
8f2b80
- forgot to add -DUSE_SSL -DPRLDAP
8f2b80
8f2b80
* Wed Sep 29 2010 jkeating - 1.5.3-3
8f2b80
- Rebuilt for gcc bug 634757
8f2b80
8f2b80
* Tue Sep 14 2010 Rich Megginson <rmeggins@redhat.com> - 1.5.3-2
8f2b80
- added new sources
8f2b80
8f2b80
* Tue Sep 14 2010 Rich Megginson <rmeggins@redhat.com> - 1.5.3-1
8f2b80
- new version 1.5.3 with openldap support
8f2b80
8f2b80
* Tue May 04 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.5.2-7.1
8f2b80
- Mass rebuild with perl-5.12.0
8f2b80
8f2b80
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-6.1
8f2b80
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
8f2b80
8f2b80
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-5.1
8f2b80
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
8f2b80
8f2b80
* Tue Mar 11 2008 Rich Megginson <rmeggins@redhat.com> - 1.5.2-4.1
8f2b80
- rebuild for perl 5.10
8f2b80
8f2b80
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.5.2-3.1
8f2b80
- Autorebuild for GCC 4.3
8f2b80
8f2b80
* Tue Oct 16 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 1.5.2-2.1
8f2b80
- correct license tag
8f2b80
- add BR: perl(ExtUtils::MakeMaker)
8f2b80
8f2b80
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 1.5.2-2
8f2b80
- Rebuild for selinux ppc32 issue.
8f2b80
8f2b80
* Fri Jul 27 2007 Rich Megginson <richm@stanfordalumni.org> - 1.5.2-1
8f2b80
- Fix bugzilla 389731 - crash when a bad URL is passed
8f2b80
8f2b80
* Wed Jun 20 2007 Rich Megginson <richm@stanfordalumni.org> - 1.5.1-1
8f2b80
- all files have been GPL/LGPL/MPL tri-licensed
8f2b80
8f2b80
* Wed Jan 10 2007 Rich Megginson <richm@stanfordalumni.org> - 1.5-9
8f2b80
- remove only perl(Mozilla::LDAP::Entry) from Provides, leave in 
8f2b80
- perl(Mozilla::LDAP::Entry) = 1.5
8f2b80
8f2b80
* Wed Jan 10 2007 Rich Megginson <richm@stanfordalumni.org> - 1.5-8
8f2b80
- add perl_requires filter for the Entry module
8f2b80
- add the MPL-1.1.txt file to the DOCs
8f2b80
8f2b80
* Wed Jan 10 2007 Rich Megginson <richm@stanfordalumni.org> - 1.5-7
8f2b80
- Incorporate comments from Fedora Extras review - https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219869
8f2b80
- Remove all Requires except perl - use autogenerated ones
8f2b80
- Remove ExclusiveArch
8f2b80
- Remove files that don't need to be packaged
8f2b80
- add full URL to sources
8f2b80
- set API.so to mode 755
8f2b80
8f2b80
* Tue Oct 17 2006 Rich Megginson <richm@stanfordalumni.org> - 1.5-6
8f2b80
- look for brp-compress first in /usr/lib then _libdir
8f2b80
8f2b80
* Tue Oct 17 2006 Rich Megginson <richm@stanfordalumni.org> - 1.5-5
8f2b80
- there is no TODO file; use custom Makefile.PL
8f2b80
8f2b80
* Mon Oct 16 2006 Rich Megginson <richm@stanfordalumni.org> - 1.5-4
8f2b80
- use pkg-config --variable=xxx instead of --cflags e.g.
8f2b80
8f2b80
* Mon Oct 16 2006 Rich Megginson <richm@stanfordalumni.org> - 1.5-3
8f2b80
- this is not a noarch package
8f2b80
8f2b80
* Mon Oct 16 2006 Rich Megginson <richm@stanfordalumni.org> - 1.5-2
8f2b80
- Use new mozldap6, dirsec versions of nspr, nss
8f2b80
8f2b80
* Tue Feb  7 2006 Rich Megginson <richm@stanfordalumni.org> - 1.5-1
8f2b80
- Based on the perl-LDAP.spec file
8f2b80