2012-05-25 12:58:25 +02:00
|
|
|
#
|
2012-06-28 18:35:11 +02:00
|
|
|
# spec file for package ldb
|
2012-05-25 12:58:25 +02:00
|
|
|
#
|
2024-05-20 11:09:00 +02:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2012-05-25 12:58:25 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-09-25 17:05:31 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-05-25 12:58:25 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2015-11-11 21:35:00 +01:00
|
|
|
%{!?py3_soflags: %global py3_soflags cpython-%{python3_version_nodots}m}
|
2018-03-19 16:26:04 +01:00
|
|
|
%{!?py3_soflags_dash: %global py3_soflags_dash %(echo %{py3_soflags} | sed "s/_/-/g")}
|
2012-06-01 00:29:05 +02:00
|
|
|
|
2018-09-25 09:15:00 +02:00
|
|
|
%global with_lmdb 0
|
|
|
|
%if 0%{?suse_version} > 1320
|
|
|
|
%ifarch x86_64
|
|
|
|
%global with_lmdb 1
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%define lmdb_version 0.9.16
|
2024-05-20 11:09:00 +02:00
|
|
|
%define talloc_version 2.4.2
|
|
|
|
%define tdb_version 1.4.10
|
|
|
|
%define tevent_version 0.16.1
|
2012-05-25 12:58:25 +02:00
|
|
|
|
2012-06-02 18:02:22 +02:00
|
|
|
Name: ldb
|
2014-09-23 21:56:28 +02:00
|
|
|
BuildRequires: docbook-xsl-stylesheets
|
2015-10-30 15:46:00 +01:00
|
|
|
BuildRequires: doxygen
|
2019-04-22 19:10:10 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
2017-10-06 10:30:56 +02:00
|
|
|
%ifnarch ppc
|
2019-04-22 19:10:10 +02:00
|
|
|
BuildRequires: libcmocka-devel >= 1.1.3
|
2017-10-06 10:30:56 +02:00
|
|
|
%endif
|
|
|
|
%endif
|
2012-06-01 00:29:05 +02:00
|
|
|
BuildRequires: libtalloc-devel >= %{talloc_version}
|
|
|
|
BuildRequires: libtdb-devel >= %{tdb_version}
|
|
|
|
BuildRequires: libtevent-devel >= %{tevent_version}
|
2014-09-23 21:56:28 +02:00
|
|
|
BuildRequires: libxslt
|
2012-06-01 17:00:29 +02:00
|
|
|
BuildRequires: popt-devel
|
2015-11-11 21:35:00 +01:00
|
|
|
BuildRequires: python3-devel
|
2017-10-01 13:54:28 +02:00
|
|
|
BuildRequires: python3-talloc >= %{talloc_version}
|
|
|
|
BuildRequires: python3-talloc-devel >= %{talloc_version}
|
2019-04-22 19:10:10 +02:00
|
|
|
BuildRequires: python3-tdb >= %{tdb_version}
|
|
|
|
BuildRequires: python3-tevent >= %{tevent_version}
|
2018-05-24 00:18:59 +02:00
|
|
|
%if 0%{?suse_version} >= 1330
|
|
|
|
BuildRequires: libtirpc-devel
|
|
|
|
%endif
|
2018-09-25 09:15:00 +02:00
|
|
|
%if %{with_lmdb}
|
|
|
|
BuildRequires: lmdb-devel >= %{lmdb_version}
|
|
|
|
%endif
|
2019-04-22 19:10:10 +02:00
|
|
|
|
2020-03-18 16:40:31 +01:00
|
|
|
URL: https://ldb.samba.org/
|
2024-05-20 11:09:00 +02:00
|
|
|
Version: 2.9.0
|
2012-05-25 12:58:25 +02:00
|
|
|
Release: 0
|
2012-06-02 18:02:22 +02:00
|
|
|
Summary: An LDAP-like embedded database
|
2018-09-25 17:05:31 +02:00
|
|
|
License: LGPL-3.0-or-later
|
2017-10-06 11:22:06 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2015-12-16 14:15:26 +01:00
|
|
|
Source: https://download.samba.org/pub/ldb/ldb-%{version}.tar.gz
|
|
|
|
Source1: https://download.samba.org/pub/ldb/ldb-%{version}.tar.asc
|
2014-10-28 16:41:45 +01:00
|
|
|
Source2: ldb.keyring
|
2012-05-25 12:58:25 +02:00
|
|
|
Source4: baselibs.conf
|
2016-03-08 18:37:12 +01:00
|
|
|
Patch0: ldb-python3.5-fix-soabi_name.patch
|
2012-05-25 12:58:25 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
2017-10-06 11:22:06 +02:00
|
|
|
LDB is an LDAP-like embedded database.
|
2012-06-02 18:02:22 +02:00
|
|
|
|
2019-10-10 10:11:42 +02:00
|
|
|
%package -n libldb2
|
2012-06-02 18:02:22 +02:00
|
|
|
Summary: An LDAP-like embedded database
|
|
|
|
Group: System/Libraries
|
2022-01-13 23:56:53 +01:00
|
|
|
Obsoletes: libldb1 < %{version}
|
2012-06-02 18:02:22 +02:00
|
|
|
|
2019-10-10 10:11:42 +02:00
|
|
|
%description -n libldb2
|
2017-10-06 11:22:06 +02:00
|
|
|
LDB is an LDAP-like embedded database.
|
2012-06-02 18:02:22 +02:00
|
|
|
|
2019-10-10 10:11:42 +02:00
|
|
|
This package includes the ldb2 library.
|
2012-05-25 12:58:25 +02:00
|
|
|
|
2012-05-31 13:43:00 +02:00
|
|
|
%package -n libldb-devel
|
2019-10-10 10:11:42 +02:00
|
|
|
Summary: Libraries and Header Files to Develop Programs with ldb2 Support
|
2012-05-25 12:58:25 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2019-10-10 10:11:42 +02:00
|
|
|
Requires: libldb2 = %{version}
|
2014-05-23 17:59:27 +02:00
|
|
|
Requires: pkg-config
|
2012-05-25 12:58:25 +02:00
|
|
|
|
2012-05-31 13:43:00 +02:00
|
|
|
%description -n libldb-devel
|
2017-10-06 11:22:06 +02:00
|
|
|
LDB is an LDAP-like embedded database.
|
2012-06-02 18:02:22 +02:00
|
|
|
|
2019-10-10 10:11:42 +02:00
|
|
|
Libraries and Header Files to Develop Programs with ldb2 Support.
|
2012-05-25 12:58:25 +02:00
|
|
|
|
|
|
|
%package -n ldb-tools
|
2017-10-06 11:22:06 +02:00
|
|
|
Summary: Tools to manipulate LDB files
|
2012-05-25 12:58:25 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description -n ldb-tools
|
2017-10-06 11:22:06 +02:00
|
|
|
Tools to manipulate LDB files.
|
2012-05-25 12:58:25 +02:00
|
|
|
|
2015-11-11 21:35:00 +01:00
|
|
|
%package -n python3-ldb
|
|
|
|
Summary: Python3 bindings for the LDB library
|
|
|
|
Group: Development/Libraries/Python
|
2019-10-10 10:11:42 +02:00
|
|
|
Requires: libldb2 = %{version}
|
2019-04-22 19:10:10 +02:00
|
|
|
Obsoletes: python-ldb
|
2015-11-11 21:35:00 +01:00
|
|
|
|
|
|
|
%description -n python3-ldb
|
|
|
|
This package contains the python3 bindings for the LDB library.
|
|
|
|
|
|
|
|
%package -n python3-ldb-devel
|
|
|
|
Summary: Development files for the Python3 bindings for the LDB library
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: pkg-config
|
2017-10-06 11:22:06 +02:00
|
|
|
Requires: python3-ldb = %{version}
|
2019-04-22 19:10:10 +02:00
|
|
|
Obsoletes: python-ldb-devel
|
2015-11-11 21:35:00 +01:00
|
|
|
|
|
|
|
%description -n python3-ldb-devel
|
|
|
|
This package contains the development files for the Python bindings for the
|
|
|
|
LDB library.
|
|
|
|
|
2012-05-25 12:58:25 +02:00
|
|
|
%prep
|
2015-11-11 21:35:00 +01:00
|
|
|
%setup -n ldb-%{version} -q
|
2022-01-13 23:56:53 +01:00
|
|
|
%autopatch -p1
|
2012-05-25 12:58:25 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
%if 0%{?suse_version} > 1110
|
|
|
|
export SUSE_ASNEEDED=0
|
|
|
|
%endif
|
2017-10-06 11:22:06 +02:00
|
|
|
export CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS"
|
2017-10-06 10:30:56 +02:00
|
|
|
%define bundled_libs cmocka
|
2019-04-22 19:10:10 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
2017-10-06 10:30:56 +02:00
|
|
|
%ifnarch ppc
|
|
|
|
%define bundled_libs NONE
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2017-10-06 11:22:06 +02:00
|
|
|
export CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS"
|
2012-05-25 12:58:25 +02:00
|
|
|
CONFIGURE_OPTIONS="\
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libdir=%{_libdir} \
|
2012-06-28 18:35:11 +02:00
|
|
|
--disable-rpath \
|
2015-10-30 15:46:00 +01:00
|
|
|
--disable-rpath-install \
|
|
|
|
--disable-silent-rules \
|
2022-01-13 23:56:53 +01:00
|
|
|
--with-modulesdir=%{_libdir}/ldb2/modules \
|
|
|
|
--with-privatelibdir=%{_libdir}/ldb2 \
|
2017-10-06 10:30:56 +02:00
|
|
|
--bundled-libraries=%{bundled_libs} \
|
2012-08-08 11:59:51 +02:00
|
|
|
--builtin-libraries=replace \
|
2018-09-25 09:15:00 +02:00
|
|
|
%if !%{with_lmdb}
|
|
|
|
--without-ldb-lmdb \
|
|
|
|
%endif
|
2012-05-25 12:58:25 +02:00
|
|
|
"
|
|
|
|
./configure ${CONFIGURE_OPTIONS}
|
2017-10-06 11:22:06 +02:00
|
|
|
make %{?_smp_mflags} \
|
2012-05-25 12:58:25 +02:00
|
|
|
all
|
2015-10-30 15:46:00 +01:00
|
|
|
doxygen Doxyfile
|
|
|
|
# remove man page with bogus full build dir in path
|
2015-11-11 21:35:00 +01:00
|
|
|
rm -f apidocs/man/man3/_*_ldb-%{version}_include_.3
|
2012-05-25 12:58:25 +02:00
|
|
|
|
|
|
|
%check
|
2018-09-25 09:15:00 +02:00
|
|
|
%if %{with_lmdb}
|
2015-11-11 22:16:25 +01:00
|
|
|
LD_LIBRARY_PATH="bin/shared:bin/shared/private" \
|
|
|
|
LDB_MODULES_PATH="bin/modules" \
|
2017-10-06 11:22:06 +02:00
|
|
|
make test
|
2015-11-11 22:51:35 +01:00
|
|
|
%endif
|
2012-05-25 12:58:25 +02:00
|
|
|
|
|
|
|
%install
|
2017-10-06 11:22:06 +02:00
|
|
|
%make_install
|
2012-05-25 12:58:25 +02:00
|
|
|
|
2015-10-30 15:52:02 +01:00
|
|
|
# Install API documentation
|
2017-10-06 11:22:06 +02:00
|
|
|
cp -a apidocs/man/* %{buildroot}/%{_mandir}
|
2015-10-30 15:46:00 +01:00
|
|
|
|
2018-03-19 16:26:04 +01:00
|
|
|
sed -i 's;-lpyldb-util.%{py3_soflags_dash};-lpyldb-util.%{py3_soflags};g' %{buildroot}/%{_libdir}/pkgconfig/pyldb-util.%{py3_soflags}.pc
|
|
|
|
|
2019-10-10 10:11:42 +02:00
|
|
|
%post -n libldb2 -p /sbin/ldconfig
|
2012-05-25 12:58:25 +02:00
|
|
|
|
2019-10-10 10:11:42 +02:00
|
|
|
%postun -n libldb2 -p /sbin/ldconfig
|
2012-05-25 12:58:25 +02:00
|
|
|
|
2015-11-11 21:35:00 +01:00
|
|
|
%post -n python3-ldb -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n python3-ldb -p /sbin/ldconfig
|
|
|
|
|
2019-10-10 10:11:42 +02:00
|
|
|
%files -n libldb2
|
2012-05-25 12:58:25 +02:00
|
|
|
%defattr(-,root,root)
|
2022-01-13 23:56:53 +01:00
|
|
|
%{_libdir}/libldb.so.2*
|
|
|
|
%dir %{_libdir}/ldb2
|
|
|
|
%{_libdir}/ldb2/libldb-key-value.so
|
|
|
|
%{_libdir}/ldb2/libldb-tdb-err-map.so
|
|
|
|
%{_libdir}/ldb2/libldb-tdb-int.so
|
|
|
|
%dir %{_libdir}/ldb2/modules
|
|
|
|
%dir %{_libdir}/ldb2/modules/ldb
|
|
|
|
%{_libdir}/ldb2/modules/ldb/asq.so
|
|
|
|
%{_libdir}/ldb2/modules/ldb/paged_searches.so
|
|
|
|
%{_libdir}/ldb2/modules/ldb/rdn_name.so
|
|
|
|
%{_libdir}/ldb2/modules/ldb/sample.so
|
|
|
|
%{_libdir}/ldb2/modules/ldb/server_sort.so
|
|
|
|
%{_libdir}/ldb2/modules/ldb/skel.so
|
|
|
|
%{_libdir}/ldb2/modules/ldb/tdb.so
|
|
|
|
%{_libdir}/ldb2/modules/ldb/ldb.so
|
2019-04-22 19:10:10 +02:00
|
|
|
%if 0%{?suse_version} <= 1500
|
2022-01-13 23:56:53 +01:00
|
|
|
%{_libdir}/ldb2/libcmocka-ldb.so
|
2017-10-06 10:30:56 +02:00
|
|
|
%endif
|
|
|
|
%ifarch ppc
|
2022-01-13 23:56:53 +01:00
|
|
|
%{_libdir}/ldb2/libcmocka-ldb.so
|
2017-10-06 10:30:56 +02:00
|
|
|
%endif
|
2018-09-25 09:15:00 +02:00
|
|
|
%if %{with_lmdb}
|
2022-01-13 23:56:53 +01:00
|
|
|
%{_libdir}/ldb2/libldb-mdb-int.so
|
|
|
|
%{_libdir}/ldb2/modules/ldb/mdb.so
|
2018-09-25 09:15:00 +02:00
|
|
|
%endif
|
2012-05-31 13:43:00 +02:00
|
|
|
|
|
|
|
%files -n libldb-devel
|
2012-05-25 12:58:25 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/ldb.h
|
|
|
|
%{_includedir}/ldb_errors.h
|
|
|
|
%{_includedir}/ldb_handlers.h
|
|
|
|
%{_includedir}/ldb_module.h
|
|
|
|
%{_includedir}/ldb_version.h
|
|
|
|
%{_libdir}/libldb.so
|
|
|
|
%{_libdir}/pkgconfig/ldb.pc
|
2015-10-30 15:46:00 +01:00
|
|
|
%{_mandir}/man3/ldb*.3.*
|
|
|
|
%{_mandir}/man3/ldif*.3.*
|
2012-05-25 12:58:25 +02:00
|
|
|
|
|
|
|
%files -n ldb-tools
|
2012-05-31 16:04:46 +02:00
|
|
|
%defattr(-,root,root)
|
2012-05-25 12:58:25 +02:00
|
|
|
%{_bindir}/ldbadd
|
|
|
|
%{_bindir}/ldbdel
|
|
|
|
%{_bindir}/ldbedit
|
|
|
|
%{_bindir}/ldbmodify
|
|
|
|
%{_bindir}/ldbrename
|
|
|
|
%{_bindir}/ldbsearch
|
2022-01-13 23:56:53 +01:00
|
|
|
%{_libdir}/ldb2/libldb-cmdline.so
|
2015-10-30 15:46:00 +01:00
|
|
|
%{_mandir}/man1/ldbadd.1.*
|
|
|
|
%{_mandir}/man1/ldbdel.1.*
|
|
|
|
%{_mandir}/man1/ldbedit.1.*
|
|
|
|
%{_mandir}/man1/ldbmodify.1.*
|
|
|
|
%{_mandir}/man1/ldbrename.1.*
|
|
|
|
%{_mandir}/man1/ldbsearch.1.*
|
2012-05-25 12:58:25 +02:00
|
|
|
|
2015-11-11 21:35:00 +01:00
|
|
|
%files -n python3-ldb
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libpyldb-util.%{py3_soflags}.so.*
|
|
|
|
%{python3_sitearch}/_ldb_text.py
|
2015-11-11 22:27:20 +01:00
|
|
|
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 11 || 0%{?rhel_version} > 599
|
|
|
|
%{python3_sitearch}/__pycache__/_ldb_text.cpython-*.py[co]
|
|
|
|
%endif
|
2015-11-11 21:35:00 +01:00
|
|
|
%{python3_sitearch}/ldb.%{py3_soflags}.so
|
|
|
|
|
|
|
|
%files -n python3-ldb-devel
|
|
|
|
%defattr(-,root,root)
|
2019-04-22 19:10:10 +02:00
|
|
|
%{_includedir}/pyldb.h
|
2015-11-11 21:35:00 +01:00
|
|
|
%{_libdir}/libpyldb-util.%{py3_soflags}.so
|
2017-10-01 13:54:28 +02:00
|
|
|
%{_libdir}/pkgconfig/pyldb-util.%{py3_soflags}.pc
|
2019-04-22 19:10:10 +02:00
|
|
|
%{_mandir}/man3/PyLdb*.3.*
|
2015-11-11 21:35:00 +01:00
|
|
|
|
2012-05-25 12:58:25 +02:00
|
|
|
%changelog
|