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