X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=ldb.spec;h=5078d4485e5cc83a64e87c1f4a8ec675d0b74524;hb=5d02873;hp=36a84b0dd28fe3763854bc175a0b817bb8526de6;hpb=cd178619669cbe2cae29d7b2c16779ae6bc46a1d;p=packages%2Fldb.git diff --git a/ldb.spec b/ldb.spec index 36a84b0..5078d44 100644 --- a/ldb.spec +++ b/ldb.spec @@ -1,52 +1,78 @@ -# TODO -# - ld.bfd enforced because gold does not understand '!' in version script (binutils-3:2.21.53.0.1-1) -%define talloc_version 2.0.5 -%define tdb_version 1.2.9 -%define tevent_version 0.9.12 -Summary: A schema-less, ldap like, API and database +# +# Conditional build: +%bcond_without lmdb # LMDB module (64-bit only) +# +%ifnarch %{x8664} aarch64 alpha mips64 ppc64 s390x sparc64 +# lmdb support requires 64-bit size_t +%undefine with_lmdb +%endif +%define talloc_version 2:2.3.1 +%define tdb_version 2:1.4.3 +%define tevent_version 0.10.2 +Summary: LDAP-like embedded database +Summary(pl.UTF-8): Wbudowana baza danych podobna do LDAP Name: ldb -Version: 1.1.0 -Release: 3 +Version: 2.2.1 +Release: 1 License: LGPL v3+ -Group: Development/Libraries -URL: http://ldb.samba.org/ -Source0: http://samba.org/ftp/ldb/%{name}-%{version}.tar.gz -# Source0-md5: 61145ad9cfe017ce4fca5cbc77b9552b -BuildRequires: autoconf +Group: Libraries +Source0: https://download.samba.org/pub/ldb/%{name}-%{version}.tar.gz +# Source0-md5: 3bc1e8a13cdc80fe43997e5492e7ce40 +URL: https://ldb.samba.org/ +BuildRequires: cmocka-devel >= 1.1.3 BuildRequires: docbook-style-xsl -BuildRequires: libtalloc-devel >= %{talloc_version} -BuildRequires: libxslt -BuildRequires: popt-devel -BuildRequires: python-devel -BuildRequires: python-talloc-devel -BuildRequires: python-tdb +BuildRequires: libbsd-devel +BuildRequires: libxslt-progs +%{?with_lmdb:BuildRequires: lmdb-devel >= 0.9.16} +BuildRequires: openldap-devel +BuildRequires: popt-devel >= 1.6 +BuildRequires: python3-devel >= 1:3.2 +BuildRequires: python3-talloc-devel >= %{talloc_version} +BuildRequires: python3-tdb >= %{tdb_version} +BuildRequires: python3-tevent >= %{tevent_version} +BuildRequires: rpmbuild(macros) >= 1.704 +BuildRequires: talloc-devel >= %{talloc_version} BuildRequires: tdb-devel >= %{tdb_version} BuildRequires: tevent-devel >= %{tevent_version} -Requires: libtalloc >= %{talloc_version} +%{?with_lmdb:Requires: lmdb >= 0.9.16} +Requires: talloc >= %{talloc_version} Requires: tdb >= %{tdb_version} Requires: tevent >= %{tevent_version} +Requires: popt >= 1.6 Provides: libldb = %{version}-%{release} Obsoletes: libldb < 1.1.0-3 +# ldb 1.6+ dropped python2 support +Obsoletes: python-ldb < 1.6 +Obsoletes: python-ldb-devel < 1.6 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description An extensible library that implements an LDAP like API to access remote LDAP servers, or use local tdb databases. +%description -l pl.UTF-8 +Rozszerzalna biblioteka implementująca API podobne do LDAP pozwalające +na dostęp do zdalnych serwerów LDAP lub wykorzystanie lokalnych baz +danych tdb. + %package tools Summary: Tools to manage LDB files -Group: Development/Libraries +Summary(pl.UTF-8): Narzędzia do zarządzania plikami LDB +Group: Applications/Databases Requires: %{name} = %{version}-%{release} %description tools Tools to manage LDB files. +%description tools -l pl.UTF-8 +Narzędzia do zarządzania plikami LDB. + %package devel -Summary: Developer tools for the LDB library +Summary: Header files for the LDB library +Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LDB Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: libtalloc-devel >= %{talloc_version} -Requires: pkgconfig +Requires: talloc-devel >= %{talloc_version} Requires: tdb-devel >= %{tdb_version} Requires: tevent-devel >= %{tevent_version} Provides: libldb-devel = %{version}-%{release} @@ -56,23 +82,35 @@ Obsoletes: libldb-devel < 1.1.0-3 Header files needed to develop programs that link against the LDB library. -%package -n python-ldb -Summary: Python bindings for the LDB library -Group: Development/Libraries +%description devel -l pl.UTF-8 +Pliki nagłówkowe potrzebne do tworzenia programów wykorzystujących +bibliotekę LDB. + +%package -n python3-ldb +Summary: Python 3 bindings for the LDB library +Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki LDB +Group: Libraries/Python Requires: %{name} = %{version}-%{release} -Requires: python-tdb = %{tdb_version} -Obsoletes: pyldb +Requires: python3-tdb >= %{tdb_version} +Obsoletes: pyldb < 1.1.0-1 + +%description -n python3-ldb +Python 3 bindings for the LDB library. -%description -n python-ldb -Python bindings for the LDB library. +%description -n python3-ldb -l pl.UTF-8 +Wiązania Pythona 3 do biblioteki LDB. -%package -n python-ldb-devel -Summary: Development files for the Python bindings for the LDB library +%package -n python3-ldb-devel +Summary: Development files for the Python 3 bindings for the LDB library +Summary(pl.UTF-8): Pliki programistyczne wiązań Pythona 3 do biblioteki LDB Group: Development/Libraries -Requires: python-ldb = %{version}-%{release} +Requires: python3-ldb = %{version}-%{release} -%description -n python-ldb-devel -Development files for the Python bindings for the LDB library +%description -n python3-ldb-devel +Development files for the Python 3 bindings for the LDB library. + +%description -n python3-ldb-devel -l pl.UTF-8 +Pliki programistyczne wiązań Pythona 3 do biblioteki LDB. %prep %setup -q @@ -80,8 +118,6 @@ Development files for the Python bindings for the LDB library %build CC="%{__cc}" \ CFLAGS="%{rpmcflags}" \ -LDFLAGS="%{rpmldflags} -fuse-ld=bfd" \ -PYTHONDIR=%{py_sitedir} \ ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ @@ -99,8 +135,8 @@ rm -rf $RPM_BUILD_ROOT %{__make} install \ DESTDIR=$RPM_BUILD_ROOT -# Remove _tevent.so (it's managed by python-tevent) -%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_tevent.so +%py3_comp $RPM_BUILD_ROOT%{py3_sitedir} +%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} # Shared libraries need to be marked executable for # rpmbuild to strip them and include them in debuginfo @@ -112,18 +148,23 @@ rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig -%post -n python-ldb -p /sbin/ldconfig -%postun -n python-ldb -p /sbin/ldconfig +%post -n python3-ldb -p /sbin/ldconfig +%postun -n python3-ldb -p /sbin/ldconfig %files %defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libldb.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libldb.so.2 %dir %{_libdir}/ldb -%{_libdir}/libldb.so.* +%attr(755,root,root) %{_libdir}/ldb/libldb-key-value.so +%attr(755,root,root) %{_libdir}/ldb/libldb-tdb-err-map.so +%attr(755,root,root) %{_libdir}/ldb/libldb-tdb-int.so +%{?with_lmdb:%attr(755,root,root) %{_libdir}/ldb/libldb-mdb-int.so} %dir %{_libdir}/ldb/modules %dir %{_libdir}/ldb/modules/ldb -%{_libdir}/ldb/modules/ldb/*.so +%attr(755,root,root) %{_libdir}/ldb/modules/ldb/*.so -%files -n ldb-tools +%files tools %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/ldbadd %attr(755,root,root) %{_bindir}/ldbdel @@ -131,33 +172,35 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/ldbmodify %attr(755,root,root) %{_bindir}/ldbrename %attr(755,root,root) %{_bindir}/ldbsearch -%{_libdir}/ldb/libldb-cmdline.so -%{_mandir}/man1/ldbadd.1.* -%{_mandir}/man1/ldbdel.1.* -%{_mandir}/man1/ldbedit.1.* -%{_mandir}/man1/ldbmodify.1.* -%{_mandir}/man1/ldbrename.1.* -%{_mandir}/man1/ldbsearch.1.* +%attr(755,root,root) %{_libdir}/ldb/libldb-cmdline.so +%{_mandir}/man1/ldbadd.1* +%{_mandir}/man1/ldbdel.1* +%{_mandir}/man1/ldbedit.1* +%{_mandir}/man1/ldbmodify.1* +%{_mandir}/man1/ldbrename.1* +%{_mandir}/man1/ldbsearch.1* %files devel %defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libldb.so %{_includedir}/ldb_module.h %{_includedir}/ldb_handlers.h %{_includedir}/ldb_errors.h %{_includedir}/ldb_version.h %{_includedir}/ldb.h -%{_libdir}/libldb.so - %{_pkgconfigdir}/ldb.pc %{_mandir}/man3/ldb.3* -%files -n python-ldb +%files -n python3-ldb %defattr(644,root,root,755) -%{py_sitedir}/ldb.so -%{_libdir}/libpyldb-util.so.1* +%attr(755,root,root) %{_libdir}/libpyldb-util.cpython-3*.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libpyldb-util.cpython-3*.so.2 +%attr(755,root,root) %{py3_sitedir}/ldb.cpython-*.so +%{py3_sitedir}/_ldb_text.py +%{py3_sitedir}/__pycache__/_ldb_text.cpython-*.py[co] -%files -n python-ldb-devel +%files -n python3-ldb-devel %defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libpyldb-util.cpython-3*.so %{_includedir}/pyldb.h -%{_libdir}/libpyldb-util.so -%{_pkgconfigdir}/pyldb-util.pc +%{_pkgconfigdir}/pyldb-util.cpython-3*.pc