[perl-Mozilla-LDAP/f14/master] perldap 1.5.3 - add openldap support
Richard Allen Megginson
rmeggins at fedoraproject.org
Tue Sep 14 23:30:14 UTC 2010
commit e796ba06034b3c2e368a29eedbea3298f0ebc026
Author: Rich Megginson <rmeggins at redhat.com>
Date: Tue Sep 14 10:32:18 2010 -0700
perldap 1.5.3 - add openldap support
perldap 1.5.3 - add openldap support
Moved Makefile.PL.rpm into SCM rather than external source
cleaned up spec file a bit
.gitignore | 5 +--
Makefile.PL.rpm | 97 ++++++++++++++++++++++++++++++++++++++++++++++++
perl-Mozilla-LDAP.spec | 23 +++++------
sources | 5 +--
4 files changed, 110 insertions(+), 20 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c8b8e49..4b48282 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1 @@
-Makefile.PL.rpm
-perl-mozldap-1.5.tar.gz
-perl-mozldap-1.5.1.tar.gz
-perl-mozldap-1.5.2.tar.gz
+perl-mozldap-1.5.3.tar.gz
diff --git a/Makefile.PL.rpm b/Makefile.PL.rpm
new file mode 100644
index 0000000..afab05c
--- /dev/null
+++ b/Makefile.PL.rpm
@@ -0,0 +1,97 @@
+#############################################################################
+# $Id: Makefile.PL.rpm,v 1.1.2.1 2007/01/10 18:01:48 richm%stanfordalumni.org Exp $
+#
+# The contents of this file are subject to the Mozilla Public License
+# Version 1.1 (the "License"); you may not use this file except in
+# compliance with the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+# License for the specific language governing rights and limitations
+# under the License.
+#
+# The Original Code is PerLDAP. The Initial Developer of the Original
+# Code is Netscape Communications Corp. and Clayton Donley. Portions
+# created by Netscape are Copyright (C) Netscape Communications
+# Corp., portions created by Clayton Donley are Copyright (C) Clayton
+# Donley, portions created by Leif Hedstrom are Copyright (C) Leif
+# Hedstrom. All Rights Reserved.
+#
+# Contributor(s):
+# * Leif Hedstrom <leif at perldap.org>
+#
+# DESCRIPTION
+# The Makefile "source".
+# This has been heavily modified to simply use pkg-config
+# to get the components necessary to build.
+#
+#############################################################################
+
+require 5.005;
+
+use ExtUtils::MakeMaker;
+use ExtUtils::Liblist;
+use Config;
+use Carp;
+
+# name of package to use for pkg-config
+$ldappkgname = $ENV{"LDAPPKGNAME"} || "mozldap6";
+my ($DEFINES, $cflags, $libs);
+if (lc($ldappkgname) eq 'openldap') {
+ $cflags = `pkg-config --cflags nss`;
+ chomp($cflags);
+ $libs = `pkg-config --libs nss`;
+ chomp($libs);
+ $libs = "-lldap -llber $libs";
+ $DEFINES = "-DUSE_OPENLDAP";
+} else {
+ $cflags = `pkg-config --cflags $ldappkgname`;
+ chomp($cflags);
+ $libs = `pkg-config --libs $ldappkgname`;
+ chomp($libs);
+ $DEFINES = "-DUSE_SSL -DPRLDAP";
+}
+print "\nPerLDAP - Perl 5 Module for LDAP\n";
+print "================================\n";
+print "Using CFLAGS = $cflags\n";
+print "================================\n";
+print "Using LIBS = $libs\n";
+
+#
+# Ok, let's do it!
+#
+print "\n######### before WriteMakefile #############\n";
+WriteMakefile(
+ 'ABSTRACT' => 'Perl methods for LDAP C API calls',
+ 'AUTHOR' => 'Leif Hedstrom <leif at ogre.com>',
+ 'NAME' => 'Mozilla::LDAP::API',
+ 'DISTNAME' => 'PerLDAP',
+
+ 'VERSION_FROM' => 'API.pm',
+ 'INC' => $cflags,
+ 'LIBS' => [$libs],
+ 'MYEXTLIB' => $my_extlib,
+ 'DEFINE' => $DEFINES,
+ 'XSOPT' => "-nolinenumbers",
+ @extras
+);
+
+print "\n######### after WriteMakefile #############\n";
+
+#
+# Generate a "make HTML" target
+#
+sub MY::postamble
+{
+ '
+.SUFFIXES: .pm .html
+.PHONY: html
+
+.pm.html:
+ pod2html --netscape $< > $@
+
+html: Entry.html Conn.html Utils.html API.html LDIF.html $(FIRST_MAKEFILE)
+ @rm -f pod2html-itemcache pod2html-dircache
+'
+}
diff --git a/perl-Mozilla-LDAP.spec b/perl-Mozilla-LDAP.spec
index 115cda1..3a9499c 100644
--- a/perl-Mozilla-LDAP.spec
+++ b/perl-Mozilla-LDAP.spec
@@ -1,11 +1,7 @@
-%define nspr_name nspr
-%define nss_name nss
-%define mozldap_name mozldap
-
-Summary: LDAP Perl module that wraps the Mozilla C SDK
+Summary: LDAP Perl module that wraps the OpenLDAP C SDK
Name: perl-Mozilla-LDAP
-Version: 1.5.2
-Release: 7%{?dist}.1
+Version: 1.5.3
+Release: 1%{?dist}
License: GPLv2+ and LGPLv2+ and MPLv1.1
Group: Development/Libraries
URL: http://www.mozilla.org/directory/perldap.html
@@ -13,10 +9,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: perl >= 2:5.8.0
BuildRequires: perl >= 2:5.8.0
BuildRequires: perl(ExtUtils::MakeMaker)
-BuildRequires: %{nspr_name}-devel >= 4.6
-BuildRequires: %{nss_name}-devel >= 3.11
-BuildRequires: %{mozldap_name}-devel >= 6.0
-Source0: ftp://ftp.mozilla.org/pub/mozilla.org/directory/perldap/releases/1.5/perl-mozldap-%{version}.tar.gz
+BuildRequires: nspr-devel
+BuildRequires: nss-devel
+BuildRequires: openldap-devel >= 2.4.22
+Source0: ftp://ftp.mozilla.org/pub/mozilla.org/directory/perldap/releases/${version}/perl-mozldap-%{version}.tar.gz
Source1: ftp://ftp.mozilla.org/pub/mozilla.org/directory/perldap/releases/1.5/Makefile.PL.rpm
%description
@@ -46,7 +42,7 @@ chmod +x %{__perl_requires}
%build
-LDAPPKGNAME=%{mozldap_name} CFLAGS="$RPM_OPT_FLAGS" perl %{SOURCE1} PREFIX=$RPM_BUILD_ROOT%{_prefix} INSTALLDIRS=vendor < /dev/null
+LDAPPKGNAME=openldap CFLAGS="$RPM_OPT_FLAGS" perl %{SOURCE1} PREFIX=$RPM_BUILD_ROOT%{_prefix} INSTALLDIRS=vendor < /dev/null
make OPTIMIZE="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS"
make test
@@ -87,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT
%doc CREDITS ChangeLog README MPL-1.1.txt
%changelog
+* Tue Sep 14 2010 Rich Megginson <rmeggins at redhat.com> - 1.5.3-1
+- new version 1.5.3 with openldap support
+
* Tue May 04 2010 Marcela Maslanova <mmaslano at redhat.com> - 1.5.2-7.1
- Mass rebuild with perl-5.12.0
diff --git a/sources b/sources
index e910f0d..929e0dc 100644
--- a/sources
+++ b/sources
@@ -1,4 +1 @@
-a0fd8e3774fed62abeb6c2cda3362862 Makefile.PL.rpm
-3b81792d9cc11cca3d85ac2f9e5a30fe perl-mozldap-1.5.tar.gz
-6cac0d8c86d04a549a35165db629ecf5 perl-mozldap-1.5.1.tar.gz
-1f7af40a8ca42f4a8b805942129915e0 perl-mozldap-1.5.2.tar.gz
+1f7af40a8ca42f4a8b805942129915e0 perl-mozldap-1.5.3.tar.gz
More information about the scm-commits
mailing list