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