build and provide liblmdb [release 2.4.43-2mamba;Fri Jan 01 2016]

This commit is contained in:
Silvan Calarco 2024-01-06 08:13:01 +01:00
parent f721fcb7b5
commit 0d7eca3419
3 changed files with 134 additions and 7 deletions

View File

@ -0,0 +1,24 @@
--- openldap-2.4.43/libraries/liblmdb/Makefile.orig 2016-01-01 21:06:16.297023647 +0100
+++ openldap-2.4.43/libraries/liblmdb/Makefile 2016-01-01 21:07:02.919683678 +0100
@@ -28,7 +28,9 @@
SOLIBS =
SONAME = liblmdb.so.0
prefix = /usr/local
-mandir = $(prefix)/man
+libdir = $(prefix)/lib
+datadir = $(prefix)/share
+mandir = $(datadir)/man
########################################################################
@@ -45,8 +47,8 @@
mkdir -p $(DESTDIR)$(prefix)/include
mkdir -p $(DESTDIR)$(prefix)/man/man1
for f in $(IPROGS); do cp $$f $(DESTDIR)$(prefix)/bin; done
- for f in $(ILIBS); do cp $$f $(DESTDIR)$(prefix)/lib; done
- for f in $(IHDRS); do cp $$f $(DESTDIR)$(prefix)/include; done
+ for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
+ for f in $(IHDRS); do cp $$f $(DESTDIR)$(prefix)/include; done
for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
clean:

View File

@ -0,0 +1,27 @@
--- openldap-2.4.43/libraries/liblmdb/Makefile.orig 2016-01-01 20:51:56.318190881 +0100
+++ openldap-2.4.43/libraries/liblmdb/Makefile 2016-01-01 20:53:58.538154157 +0100
@@ -26,13 +26,14 @@
CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS)
LDLIBS =
SOLIBS =
+SONAME = liblmdb.so.0
prefix = /usr/local
mandir = $(prefix)/man
########################################################################
IHDRS = lmdb.h
-ILIBS = liblmdb.a liblmdb.so
+ILIBS = liblmdb.a $(SONAME)
IPROGS = mdb_stat mdb_copy mdb_dump mdb_load
IDOCS = mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1
PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5
@@ -58,7 +59,7 @@
liblmdb.a: mdb.o midl.o
$(AR) rs $@ mdb.o midl.o
-liblmdb.so: mdb.lo midl.lo
+$(SONAME): mdb.lo midl.lo
# $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
$(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)

View File

@ -1,6 +1,6 @@
Name: openldap
Version: 2.4.43
Release: 1mamba
Release: 2mamba
Group: System/Servers
Summary: An open source implementation of the Lightweight Directory Access Protocol
Vendor: openmamba
@ -16,6 +16,8 @@ Source5: openldap.tmpfiles
# patch from Novell developers (evolution-exchange-2.4.0/docs/openldap-ntlm.diff)
Patch0: %{name}-2.4.6-evolution-ntlm.patch
Patch2: %{name}-2.4.24-default_config.patch
Patch3: openldap-2.4.43-liblmdb-soname.patch
Patch4: openldap-2.4.43-liblmdb-installdirs.patch
License: OpenLDAP Public License
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -77,13 +79,44 @@ Obsoletes: openldap-servers
OpenLDAP is an open source implementation of the Lightweight Directory Access Protocol.
This package contains the OpenLDAP server and related files.
%package -n liblmdb
Summary: OpenLDAP lmdb library
Group: System/Libraries
%description -n liblmdb
OpenLDAP is an open source implementation of the Lightweight Directory Access Protocol.
This package contains the lmdb library.
%package -n liblmdb-tools
Summary: OpenLDAP lmdb library tools
Group: System/Tools
Requires: liblmdb = %{version}-%{release}
%description -n liblmdb-tools
OpenLDAP is an open source implementation of the Lightweight Directory Access Protocol.
This package contains the lmdb library tools.
%package -n liblmdb-devel
Summary: liblmdb development files
Group: Development/Libraries
Requires: liblmdb = %{version}-%{release}
%description -n liblmdb-devel
OpenLDAP is an open source implementation of the Lightweight Directory Access Protocol.
This package contains static libraries and header files needed for development.
%prep
%setup -q
#-D -T
#:<< _EOF
#cp %{SOURCE3} servers/slapd/slapd.conf
%patch0 -p1 -b .ntlm
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
#:<< _EOF
%configure \
--libexecdir=%{_sbindir} \
--localstatedir=%{_localstatedir} \
@ -95,12 +128,15 @@ This package contains the OpenLDAP server and related files.
--enable-passwd \
--enable-modules \
--enable-rewrite \
--enable-dynamic
--enable-dynamic \
--enable-mdb
# --enable-rlookups \
%make CC=%{_host}-gcc
%make -C libraries/liblmdb
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
@ -135,6 +171,9 @@ _EOF
rm -f %{buildroot}/var/openldap-data/DB_CONFIG.example
%makeinstall -C libraries/liblmdb prefix=%{_prefix} libdir=%{_libdir}
ln -s liblmdb.so.0 %{buildroot}%{_libdir}/liblmdb.so
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -226,18 +265,52 @@ exit 0
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/openldap/ldap.conf
%{_bindir}/ldapurl
%{_libdir}/*.so.*
%{_libdir}/liblber-*.so.*
%{_libdir}/libldap-*.so.*
%{_libdir}/libldap_r-*.so.*
%doc COPYRIGHT LICENSE
%files -n lib%{name}-devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/*.la
%{_includedir}/lber.h
%{_includedir}/lber_types.h
%{_includedir}/ldap.h
%{_includedir}/ldap_cdefs.h
%{_includedir}/ldap_features.h
%{_includedir}/ldap_schema.h
%{_includedir}/ldap_utf8.h
%{_includedir}/ldif.h
%{_includedir}/slapi-plugin.h
%{_libdir}/liblber.a
%{_libdir}/liblber.la
%{_libdir}/liblber.so
%{_libdir}/libldap.a
%{_libdir}/libldap.la
%{_libdir}/libldap.so
%{_libdir}/libldap_r.a
%{_libdir}/libldap_r.la
%{_libdir}/libldap_r.so
%doc doc/devel/* doc/drafts/draft*.txt doc/rfc/rfc*.txt
%doc ANNOUNCEMENT CHANGES README
%files -n liblmdb-tools
%defattr(-,root,root)
%{_bindir}/mdb_copy
%{_bindir}/mdb_dump
%{_bindir}/mdb_load
%{_bindir}/mdb_stat
%files -n liblmdb
%defattr(-,root,root)
%{_libdir}/liblmdb.so.*
%doc COPYRIGHT LICENSE
%files -n liblmdb-devel
%defattr(-,root,root)
%{_includedir}/lmdb.h
%{_libdir}/liblmdb.a
%{_libdir}/liblmdb.so
%files clients
%defattr(-,root,root)
%{_bindir}/ldapexop
@ -285,6 +358,9 @@ exit 0
%{_mandir}/man8/*
%changelog
* Fri Jan 01 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.43-2mamba
- build and provide liblmdb
* Tue Dec 01 2015 Automatic Build System <autodist@mambasoft.it> 2.4.43-1mamba
- automatic version update by autodist