]>
Commit | Line | Data |
---|---|---|
b68854ec JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x binding | |
4 | ||
44928e20 JB |
5 | Summary: TDB - Trivial Database |
6 | Summary(pl.UTF-8): TDB - prosta baza danych | |
7 | Name: tdb | |
b68854ec | 8 | Version: 1.3.18 |
d740d517 | 9 | Release: 2 |
28d9516b | 10 | Epoch: 2 |
44928e20 JB |
11 | License: LGPL v3+ |
12 | Group: Libraries | |
ef814a2e | 13 | Source0: https://www.samba.org/ftp/tdb/%{name}-%{version}.tar.gz |
b68854ec | 14 | # Source0-md5: fdb34ed48478a084e9e0c310cc178e87 |
44928e20 | 15 | URL: http://tdb.samba.org/ |
b68854ec JB |
16 | %{?with_python2:BuildRequires: python-devel >= 1:2.4.2} |
17 | BuildRequires: python3-devel >= 1:3.2 | |
44928e20 | 18 | BuildRequires: rpm-pythonprov |
b52f5dd2 | 19 | BuildRequires: rpmbuild(macros) >= 1.219 |
44928e20 JB |
20 | Obsoletes: tdb-extras |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | TDB is a Trivial Database. In concept, it is very much like GDBM, and | |
25 | BSD's DB except that it allows multiple simultaneous writers and uses | |
26 | locking internally to keep writers from trampling on each other. TDB | |
27 | is also extremely small. | |
28 | ||
29 | %description -l pl.UTF-8 | |
30 | TDB to Trivial Database, czyli prosta baza danych. W założeniach jest | |
31 | bardzo podobna do GDBM lub DB z BSD z wyjątkiem tego, że pozwala na | |
32 | zapis wielu procesom jednocześnie i używa wewnętrznie blokowania, aby | |
33 | nie pozwolić piszącym na zadeptanie się nawzajem. TDB jest ponadto | |
34 | ekstremalnie mała. | |
35 | ||
36 | %package devel | |
37 | Summary: Header files for TDB library | |
38 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki TDB | |
39 | Group: Development/Libraries | |
414a27b5 | 40 | Requires: %{name} = %{epoch}:%{version}-%{release} |
44928e20 JB |
41 | Obsoletes: tdb-static |
42 | ||
43 | %description devel | |
44 | Header files for TDB library. | |
45 | ||
46 | %description devel -l pl.UTF-8 | |
47 | Pliki nagłówkowe biblioteki TDB. | |
48 | ||
49 | %package -n python-tdb | |
b68854ec JB |
50 | Summary: Python 2 bindings for TDB |
51 | Summary(pl.UTF-8): Interfejs Pythona 2 do TDB | |
44928e20 | 52 | Group: Libraries/Python |
414a27b5 | 53 | Requires: %{name} = %{epoch}:%{version}-%{release} |
b68854ec | 54 | Requires: python-libs >= 1:2.4.2 |
44928e20 JB |
55 | |
56 | %description -n python-tdb | |
b68854ec | 57 | Python 2 bindings for TDB. |
44928e20 JB |
58 | |
59 | %description -n python-tdb -l pl.UTF-8 | |
b68854ec JB |
60 | Interfejs Pythona 2 do TDB. |
61 | ||
62 | %package -n python3-tdb | |
63 | Summary: Python 3 bindings for TDB | |
64 | Summary(pl.UTF-8): Interfejs Pythona 3 do TDB | |
65 | Group: Libraries/Python | |
66 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
67 | Requires: python3-libs >= 1:3.2 | |
68 | ||
69 | %description -n python3-tdb | |
70 | Python 3 bindings for TDB. | |
71 | ||
72 | %description -n python3-tdb -l pl.UTF-8 | |
73 | Interfejs Pythona 3 do TDB. | |
44928e20 JB |
74 | |
75 | %prep | |
76 | %setup -q | |
77 | ||
78 | %build | |
b68854ec JB |
79 | export JOBS=1 |
80 | ||
44928e20 JB |
81 | CC="%{__cc}" \ |
82 | CFLAGS="%{rpmcflags}" \ | |
b68854ec | 83 | %{__python3} buildtools/bin/waf configure \ |
44928e20 | 84 | --prefix=%{_prefix} \ |
8d9a2737 | 85 | --libdir=%{_libdir} \ |
b68854ec JB |
86 | --disable-rpath \ |
87 | %{?with_python2:--extra-python=%{__python}} | |
44928e20 JB |
88 | |
89 | %{__make} \ | |
90 | V=1 | |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %{__make} install \ | |
96 | DESTDIR=$RPM_BUILD_ROOT | |
97 | ||
b68854ec | 98 | %if %{with python2} |
b52f5dd2 JB |
99 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
100 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
101 | %py_postclean | |
b68854ec JB |
102 | %endif |
103 | ||
104 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} | |
105 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
b52f5dd2 | 106 | |
44928e20 JB |
107 | %clean |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
110 | %post -p /sbin/ldconfig | |
111 | %postun -p /sbin/ldconfig | |
112 | ||
2f854ee1 | 113 | %triggerpostun -p /sbin/postshell -- tdb < 2:1.2.9-2 |
28d9516b ER |
114 | -rm -f %{_libdir}/libtdb.so.1 |
115 | /sbin/ldconfig | |
116 | ||
44928e20 JB |
117 | %files |
118 | %defattr(644,root,root,755) | |
6b40aa48 | 119 | %doc docs/{README,mutex.txt,tracing.txt} |
44928e20 JB |
120 | %attr(755,root,root) %{_bindir}/tdbbackup |
121 | %attr(755,root,root) %{_bindir}/tdbdump | |
122 | %attr(755,root,root) %{_bindir}/tdbrestore | |
123 | %attr(755,root,root) %{_bindir}/tdbtool | |
124 | %attr(755,root,root) %{_libdir}/libtdb.so.*.*.* | |
125 | %attr(755,root,root) %ghost %{_libdir}/libtdb.so.1 | |
126 | %{_mandir}/man8/tdbbackup.8* | |
127 | %{_mandir}/man8/tdbdump.8* | |
128 | %{_mandir}/man8/tdbrestore.8* | |
129 | %{_mandir}/man8/tdbtool.8* | |
130 | ||
131 | %files devel | |
132 | %defattr(644,root,root,755) | |
133 | %attr(755,root,root) %{_libdir}/libtdb.so | |
134 | %{_includedir}/tdb.h | |
135 | %{_pkgconfigdir}/tdb.pc | |
136 | ||
b68854ec | 137 | %if %{with python2} |
44928e20 JB |
138 | %files -n python-tdb |
139 | %defattr(644,root,root,755) | |
140 | %attr(755,root,root) %{py_sitedir}/tdb.so | |
b52f5dd2 | 141 | %{py_sitedir}/_tdb_text.py[co] |
b68854ec JB |
142 | %endif |
143 | ||
144 | %files -n python3-tdb | |
145 | %defattr(644,root,root,755) | |
146 | %attr(755,root,root) %{py3_sitedir}/tdb.cpython-*.so | |
147 | %{py3_sitedir}/_tdb_text.py | |
148 | %{py3_sitedir}/__pycache__/_tdb_text.cpython-*.py[co] |