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