зеркало из https://github.com/mozilla/pjs.git
Resolves: bug 366335
Description: Make libldif public Fix Description: Copy/paste the makefile code to build the shared library in addition to the static library from libldap/Makefile.in. The build will now build both libldif60.so and libldif60.a, and package/distribute both of them. I changed include/Makefile.in to export ldif.h with the other public header files, and changed ldif.h to add a blurb explaining that these interfaces were formerly private and use with caution. Since this is a non trivial change, I bumped the version number to 6.0.1.
This commit is contained in:
Родитель
fd512e0147
Коммит
71304daa25
|
@ -45,7 +45,7 @@ COMPVERSIONDIR = $(DEPTH)/directory/c-sdk
|
|||
endif
|
||||
|
||||
DEFAULT_VENDOR_NAME=mozilla.org
|
||||
DEFAULT_VENDOR_VERSION=600
|
||||
DEFAULT_VENDOR_VERSION=601
|
||||
|
||||
ifndef VENDOR_NAME
|
||||
VENDOR_NAME = $(DEFAULT_VENDOR_NAME)
|
||||
|
|
|
@ -8,3 +8,4 @@ ldap-to-be-deprecated.h
|
|||
ldap-deprecated.h
|
||||
ldap-standard.h
|
||||
ldap-platform.h
|
||||
ldif.h
|
||||
|
|
|
@ -57,6 +57,7 @@ HEADERS = \
|
|||
ldap-deprecated.h \
|
||||
ldap_ssl.h \
|
||||
ldappr.h \
|
||||
ldif.h \
|
||||
iutil.h \
|
||||
srchpref.h \
|
||||
$(NULL)
|
||||
|
|
|
@ -47,6 +47,13 @@
|
|||
* is provided ``as is'' without express or implied warranty.
|
||||
*/
|
||||
|
||||
/* NOTE: As of mozldap version 6.0.1 the LDIF functions are now
|
||||
publicly usable. The LDIF functions were originally designed for
|
||||
"internal use only" purposes and as such the APIs are not very modern
|
||||
or safe. For example, the caller needs to be careful to provide
|
||||
adequately sized buffers and so on.
|
||||
*/
|
||||
|
||||
#ifndef _LDIF_H
|
||||
#define _LDIF_H
|
||||
|
||||
|
|
|
@ -45,12 +45,15 @@ include $(topsrcdir)/build.mk
|
|||
|
||||
SRCS = line64.c
|
||||
|
||||
RELEASE_LIBS = $(SHARED_LIBRARY) $(DLLLDIF)
|
||||
|
||||
REALOBJS = $(SRCS:.c=.$(OBJ_SUFFIX))
|
||||
OBJS = $(addprefix $(OBJDIR_NAME)/, $(REALOBJS))
|
||||
|
||||
HDIR = $(topsrcdir)/ldap/include
|
||||
|
||||
LIBLDIF = $(addprefix $(OBJDIR_NAME)/, $(LIB_PREFIX)$(LDIF_LIBNAME).$(LIB_SUFFIX))
|
||||
DLLLDIF = $(addprefix $(OBJDIR_NAME)/, $(LIB_PREFIX)$(LDIF_LIBNAME).$(DLL_SUFFIX))
|
||||
|
||||
INSTALLDIR = $(DIST)/$(OBJDIR_NAME)
|
||||
|
||||
|
@ -67,6 +70,34 @@ PLATFORMLIBS =
|
|||
THREADS =
|
||||
THREADSLIB =
|
||||
|
||||
#
|
||||
# shared library symbol export definitions
|
||||
#
|
||||
ifeq ($(USE_DLL_EXPORTS_FILE), 1)
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
GENEXPORTS=cmd /c $(PERL) $(topsrcdir)/ldif/build/genexports.pl
|
||||
else
|
||||
GENEXPORTS=$(PERL) $(topsrcdir)/ldif/build/genexports.pl
|
||||
endif
|
||||
|
||||
# variable definitions for exported symbols
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
LDIF_EXPORT_DEFS= $(win_srcdir)/../msdos/winsock/nsldif32.def
|
||||
else
|
||||
ifeq ($(OS_ARCH), OS2)
|
||||
LDIF_EXPORT_DEFS= $(OBJDIR_NAME)/libldif.def
|
||||
else
|
||||
LDIF_EXPORT_DEFS= $(OBJDIR_NAME)/libldif.exp
|
||||
endif
|
||||
GARBAGE += $(LDIF_EXPORT_DEFS)
|
||||
endif
|
||||
|
||||
LDIF_EXPORT_FLAGS=$(addprefix $(DLLEXPORTS_PREFIX), $(LDIF_EXPORT_DEFS))
|
||||
|
||||
GENEXPARGS=$(BUILD_DEBUG) $(LDIFVERS_SUFFIX) $(LDIFVERS)
|
||||
endif # USE_DLL_EXPORTS_FILE
|
||||
|
||||
|
||||
###########################################################################
|
||||
|
||||
versiont.c: Makefile.client Version.c
|
||||
|
@ -84,15 +115,29 @@ $(LIBDIR):
|
|||
|
||||
$(LIBLDIF): $(OBJS) $(LIBDIR)
|
||||
@echo ======= making $(LIBLDIF)
|
||||
|
||||
$(LINK_LIB)
|
||||
|
||||
$(DLLLDIF): $(OBJS) $(LIBDIR) $(LDIF_EXPORT_DEFS)
|
||||
@echo ======= making $(DLLLDIF)
|
||||
|
||||
ifdef SO_FILES_TO_REMOVE
|
||||
-$(RM) $(SO_FILES_TO_REMOVE)
|
||||
endif
|
||||
$(LINK_LIB)
|
||||
|
||||
$(LINK_DLL) $(LDAP_EXPORT_FLAGS) $(EXTRA_LIBS)
|
||||
|
||||
|
||||
veryclean:: clean
|
||||
|
||||
$(OBJDEST):
|
||||
$(MKDIR) $(OBJDEST)
|
||||
|
||||
export:: $(LIBLDIF)
|
||||
export:: $(DLLLDIF) $(LIBLDIF)
|
||||
$(INSTALL) -m 444 $(LIBLDIF) $(dist_libdir)
|
||||
|
||||
ifdef MKSHLIB
|
||||
$(INSTALL) -m 444 $(LIBLDIF) $(dist_libdir)
|
||||
$(INSTALL) -m 444 $(DLLLDIF) $(dist_libdir)
|
||||
$(INSTALL) -m 444 $(DLLLDIF) $(dist_bindir)
|
||||
endif
|
||||
|
|
|
@ -2,19 +2,16 @@
|
|||
%define nspr_version 4.6
|
||||
%define nss_name nss
|
||||
%define nss_version 3.11
|
||||
%define svrcore_name svrcore-devel
|
||||
%define svrcore_version 4.0.1
|
||||
%define svrcore_name svrcore
|
||||
%define svrcore_version 4.0.3
|
||||
|
||||
%define major 6
|
||||
%define minor 0
|
||||
%define submin 0
|
||||
%define submin 1
|
||||
%define libsuffix %{major}0
|
||||
%define myname mozldap%{major}
|
||||
%define incdir %{_includedir}/%{myname}
|
||||
%define mybindir %{_libdir}/%{myname}
|
||||
%define mydatadir %{_datadir}/%{myname}
|
||||
|
||||
Summary: Mozilla LDAP C SDK
|
||||
Name: %{myname}
|
||||
Name: mozldap
|
||||
Version: %{major}.%{minor}.%{submin}
|
||||
Release: 1%{?dist}
|
||||
License: MPL/GPL/LGPL
|
||||
|
@ -22,10 +19,14 @@ URL: http://www.mozilla.org/directory/csdk.html
|
|||
Group: System Environment/Libraries
|
||||
Requires: %{nspr_name} >= %{nspr_version}
|
||||
Requires: %{nss_name} >= %{nss_version}
|
||||
Requires: %{svrcore_name} >= %{svrcore_version}
|
||||
Requires: cyrus-sasl-lib
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: %{nspr_name}-devel >= %{nspr_version}
|
||||
BuildRequires: %{nss_name}-devel >= %{nss_version}
|
||||
BuildRequires: %{svrcore_name} >= %{svrcore_version}
|
||||
BuildRequires: %{svrcore_name}-devel >= %{svrcore_version}
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cyrus-sasl-devel
|
||||
|
||||
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v%{version}/src/%{name}-%{version}.tar.gz
|
||||
|
||||
|
@ -43,7 +44,7 @@ Group: System Environment/Base
|
|||
Requires: %{name} = %{version}-%{release}
|
||||
BuildRequires: %{nspr_name}-devel >= %{nspr_version}
|
||||
BuildRequires: %{nss_name}-devel >= %{nss_version}
|
||||
BuildRequires: %{svrcore_name} >= %{svrcore_version}
|
||||
BuildRequires: %{svrcore_name}-devel >= %{svrcore_version}
|
||||
|
||||
%description tools
|
||||
The mozldap-tools package provides the ldapsearch,
|
||||
|
@ -57,21 +58,29 @@ Group: Development/Libraries
|
|||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{nspr_name}-devel >= %{nspr_version}
|
||||
Requires: %{nss_name}-devel >= %{nss_version}
|
||||
Requires: %{svrcore_name}-devel >= %{svrcore_version}
|
||||
|
||||
%description devel
|
||||
Header and Library files for doing development with the Mozilla LDAP C SDK
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%ifarch x86_64 ppc64 ia64 s390x
|
||||
arg64="--enable-64bit"
|
||||
%endif
|
||||
cd mozilla/directory/c-sdk
|
||||
%configure $arg64 --with-sasl --enable-clu --with-system-svrcore --enable-optimize --disable-debug
|
||||
|
||||
%build
|
||||
if [ $RPM_BUILD_ROOT != "/" ] ; then %{__rm} -rf $RPM_BUILD_ROOT ; fi
|
||||
|
||||
cd mozilla/directory/c-sdk
|
||||
|
||||
%configure \
|
||||
%ifarch x86_64 ppc64 ia64 s390x
|
||||
--enable-64bit \
|
||||
%endif
|
||||
--with-sasl \
|
||||
--enable-clu \
|
||||
--with-system-svrcore \
|
||||
--enable-optimize \
|
||||
--disable-debug
|
||||
|
||||
# Enable compiler optimizations and disable debugging code
|
||||
BUILD_OPT=1
|
||||
export BUILD_OPT
|
||||
|
@ -86,41 +95,39 @@ PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
|
|||
export PKG_CONFIG_ALLOW_SYSTEM_LIBS
|
||||
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
|
||||
|
||||
make \
|
||||
%ifarch x86_64 ppc64 ia64 s390x
|
||||
USE_64=1
|
||||
export USE_64
|
||||
USE_64=1
|
||||
%endif
|
||||
|
||||
cd mozilla/directory/c-sdk
|
||||
make
|
||||
|
||||
%install
|
||||
if [ $RPM_BUILD_ROOT != "/" ] ; then %{__rm} -rf $RPM_BUILD_ROOT ; fi
|
||||
|
||||
# Set up our package file
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/pkgconfig
|
||||
%{__cat} mozilla/directory/c-sdk/mozldap.pc.in | sed -e "s,%%libdir%%,%{_libdir},g" \
|
||||
-e "s,%%prefix%%,%{_prefix},g" \
|
||||
-e "s,%%major%%,%{major},g" \
|
||||
-e "s,%%minor%%,%{minor},g" \
|
||||
-e "s,%%submin%%,%{submin},g" \
|
||||
-e "s,%%libsuffix%%,%{libsuffix},g" \
|
||||
-e "s,%%bindir%%,%{mybindir},g" \
|
||||
-e "s,%%exec_prefix%%,%{_prefix},g" \
|
||||
-e "s,%%includedir%%,%{incdir},g" \
|
||||
-e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
|
||||
-e "s,%%NSS_VERSION%%,%{nss_version},g" \
|
||||
-e "s,%%SVRCORE_VERSION%%,%{svrcore_version},g" \
|
||||
-e "s,%%MOZLDAP_VERSION%%,%{version},g" > \
|
||||
$RPM_BUILD_ROOT%{_libdir}/pkgconfig/%{name}.pc
|
||||
%{__cat} mozilla/directory/c-sdk/mozldap.pc.in \
|
||||
| sed -e "s,%%libdir%%,%{_libdir},g" \
|
||||
-e "s,%%prefix%%,%{_prefix},g" \
|
||||
-e "s,%%major%%,%{major},g" \
|
||||
-e "s,%%minor%%,%{minor},g" \
|
||||
-e "s,%%submin%%,%{submin},g" \
|
||||
-e "s,%%libsuffix%%,%{libsuffix},g" \
|
||||
-e "s,%%bindir%%,%{_libdir}/%{name},g" \
|
||||
-e "s,%%exec_prefix%%,%{_prefix},g" \
|
||||
-e "s,%%includedir%%,%{_includedir}/%{name},g" \
|
||||
-e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
|
||||
-e "s,%%NSS_VERSION%%,%{nss_version},g" \
|
||||
-e "s,%%SVRCORE_VERSION%%,%{svrcore_version},g" \
|
||||
-e "s,%%MOZLDAP_VERSION%%,%{version},g" \
|
||||
> $RPM_BUILD_ROOT%{_libdir}/pkgconfig/%{name}.pc
|
||||
|
||||
# There is no make install target so we'll do it ourselves.
|
||||
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{incdir}
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{mybindir}
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{_includedir}/%{name}
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/%{name}
|
||||
|
||||
# Copy the binary libraries we want
|
||||
for file in libssldap%{libsuffix}.so libprldap%{libsuffix}.so libldap%{libsuffix}.so
|
||||
for file in libssldap%{libsuffix}.so libprldap%{libsuffix}.so libldap%{libsuffix}.so libldif%{libsuffix}.so
|
||||
do
|
||||
%{__install} -m 755 mozilla/dist/lib/$file $RPM_BUILD_ROOT%{_libdir}
|
||||
done
|
||||
|
@ -128,33 +135,23 @@ done
|
|||
# Copy the binaries we want
|
||||
for file in ldapsearch ldapmodify ldapdelete ldapcmp ldapcompare ldappasswd
|
||||
do
|
||||
%{__install} -m 755 mozilla/dist/bin/$file $RPM_BUILD_ROOT%{mybindir}
|
||||
%{__install} -m 755 mozilla/dist/bin/$file $RPM_BUILD_ROOT%{_libdir}/%{name}
|
||||
done
|
||||
|
||||
# Copy the include files
|
||||
for file in mozilla/dist/public/ldap/*.h
|
||||
do
|
||||
%{__install} -m 644 $file $RPM_BUILD_ROOT%{incdir}
|
||||
%{__install} -m 644 $file $RPM_BUILD_ROOT%{_includedir}/%{name}
|
||||
done
|
||||
|
||||
# Copy the developer files
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{mydatadir}
|
||||
cp -r mozilla/directory/c-sdk/ldap/examples $RPM_BUILD_ROOT%{mydatadir}
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{mydatadir}/etc
|
||||
%{__install} -m 644 mozilla/directory/c-sdk/ldap/examples/xmplflt.conf $RPM_BUILD_ROOT%{mydatadir}/etc
|
||||
%{__install} -m 644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldaptemplates.conf $RPM_BUILD_ROOT%{mydatadir}/etc
|
||||
%{__install} -m 644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldapfilter.conf $RPM_BUILD_ROOT%{mydatadir}/etc
|
||||
%{__install} -m 644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldapsearchprefs.conf $RPM_BUILD_ROOT%{mydatadir}/etc
|
||||
|
||||
# Rename the libraries and create the symlinks
|
||||
cd $RPM_BUILD_ROOT%{_libdir}
|
||||
for file in libssldap%{libsuffix}.so libprldap%{libsuffix}.so libldap%{libsuffix}.so
|
||||
do
|
||||
mv $file $file.%{major}.%{minor}.%{submin}
|
||||
ln -s $file.%{major}.%{minor}.%{submin} $file.%{major}.%{minor}
|
||||
ln -s $file.%{major}.%{minor}.%{submin} $file.%{major}
|
||||
ln -s $file.%{major}.%{minor}.%{submin} $file
|
||||
done
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
cp -r mozilla/directory/c-sdk/ldap/examples $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/%{name}/etc
|
||||
%{__install} -m 644 mozilla/directory/c-sdk/ldap/examples/xmplflt.conf $RPM_BUILD_ROOT%{_datadir}/%{name}/etc
|
||||
%{__install} -m 644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldaptemplates.conf $RPM_BUILD_ROOT%{_datadir}/%{name}/etc
|
||||
%{__install} -m 644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldapfilter.conf $RPM_BUILD_ROOT%{_datadir}/%{name}/etc
|
||||
%{__install} -m 644 mozilla/directory/c-sdk/ldap/libraries/libldap/ldapsearchprefs.conf $RPM_BUILD_ROOT%{_datadir}/%{name}/etc
|
||||
|
||||
%clean
|
||||
if [ $RPM_BUILD_ROOT != "/" ] ; then %{__rm} -rf $RPM_BUILD_ROOT ; fi
|
||||
|
@ -169,36 +166,39 @@ if [ $RPM_BUILD_ROOT != "/" ] ; then %{__rm} -rf $RPM_BUILD_ROOT ; fi
|
|||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc mozilla/directory/c-sdk/README.rpm
|
||||
%{_libdir}/libssldap%{libsuffix}.so.%{major}
|
||||
%{_libdir}/libprldap%{libsuffix}.so.%{major}
|
||||
%{_libdir}/libldap%{libsuffix}.so.%{major}
|
||||
%{_libdir}/libssldap%{libsuffix}.so.%{major}.%{minor}
|
||||
%{_libdir}/libprldap%{libsuffix}.so.%{major}.%{minor}
|
||||
%{_libdir}/libldap%{libsuffix}.so.%{major}.%{minor}
|
||||
%{_libdir}/libssldap%{libsuffix}.so.%{major}.%{minor}.%{submin}
|
||||
%{_libdir}/libprldap%{libsuffix}.so.%{major}.%{minor}.%{submin}
|
||||
%{_libdir}/libldap%{libsuffix}.so.%{major}.%{minor}.%{submin}
|
||||
%{_libdir}/libssldap*.so
|
||||
%{_libdir}/libprldap*.so
|
||||
%{_libdir}/libldap*.so
|
||||
%{_libdir}/libldif*.so
|
||||
|
||||
%files tools
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{mybindir}
|
||||
%{mybindir}/ldapsearch
|
||||
%{mybindir}/ldapmodify
|
||||
%{mybindir}/ldapdelete
|
||||
%{mybindir}/ldapcmp
|
||||
%{mybindir}/ldapcompare
|
||||
%{mybindir}/ldappasswd
|
||||
%dir %{_libdir}/%{name}
|
||||
%{_libdir}/%{name}/ldapsearch
|
||||
%{_libdir}/%{name}/ldapmodify
|
||||
%{_libdir}/%{name}/ldapdelete
|
||||
%{_libdir}/%{name}/ldapcmp
|
||||
%{_libdir}/%{name}/ldapcompare
|
||||
%{_libdir}/%{name}/ldappasswd
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libssldap%{libsuffix}.so
|
||||
%{_libdir}/libprldap%{libsuffix}.so
|
||||
%{_libdir}/libldap%{libsuffix}.so
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
%{incdir}
|
||||
%{mydatadir}
|
||||
%{_includedir}/%{name}
|
||||
%{_datadir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Mon Jan 8 2007 Rich Megginson <richm@stanfordalumni.org> - 6.0.1-1
|
||||
- bump version to 6.0.1
|
||||
- added libldif and ldif.h
|
||||
|
||||
* Fri Dec 8 2006 Axel Thimm <Axel.Thimm@ATrpms.net> - 6.0.0-2
|
||||
- Rename to mozldap.
|
||||
- move configure step to %%build section.
|
||||
- clean up excessive use of %%defines, make more Fedora like.
|
||||
- fix mismatching soname issue.
|
||||
- generic specfile cosmetics.
|
||||
|
||||
* Thu Oct 5 2006 Rich Megginson <richm@stanforalumni.org> - 6.0.0-1
|
||||
- Bump version to 6.0.0 - add support for submit/patch level (3rd level) in version numbering
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче