]> git.pld-linux.org Git - packages/tdb.git/blob - tdb.spec
- rebuild with python 3.8
[packages/tdb.git] / tdb.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x binding
4
5 Summary:        TDB - Trivial Database
6 Summary(pl.UTF-8):      TDB - prosta baza danych
7 Name:           tdb
8 Version:        1.3.18
9 Release:        2
10 Epoch:          2
11 License:        LGPL v3+
12 Group:          Libraries
13 Source0:        https://www.samba.org/ftp/tdb/%{name}-%{version}.tar.gz
14 # Source0-md5:  fdb34ed48478a084e9e0c310cc178e87
15 URL:            http://tdb.samba.org/
16 %{?with_python2:BuildRequires:  python-devel >= 1:2.4.2}
17 BuildRequires:  python3-devel >= 1:3.2
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.219
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
40 Requires:       %{name} = %{epoch}:%{version}-%{release}
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
50 Summary:        Python 2 bindings for TDB
51 Summary(pl.UTF-8):      Interfejs Pythona 2 do TDB
52 Group:          Libraries/Python
53 Requires:       %{name} = %{epoch}:%{version}-%{release}
54 Requires:       python-libs >= 1:2.4.2
55
56 %description -n python-tdb
57 Python 2 bindings for TDB.
58
59 %description -n python-tdb -l pl.UTF-8
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.
74
75 %prep
76 %setup -q
77
78 %build
79 export JOBS=1
80
81 CC="%{__cc}" \
82 CFLAGS="%{rpmcflags}" \
83 %{__python3} buildtools/bin/waf configure \
84         --prefix=%{_prefix} \
85         --libdir=%{_libdir} \
86         --disable-rpath \
87         %{?with_python2:--extra-python=%{__python}}
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
98 %if %{with python2}
99 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
100 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
101 %py_postclean
102 %endif
103
104 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
105 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %post   -p /sbin/ldconfig
111 %postun -p /sbin/ldconfig
112
113 %triggerpostun -p /sbin/postshell -- tdb < 2:1.2.9-2
114 -rm -f %{_libdir}/libtdb.so.1
115 /sbin/ldconfig
116
117 %files
118 %defattr(644,root,root,755)
119 %doc docs/{README,mutex.txt,tracing.txt}
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
137 %if %{with python2}
138 %files -n python-tdb
139 %defattr(644,root,root,755)
140 %attr(755,root,root) %{py_sitedir}/tdb.so
141 %{py_sitedir}/_tdb_text.py[co]
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]
This page took 0.075525 seconds and 4 git commands to generate.