do not distinguish between NPTL and non-NPTL platforms, we have NPTL everywhere
This commit is contained in:
parent
5b29ccb9b6
commit
8e812e14ad
111
openldap.spec
111
openldap.spec
@ -8,27 +8,23 @@
|
|||||||
%define evolution_connector_libdir %{evolution_connector_prefix}/%{_lib}
|
%define evolution_connector_libdir %{evolution_connector_prefix}/%{_lib}
|
||||||
# For Fedora Core 5, we want 2.2 compatibility.
|
# For Fedora Core 5, we want 2.2 compatibility.
|
||||||
%define compat_version %{version_22}
|
%define compat_version %{version_22}
|
||||||
%define nptl_arches %{ix86} ia64 ppc ppc64 s390 s390x sparcv9 x86_64
|
|
||||||
|
|
||||||
Summary: The configuration files, libraries, and documentation for OpenLDAP
|
Summary: The configuration files, libraries, and documentation for OpenLDAP
|
||||||
Name: openldap
|
Name: openldap
|
||||||
Version: %{version_23}
|
Version: %{version_23}
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: OpenLDAP
|
License: OpenLDAP
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version_23}.tgz
|
Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version_23}.tgz
|
||||||
Source1: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version_22}.tgz
|
Source1: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version_22}.tgz
|
||||||
Source2: http://downloads.sleepycat.com/db-%{db_version}.tar.gz
|
Source2: http://downloads.sleepycat.com/db-%{db_version}.tar.gz
|
||||||
#Source3: ftp://ftp.OpenLDAP.org/pub/tools/autoconf-2.13.1.tar.gz
|
Source3: ftp://ftp.padl.com/pub/MigrationTools-%{migtools_version}.tar.gz
|
||||||
#Source4: ftp://ftp.OpenLDAP.org/pub/tools/automake-1.4a.tar.gz
|
Source4: ldap.init
|
||||||
Source5: ftp://ftp.padl.com/pub/MigrationTools-%{migtools_version}.tar.gz
|
Source5: migration-tools.txt
|
||||||
Source6: ldap.init
|
Source6: autofs.schema
|
||||||
Source7: migration-tools.txt
|
Source7: README.upgrading
|
||||||
Source8: autofs.schema
|
Source8: http://www.OpenLDAP.org/doc/admin/guide.html
|
||||||
Source9: README.upgrading
|
Source9: README.evolution
|
||||||
Source10: http://www.OpenLDAP.org/doc/admin/guide.html
|
|
||||||
Source11: nptl-abi-note.S
|
|
||||||
Source12: README.evolution
|
|
||||||
|
|
||||||
# Patches that are still valid for 2.3
|
# Patches that are still valid for 2.3
|
||||||
Patch0: openldap-2.3.34-config.patch
|
Patch0: openldap-2.3.34-config.patch
|
||||||
@ -154,7 +150,7 @@ includes older versions of the OpenLDAP shared libraries which may be
|
|||||||
required by some applications.
|
required by some applications.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -c -a 1 -a 2 -a 5
|
%setup -q -c -a 1 -a 2 -a 3
|
||||||
|
|
||||||
pushd openldap-%{version_23}
|
pushd openldap-%{version_23}
|
||||||
%patch0 -p1 -b .config
|
%patch0 -p1 -b .config
|
||||||
@ -229,14 +225,9 @@ CFLAGS="$RPM_OPT_FLAGS -D_REENTRANT -fPIC"; export CFLAGS
|
|||||||
# Build Berkeley DB and install it into a temporary area, isolating OpenLDAP
|
# Build Berkeley DB and install it into a temporary area, isolating OpenLDAP
|
||||||
# from any future changes to the system-wide Berkeley DB library. Version 4.2
|
# from any future changes to the system-wide Berkeley DB library. Version 4.2
|
||||||
# or later is required by the BDB backend in OpenLDAP 2.1 and later.
|
# or later is required by the BDB backend in OpenLDAP 2.1 and later.
|
||||||
buildbdb() {
|
install -d db-%{db_version}/build-rpm
|
||||||
subdir=$1
|
pushd db-%{db_version}/build-rpm
|
||||||
shift
|
../dist/configure -C \
|
||||||
install -d db-%{db_version}/build-rpm${subdir:+-${subdir}}
|
|
||||||
pushd db-%{db_version}/build-rpm${subdir:+-${subdir}}
|
|
||||||
echo "${1:+db_cv_mutex=$1}" > config.cache
|
|
||||||
shift
|
|
||||||
../dist/configure -C \
|
|
||||||
--with-pic \
|
--with-pic \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
@ -244,43 +235,16 @@ buildbdb() {
|
|||||||
--prefix=${dbdir} \
|
--prefix=${dbdir} \
|
||||||
--includedir=${dbdir}/include \
|
--includedir=${dbdir}/include \
|
||||||
--libdir=${dbdir}/%{_lib}${subdir:+/${subdir}}
|
--libdir=${dbdir}/%{_lib}${subdir:+/${subdir}}
|
||||||
# XXX db-4.2.x handles O_DIRECT (by disabling on linux) correctly.
|
# XXX db-4.2.x handles O_DIRECT (by disabling on linux) correctly.
|
||||||
# XXX hack out O_DIRECT support in db4 for now.
|
# XXX hack out O_DIRECT support in db4 for now.
|
||||||
perl -pi -e 's/#define HAVE_O_DIRECT 1/#undef HAVE_O_DIRECT/' db_config.h
|
perl -pi -e 's/#define HAVE_O_DIRECT 1/#undef HAVE_O_DIRECT/' db_config.h
|
||||||
# fix libtool: no rpath
|
# fix libtool: no rpath
|
||||||
perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
|
perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
|
||||||
|
|
||||||
if test -n "$nptl_lo" ; then
|
make %{_smp_mflags} libdb_base=libslapd_db libso_base=libslapd_db
|
||||||
./libtool --mode=compile %{__cc} -o $nptl_lo -c $nptl_s
|
make install libdb_base=libslapd_db libso_base=libslapd_db strip="false"
|
||||||
fi
|
ln -sf libslapd_db.so ${dbdir}/%{_lib}/${subdir}/libdb.so
|
||||||
make %{_smp_mflags} libdb_base=libslapd_db libso_base=libslapd_db LIBSO_LIBS="$nptl_lo"
|
popd
|
||||||
make install libdb_base=libslapd_db libso_base=libslapd_db LIBSO_LIBS="$nptl_lo" strip="false"
|
|
||||||
ln -sf libslapd_db.so ${dbdir}/%{_lib}/${subdir}/libdb.so
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
# Build an NPTL libdb if we're on a Linux arch with NPTL. NPTL gives us the
|
|
||||||
# ability to share mutexes between threads in different processes, and to have
|
|
||||||
# threads in both honor those locks. We have to do this because if you build
|
|
||||||
# libdb with support for intra-process locks, it dies if you don't have it and
|
|
||||||
# the application has specified to libdb that it's multi-threaded (as slapd
|
|
||||||
# does).
|
|
||||||
%ifarch %{nptl_arches}
|
|
||||||
unset nptl_s nptl_lo
|
|
||||||
case %{_os} in
|
|
||||||
linux|Linux)
|
|
||||||
nptl_s=$RPM_SOURCE_DIR/nptl-abi-note.S
|
|
||||||
nptl_lo=nptl-abi-note.lo
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
buildbdb tls POSIX/pthreads/library
|
|
||||||
unset nptl_s nptl_lo
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Build a non-NPTL libdb and tools, able to only use intra-process thread
|
|
||||||
# locks. Useless for bdb's purposes (bdb requires shared env support), but
|
|
||||||
# acceptable for ldbm.
|
|
||||||
buildbdb "" POSIX/pthreads/library/private
|
|
||||||
|
|
||||||
# Find OpenSSL's header and library dependencies.
|
# Find OpenSSL's header and library dependencies.
|
||||||
if pkg-config openssl ; then
|
if pkg-config openssl ; then
|
||||||
@ -303,7 +267,6 @@ pushd openldap-%{compat_version}/build-compat
|
|||||||
make %{_smp_mflags}
|
make %{_smp_mflags}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Build 2.2.
|
|
||||||
build() {
|
build() {
|
||||||
%configure \
|
%configure \
|
||||||
--with-threads=posix \
|
--with-threads=posix \
|
||||||
@ -407,25 +370,6 @@ pushd openldap-%{compat_version}/build-compat/servers/slapd
|
|||||||
$libtool --mode=install /usr/bin/install -c -s -m 755 slapd $RPM_BUILD_ROOT/%{_libdir}/compat-openldap/slapcat
|
$libtool --mode=install /usr/bin/install -c -s -m 755 slapd $RPM_BUILD_ROOT/%{_libdir}/compat-openldap/slapcat
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Install servers.
|
|
||||||
%ifarch %{nptl_arches}
|
|
||||||
case %{_target_platform} in
|
|
||||||
i386*|i486*) archp=i486; arches="i586 i686";;
|
|
||||||
i586*) archp=i586; arches=i686;;
|
|
||||||
i686*) archp=i686; arches=;;
|
|
||||||
athlon*) archp=i686; arches=;;
|
|
||||||
*) archp=; arches=;;
|
|
||||||
esac
|
|
||||||
pushd db-instroot/%{_lib}/tls/
|
|
||||||
install -d $RPM_BUILD_ROOT/%{_libdir}/tls/${archp}/
|
|
||||||
install -m755 libslapd_db-*.*.so $RPM_BUILD_ROOT/%{_libdir}/tls/${archp}/
|
|
||||||
for arch in $arches ; do
|
|
||||||
install -d $RPM_BUILD_ROOT/%{_libdir}/tls/${arch}/
|
|
||||||
ln $RPM_BUILD_ROOT/%{_libdir}/tls/${archp}/* $RPM_BUILD_ROOT/%{_libdir}/tls/${arch}/
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
%endif
|
|
||||||
|
|
||||||
pushd db-instroot/%{_lib}/
|
pushd db-instroot/%{_lib}/
|
||||||
install -d $RPM_BUILD_ROOT/%{_libdir}/
|
install -d $RPM_BUILD_ROOT/%{_libdir}/
|
||||||
install -m755 libslapd_db-*.*.so $RPM_BUILD_ROOT/%{_libdir}/
|
install -m755 libslapd_db-*.*.so $RPM_BUILD_ROOT/%{_libdir}/
|
||||||
@ -681,14 +625,6 @@ fi
|
|||||||
%attr(0755,root,root) %{_libdir}/libslapd_db-*.*.so
|
%attr(0755,root,root) %{_libdir}/libslapd_db-*.*.so
|
||||||
%attr(0755,root,root) %dir %{_libdir}/openldap
|
%attr(0755,root,root) %dir %{_libdir}/openldap
|
||||||
%attr(0755,root,root) %{_libdir}/openldap/[^b]*
|
%attr(0755,root,root) %{_libdir}/openldap/[^b]*
|
||||||
%ifarch %{nptl_arches}
|
|
||||||
%ifnarch %{ix86}
|
|
||||||
%attr(0755,root,root) %{_libdir}/tls/libslapd_db-*.*.so
|
|
||||||
%else
|
|
||||||
%dir %attr(0755,root,root) %{_libdir}/tls/*
|
|
||||||
%attr(0755,root,root) %{_libdir}/tls/*/libslapd_db-*.*.so
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files servers-sql
|
%files servers-sql
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -717,6 +653,11 @@ fi
|
|||||||
%attr(0644,root,root) %{evolution_connector_libdir}/*.a
|
%attr(0644,root,root) %{evolution_connector_libdir}/*.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 2 2007 Jan Safranek <jsafranek@redhat.com> 2.3.37-2%{?dist}
|
||||||
|
- do not use specific automake and autoconf
|
||||||
|
- do not distinguish between NPTL and non-NPTL platforms, we have NPTL
|
||||||
|
everywhere
|
||||||
|
|
||||||
* Tue Jul 31 2007 Jan Safranek <jsafranek@redhat.com> 2.3.37-1%{?dist}
|
* Tue Jul 31 2007 Jan Safranek <jsafranek@redhat.com> 2.3.37-1%{?dist}
|
||||||
- new upstream version
|
- new upstream version
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user