]> git.pld-linux.org Git - packages/ldb.git/blame - ldb.spec
BR: pkgconfig
[packages/ldb.git] / ldb.spec
CommitLineData
22b39529 1#
e0d50568
JB
2# Conditional build:
3%bcond_without lmdb # LMDB module (64-bit only)
e0d50568
JB
4#
5%ifnarch %{x8664} aarch64 alpha mips64 ppc64 s390x sparc64
22b39529 6# lmdb support requires 64-bit size_t
e0d50568 7%undefine with_lmdb
22b39529 8%endif
bf957a46
JP
9%define talloc_version 2:2.4.0
10%define tdb_version 2:1.4.8
11%define tevent_version 0.14.1
9c196e2c
JB
12Summary: LDAP-like embedded database
13Summary(pl.UTF-8): Wbudowana baza danych podobna do LDAP
cd178619 14Name: ldb
726c4517
AM
15Version: 2.7.1
16Release: 1
2a1bfbb9 17License: LGPL v3+
56acf5d3 18Group: Libraries
de67fb3a 19Source0: https://download.samba.org/pub/ldb/%{name}-%{version}.tar.gz
726c4517 20# Source0-md5: e443a8da17758479c3b5c542e8e3ff1a
48c72eca 21URL: https://ldb.samba.org/
b3d015f4 22BuildRequires: cmocka-devel >= 1.1.3
2a1bfbb9 23BuildRequires: docbook-style-xsl
997f0942 24BuildRequires: docbook-style-xsl-nons
74bbb006 25BuildRequires: libbsd-devel
e0d50568 26BuildRequires: libxslt-progs
22b39529 27%{?with_lmdb:BuildRequires: lmdb-devel >= 0.9.16}
31ad34c3 28BuildRequires: openldap-devel
6cc4c977 29BuildRequires: pkgconfig
074f9f52 30BuildRequires: popt-devel >= 1.6
bf957a46 31BuildRequires: python3-devel >= 1:3.6
e0d50568
JB
32BuildRequires: python3-talloc-devel >= %{talloc_version}
33BuildRequires: python3-tdb >= %{tdb_version}
34BuildRequires: python3-tevent >= %{tevent_version}
23ee5a82 35BuildRequires: rpmbuild(macros) >= 1.704
9c196e2c 36BuildRequires: talloc-devel >= %{talloc_version}
2a1bfbb9
ER
37BuildRequires: tdb-devel >= %{tdb_version}
38BuildRequires: tevent-devel >= %{tevent_version}
82c5ae93 39%{?with_lmdb:Requires: lmdb-libs >= 0.9.16}
9c196e2c 40Requires: talloc >= %{talloc_version}
2a1bfbb9
ER
41Requires: tdb >= %{tdb_version}
42Requires: tevent >= %{tevent_version}
074f9f52 43Requires: popt >= 1.6
cd178619
ER
44Provides: libldb = %{version}-%{release}
45Obsoletes: libldb < 1.1.0-3
23ee5a82 46# ldb 1.6+ dropped python2 support
5d02873c
JB
47Obsoletes: python-ldb < 1.6
48Obsoletes: python-ldb-devel < 1.6
2a1bfbb9
ER
49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51%description
52An extensible library that implements an LDAP like API to access
53remote LDAP servers, or use local tdb databases.
54
9c196e2c
JB
55%description -l pl.UTF-8
56Rozszerzalna biblioteka implementująca API podobne do LDAP pozwalające
57na dostęp do zdalnych serwerów LDAP lub wykorzystanie lokalnych baz
58danych tdb.
59
cd178619 60%package tools
2a1bfbb9 61Summary: Tools to manage LDB files
9c196e2c
JB
62Summary(pl.UTF-8): Narzędzia do zarządzania plikami LDB
63Group: Applications/Databases
2a1bfbb9
ER
64Requires: %{name} = %{version}-%{release}
65
cd178619 66%description tools
2a1bfbb9
ER
67Tools to manage LDB files.
68
9c196e2c
JB
69%description tools -l pl.UTF-8
70Narzędzia do zarządzania plikami LDB.
71
2a1bfbb9 72%package devel
9c196e2c
JB
73Summary: Header files for the LDB library
74Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LDB
2a1bfbb9
ER
75Group: Development/Libraries
76Requires: %{name} = %{version}-%{release}
9c196e2c 77Requires: talloc-devel >= %{talloc_version}
2a1bfbb9
ER
78Requires: tdb-devel >= %{tdb_version}
79Requires: tevent-devel >= %{tevent_version}
cd178619
ER
80Provides: libldb-devel = %{version}-%{release}
81Obsoletes: libldb-devel < 1.1.0-3
2a1bfbb9
ER
82
83%description devel
84Header files needed to develop programs that link against the LDB
85library.
86
9c196e2c
JB
87%description devel -l pl.UTF-8
88Pliki nagłówkowe potrzebne do tworzenia programów wykorzystujących
89bibliotekę LDB.
90
e0d50568
JB
91%package -n python3-ldb
92Summary: Python 3 bindings for the LDB library
93Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki LDB
94Group: Libraries/Python
95Requires: %{name} = %{version}-%{release}
96Requires: python3-tdb >= %{tdb_version}
5d02873c 97Obsoletes: pyldb < 1.1.0-1
e0d50568
JB
98
99%description -n python3-ldb
100Python 3 bindings for the LDB library.
101
102%description -n python3-ldb -l pl.UTF-8
103Wiązania Pythona 3 do biblioteki LDB.
104
105%package -n python3-ldb-devel
106Summary: Development files for the Python 3 bindings for the LDB library
107Summary(pl.UTF-8): Pliki programistyczne wiązań Pythona 3 do biblioteki LDB
108Group: Development/Libraries
109Requires: python3-ldb = %{version}-%{release}
110
111%description -n python3-ldb-devel
112Development files for the Python 3 bindings for the LDB library.
113
114%description -n python3-ldb-devel -l pl.UTF-8
115Pliki programistyczne wiązań Pythona 3 do biblioteki LDB.
2a1bfbb9
ER
116
117%prep
cd178619 118%setup -q
2a1bfbb9
ER
119
120%build
2a1bfbb9
ER
121CC="%{__cc}" \
122CFLAGS="%{rpmcflags}" \
2a1bfbb9
ER
123./configure \
124 --prefix=%{_prefix} \
125 --libdir=%{_libdir} \
126 --with-modulesdir=%{_libdir}/ldb/modules \
127 --with-privatelibdir=%{_libdir}/ldb \
128 --bundled-libraries=NONE \
129 --disable-rpath \
bc22b6e6 130 --disable-rpath-install
2a1bfbb9
ER
131
132%{__make} \
133 V=1
134
135%install
136rm -rf $RPM_BUILD_ROOT
137%{__make} install \
138 DESTDIR=$RPM_BUILD_ROOT
139
e0d50568
JB
140%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
141%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
e0d50568 142
2a1bfbb9
ER
143# Shared libraries need to be marked executable for
144# rpmbuild to strip them and include them in debuginfo
88ce4cc5 145find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} ';'
2a1bfbb9
ER
146
147%clean
148rm -rf $RPM_BUILD_ROOT
149
150%post -p /sbin/ldconfig
151%postun -p /sbin/ldconfig
152
e0d50568
JB
153%post -n python3-ldb -p /sbin/ldconfig
154%postun -n python3-ldb -p /sbin/ldconfig
155
2a1bfbb9
ER
156%files
157%defattr(644,root,root,755)
97bd97ed 158%attr(755,root,root) %{_libdir}/libldb.so.*.*.*
bc22b6e6 159%attr(755,root,root) %ghost %{_libdir}/libldb.so.2
2a1bfbb9 160%dir %{_libdir}/ldb
793121f1 161%attr(755,root,root) %{_libdir}/ldb/libldb-key-value.so
e7bf297e
AG
162%attr(755,root,root) %{_libdir}/ldb/libldb-tdb-err-map.so
163%attr(755,root,root) %{_libdir}/ldb/libldb-tdb-int.so
22b39529 164%{?with_lmdb:%attr(755,root,root) %{_libdir}/ldb/libldb-mdb-int.so}
2a1bfbb9
ER
165%dir %{_libdir}/ldb/modules
166%dir %{_libdir}/ldb/modules/ldb
9c196e2c 167%attr(755,root,root) %{_libdir}/ldb/modules/ldb/*.so
2a1bfbb9 168
9c196e2c 169%files tools
2a1bfbb9
ER
170%defattr(644,root,root,755)
171%attr(755,root,root) %{_bindir}/ldbadd
172%attr(755,root,root) %{_bindir}/ldbdel
173%attr(755,root,root) %{_bindir}/ldbedit
174%attr(755,root,root) %{_bindir}/ldbmodify
175%attr(755,root,root) %{_bindir}/ldbrename
176%attr(755,root,root) %{_bindir}/ldbsearch
9c196e2c
JB
177%attr(755,root,root) %{_libdir}/ldb/libldb-cmdline.so
178%{_mandir}/man1/ldbadd.1*
179%{_mandir}/man1/ldbdel.1*
180%{_mandir}/man1/ldbedit.1*
181%{_mandir}/man1/ldbmodify.1*
182%{_mandir}/man1/ldbrename.1*
183%{_mandir}/man1/ldbsearch.1*
2a1bfbb9
ER
184
185%files devel
186%defattr(644,root,root,755)
9c196e2c 187%attr(755,root,root) %{_libdir}/libldb.so
2a1bfbb9
ER
188%{_includedir}/ldb_module.h
189%{_includedir}/ldb_handlers.h
190%{_includedir}/ldb_errors.h
191%{_includedir}/ldb_version.h
192%{_includedir}/ldb.h
2a1bfbb9
ER
193%{_pkgconfigdir}/ldb.pc
194%{_mandir}/man3/ldb.3*
195
e0d50568
JB
196%files -n python3-ldb
197%defattr(644,root,root,755)
198%attr(755,root,root) %{_libdir}/libpyldb-util.cpython-3*.so.*.*.*
bc22b6e6 199%attr(755,root,root) %ghost %{_libdir}/libpyldb-util.cpython-3*.so.2
e0d50568
JB
200%attr(755,root,root) %{py3_sitedir}/ldb.cpython-*.so
201%{py3_sitedir}/_ldb_text.py
202%{py3_sitedir}/__pycache__/_ldb_text.cpython-*.py[co]
203
204%files -n python3-ldb-devel
205%defattr(644,root,root,755)
206%attr(755,root,root) %{_libdir}/libpyldb-util.cpython-3*.so
207%{_includedir}/pyldb.h
208%{_pkgconfigdir}/pyldb-util.cpython-3*.pc
This page took 0.327888 seconds and 4 git commands to generate.