]> git.pld-linux.org Git - packages/ldb.git/blob - ldb.spec
- up to 2.1.1
[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.3.1
10 %define         tdb_version     2:1.4.3
11 %define         tevent_version  0.10.2
12 Summary:        LDAP-like embedded database
13 Summary(pl.UTF-8):      Wbudowana baza danych podobna do LDAP
14 Name:           ldb
15 Version:        2.1.1
16 Release:        1
17 License:        LGPL v3+
18 Group:          Libraries
19 Source0:        https://www.samba.org/ftp/ldb/%{name}-%{version}.tar.gz
20 # Source0-md5:  cd80ed96c516aee0225b62b464346e8a
21 URL:            https://ldb.samba.org/
22 BuildRequires:  cmocka-devel >= 1.1.3
23 BuildRequires:  docbook-style-xsl
24 BuildRequires:  libbsd-devel
25 BuildRequires:  libxslt-progs
26 %{?with_lmdb:BuildRequires:     lmdb-devel >= 0.9.16}
27 BuildRequires:  openldap-devel
28 BuildRequires:  popt-devel >= 1.6
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}
33 BuildRequires:  rpmbuild(macros) >= 1.704
34 BuildRequires:  talloc-devel >= %{talloc_version}
35 BuildRequires:  tdb-devel >= %{tdb_version}
36 BuildRequires:  tevent-devel >= %{tevent_version}
37 %{?with_lmdb:Requires:  lmdb >= 0.9.16}
38 Requires:       talloc >= %{talloc_version}
39 Requires:       tdb >= %{tdb_version}
40 Requires:       tevent >= %{tevent_version}
41 Requires:       popt >= 1.6
42 Provides:       libldb = %{version}-%{release}
43 Obsoletes:      libldb < 1.1.0-3
44 # ldb 1.6+ dropped python2 support
45 Obsoletes:      python-ldb
46 Obsoletes:      python-ldb-devel
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
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
58 %package tools
59 Summary:        Tools to manage LDB files
60 Summary(pl.UTF-8):      Narzędzia do zarządzania plikami LDB
61 Group:          Applications/Databases
62 Requires:       %{name} = %{version}-%{release}
63
64 %description tools
65 Tools to manage LDB files.
66
67 %description tools -l pl.UTF-8
68 Narzędzia do zarządzania plikami LDB.
69
70 %package devel
71 Summary:        Header files for the LDB library
72 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki LDB
73 Group:          Development/Libraries
74 Requires:       %{name} = %{version}-%{release}
75 Requires:       talloc-devel >= %{talloc_version}
76 Requires:       tdb-devel >= %{tdb_version}
77 Requires:       tevent-devel >= %{tevent_version}
78 Provides:       libldb-devel = %{version}-%{release}
79 Obsoletes:      libldb-devel < 1.1.0-3
80
81 %description devel
82 Header files needed to develop programs that link against the LDB
83 library.
84
85 %description devel -l pl.UTF-8
86 Pliki nagłówkowe potrzebne do tworzenia programów wykorzystujących
87 bibliotekę LDB.
88
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.
114
115 %prep
116 %setup -q
117
118 %build
119 CC="%{__cc}" \
120 CFLAGS="%{rpmcflags}" \
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 \
128         --disable-rpath-install
129
130 %{__make} \
131         V=1
132
133 %install
134 rm -rf $RPM_BUILD_ROOT
135 %{__make} install \
136         DESTDIR=$RPM_BUILD_ROOT
137
138 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
139 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
140
141 # Shared libraries need to be marked executable for
142 # rpmbuild to strip them and include them in debuginfo
143 find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} ';'
144
145 %clean
146 rm -rf $RPM_BUILD_ROOT
147
148 %post   -p /sbin/ldconfig
149 %postun -p /sbin/ldconfig
150
151 %post   -n python3-ldb -p /sbin/ldconfig
152 %postun -n python3-ldb -p /sbin/ldconfig
153
154 %files
155 %defattr(644,root,root,755)
156 %attr(755,root,root) %{_libdir}/libldb.so.*.*.*
157 %attr(755,root,root) %ghost %{_libdir}/libldb.so.2
158 %dir %{_libdir}/ldb
159 %attr(755,root,root) %{_libdir}/ldb/libldb-key-value.so
160 %attr(755,root,root) %{_libdir}/ldb/libldb-tdb-err-map.so
161 %attr(755,root,root) %{_libdir}/ldb/libldb-tdb-int.so
162 %{?with_lmdb:%attr(755,root,root) %{_libdir}/ldb/libldb-mdb-int.so}
163 %dir %{_libdir}/ldb/modules
164 %dir %{_libdir}/ldb/modules/ldb
165 %attr(755,root,root) %{_libdir}/ldb/modules/ldb/*.so
166
167 %files tools
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
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*
182
183 %files devel
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_libdir}/libldb.so
186 %{_includedir}/ldb_module.h
187 %{_includedir}/ldb_handlers.h
188 %{_includedir}/ldb_errors.h
189 %{_includedir}/ldb_version.h
190 %{_includedir}/ldb.h
191 %{_pkgconfigdir}/ldb.pc
192 %{_mandir}/man3/ldb.3*
193
194 %files -n python3-ldb
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_libdir}/libpyldb-util.cpython-3*.so.*.*.*
197 %attr(755,root,root) %ghost %{_libdir}/libpyldb-util.cpython-3*.so.2
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
This page took 0.057282 seconds and 3 git commands to generate.