]> git.pld-linux.org Git - packages/db4.2.git/blob - db4.2.spec
- R: jpackage-utils for %{_javadir}
[packages/db4.2.git] / db4.2.spec
1 #
2 # Conditional build:
3 %bcond_with     java    # build db-java
4 %bcond_without  tcl     # don't build Tcl bindings
5 %bcond_with     pmutex  # use POSIX mutexes (only process-private with linuxthreads)
6 %bcond_with     nptl    # use process-shared POSIX mutexes (NPTL provides full interface)
7 #
8 %{?with_nptl:%define    with_pmutex     1}
9 Summary:        Berkeley DB database library for C
10 Summary(pl.UTF-8):      Biblioteka C do obsługi baz Berkeley DB
11 Name:           db4.2
12 Version:        4.2.52
13 Release:        1
14 License:        Sleepycat public license (GPL-like, see LICENSE)
15 Group:          Libraries
16 # alternative site (sometimes working): http://www.berkeleydb.com/
17 #Source0Download: http://dev.sleepycat.com/downloads/releasehistorybdb.html
18 Source0:        http://downloads.sleepycat.com/db-%{version}.tar.gz
19 # Source0-md5:  cbc77517c9278cdb47613ce8cb55779f
20 Patch0:         db-so-suffix.patch
21 Patch1:         patch.4.2.52.1
22 Patch2:         patch.4.2.52.2
23 Patch3:         patch.4.2.52.3
24 Patch4:         patch.4.2.52.4
25 Patch5:         %{name}-amd64-fastmutex.patch
26 URL:            http://www.sleepycat.com/
27 BuildRequires:  autoconf
28 BuildRequires:  automake
29 BuildRequires:  ed
30 %{?with_java:BuildRequires:     jdk}
31 BuildRequires:  libstdc++-devel
32 BuildRequires:  libtool
33 BuildRequires:  rpmbuild(macros) >= 1.164
34 BuildRequires:  sed >= 4.0
35 %{?with_tcl:BuildRequires:      tcl-devel >= 8.4.0}
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         _includedir     %{_prefix}/include/db4.2
39
40 %description
41 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
42 provides embedded database support for both traditional and
43 client/server applications. Berkeley DB is used by many applications,
44 including Python and Perl, so this should be installed on all systems.
45
46 %description -l pl.UTF-8
47 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
48 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
49 klient-serwer. Berkeley db jest używana w wielu aplikacjach, w tym w
50 Pythonie i Perlu.
51
52 %package devel
53 Summary:        Header files for Berkeley database library
54 Summary(pl.UTF-8):      Pliki nagłówkowe do biblioteki Berkeley Database
55 Group:          Development/Libraries
56 Requires:       %{name} = %{epoch}:%{version}-%{release}
57
58 %description devel
59 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
60 provides embedded database support for both traditional and
61 client/server applications. Berkeley DB includes B+tree, Extended
62 Linear Hashing, Fixed and Variable-length record access methods,
63 transactions, locking, logging, shared memory caching and database
64 recovery. DB supports C, C++, Java and Perl APIs.
65
66 This package contains the header files, libraries, and documentation
67 for building programs which use Berkeley DB.
68
69 %description devel -l pl.UTF-8
70 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
71 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
72 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
73 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
74 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
75 dla C, C++, Javy i Perla.
76
77 Ten pakiet zawiera pliki nagłówkowe i dokumentację do budowania
78 programów używających Berkeley DB.
79
80 %package static
81 Summary:        Static libraries for Berkeley database library
82 Summary(pl.UTF-8):      Statyczne biblioteki Berkeley Database
83 Group:          Development/Libraries
84 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
85
86 %description static
87 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
88 provides embedded database support for both traditional and
89 client/server applications. Berkeley DB includes B+tree, Extended
90 Linear Hashing, Fixed and Variable-length record access methods,
91 transactions, locking, logging, shared memory caching and database
92 recovery. DB supports C, C++, Java and Perl APIs.
93
94 This package contains the static libraries for building programs which
95 use Berkeley DB.
96
97 %description static -l pl.UTF-8
98 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
99 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
100 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
101 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
102 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
103 dla C, C++, Javy i Perla.
104
105 Ten pakiet zawiera statyczne biblioteki do budowania programów
106 używających Berkeley DB.
107
108 %package cxx
109 Summary:        Berkeley database library for C++
110 Summary(pl.UTF-8):      Biblioteka baz danych Berkeley dla C++
111 Group:          Libraries
112
113 %description cxx
114 Berkeley database library for C++.
115
116 %description cxx -l pl.UTF-8
117 Biblioteka baz danych Berkeley dla C++.
118
119 %package cxx-devel
120 Summary:        Header files for db-cxx library
121 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki db-cxx
122 Group:          Development/Libraries
123 Requires:       %{name}-cxx = %{epoch}:%{version}-%{release}
124 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
125 Conflicts:      db-devel < 4.1.25-3
126
127 %description cxx-devel
128 Header files for db-cxx library.
129
130 %description cxx-devel -l pl.UTF-8
131 Pliki nagłówkowe biblioteki db-cxx.
132
133 %package cxx-static
134 Summary:        Static version of db-cxx library
135 Summary(pl.UTF-8):      Statyczna wersja biblioteki db-cxx
136 Group:          Development/Libraries
137 Requires:       %{name}-cxx-devel = %{epoch}:%{version}-%{release}
138 Conflicts:      db-static < 4.2.50-1
139
140 %description cxx-static
141 Static version of db-cxx library.
142
143 %description cxx-static -l pl.UTF-8
144 Statyczna wersja biblioteki db-cxx.
145
146 %package java
147 Summary:        Berkeley database library for Java
148 Summary(pl.UTF-8):      Biblioteka baz danych Berkeley dla Javy
149 Group:          Libraries
150 Requires:       jpackage-utils
151
152 %description java
153 Berkeley database library for Java.
154
155 %description java -l pl.UTF-8
156 Biblioteka baz danych Berkeley dla Javy.
157
158 %package java-devel
159 Summary:        Development files for db-java library
160 Summary(pl.UTF-8):      Pliki programistyczne biblioteki db-java
161 Group:          Development/Languages/Java
162 Requires:       %{name}-java = %{epoch}:%{version}-%{release}
163 Conflicts:      db-devel < 4.1.25-3
164
165 %description java-devel
166 Development files for db-java library.
167
168 %description java-devel -l pl.UTF-8
169 Pliki programistyczne biblioteki db-java.
170
171 %package tcl
172 Summary:        Berkeley database library for Tcl
173 Summary(pl.UTF-8):      Biblioteka baz danych Berkeley dla Tcl
174 Group:          Development/Languages/Tcl
175
176 %description tcl
177 Berkeley database library for Tcl.
178
179 %description tcl -l pl.UTF-8
180 Biblioteka baz danych Berkeley dla Tcl.
181
182 %package tcl-devel
183 Summary:        Development files for db-tcl library
184 Summary(pl.UTF-8):      Pliki programistyczne biblioteki db-tcl
185 Group:          Development/Languages/Tcl
186 Requires:       %{name}-tcl = %{epoch}:%{version}-%{release}
187 Conflicts:      db-devel < 4.1.25-3
188
189 %description tcl-devel
190 Development files for db-tcl library.
191
192 %description tcl-devel -l pl.UTF-8
193 Pliki programistyczne biblioteki db-tcl.
194
195 %package utils
196 Summary:        Command line tools for managing Berkeley DB databases
197 Summary(pl.UTF-8):      Narzędzia do obsługi baz Berkeley DB z linii poleceń
198 Group:          Applications/Databases
199 Requires:       %{name} = %{epoch}:%{version}-%{release}
200
201 %description utils
202 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
203 provides embedded database support for both traditional and
204 client/server applications. Berkeley DB includes B+tree, Extended
205 Linear Hashing, Fixed and Variable-length record access methods,
206 transactions, locking, logging, shared memory caching and database
207 recovery. DB supports C, C++, Java and Perl APIs.
208
209 This package contains command line tools for managing Berkeley DB
210 databases.
211
212 %description utils -l pl.UTF-8
213 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
214 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
215 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
216 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
217 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
218 dla C, C++, Javy i Perla.
219
220 Ten pakiet zawiera narzędzia do obsługi baz Berkeley DB z linii
221 poleceń.
222
223 %prep
224 %setup -q -n db-%{version}
225 %patch0 -p1
226 %patch1 -p0
227 %patch2 -p0
228 %patch3 -p0
229 %patch4 -p0
230 %patch5 -p1
231
232 %if !%{with nptl}
233 sed -i -e 's,AM_PTHREADS_SHARED("POSIX/.*,:,' dist/aclocal/mutex.ac
234 %endif
235
236 %build
237 cd dist
238 cp -f /usr/share/aclocal/libtool.m4 aclocal/libtool.ac
239 cp -f /usr/share/automake/config.sub .
240 cp -f /usr/share/libtool/ltmain.sh .
241 sh s_config
242 cd ..
243
244 cp -a build_unix build_unix.static
245
246 cd build_unix.static
247
248 CC="%{__cc}"
249 CXX="%{__cxx}"
250 CFLAGS="%{rpmcflags}"
251 CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
252 LDFLAGS="%{rpmldflags}"
253 export CC CXX CFLAGS CXXFLAGS LDFLAGS
254
255 ../dist/%configure \
256         --enable-compat185 \
257         --disable-shared \
258         --enable-static \
259         --enable-rpc \
260         --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
261         --enable-cxx
262
263 # (temporarily?) disabled because of compilation errors:
264 #       --enable-dump185 \
265
266 %{__make} library_build
267
268 cd ../build_unix
269
270 ../dist/%configure \
271         --prefix=%{_prefix} \
272         --libdir=%{_libdir} \
273         --enable-compat185 \
274         --enable-rpc \
275         --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
276         --enable-cxx \
277         %{?with_tcl:--enable-tcl} \
278         %{?with_tcl:--with-tcl=/usr/lib} \
279         %{?with_java:--enable-java} \
280         --disable-static \
281         --enable-shared
282
283 %{__make} library_build \
284         TCFLAGS='-I$(builddir) -I%{_includedir}' \
285         LIBSO_LIBS="\$(LIBS)" \
286         LIBTSO_LIBS="\$(LIBS) -ltcl"
287
288 %install
289 rm -rf $RPM_BUILD_ROOT
290 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}
291 %if %{with java}
292 install -d $RPM_BUILD_ROOT%{_javadir}
293 %endif
294
295 %{__make} -C build_unix.static library_install \
296         DESTDIR=$RPM_BUILD_ROOT \
297         docdir=%{_docdir}/db-%{version}-docs \
298         includedir=%{_includedir}
299
300 %{__make} -C build_unix library_install \
301         DESTDIR=$RPM_BUILD_ROOT \
302         LIB_INSTALL_FILE_LIST="" \
303         docdir=%{_docdir}/db-%{version}-docs \
304         includedir=%{_includedir}
305
306 cd $RPM_BUILD_ROOT%{_libdir}
307 mv -f libdb.a libdb-4.2.a
308 mv -f libdb_cxx.a libdb_cxx-4.2.a
309 cd -
310
311 sed -i "s/old_library=''/old_library='libdb-4.2.a'/" $RPM_BUILD_ROOT%{_libdir}/libdb-4.2.la
312 sed -i "s/old_library=''/old_library='libdb_cxx-4.2.a'/" $RPM_BUILD_ROOT%{_libdir}/libdb_cxx-4.2.la
313
314 rm -f examples_c*/tags
315 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
316 cp -rf examples_c/* $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
317
318 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
319 cp -rf examples_cxx/* $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
320
321 %if %{with java}
322 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
323 cp -rf examples_java/* $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
324 mv $RPM_BUILD_ROOT%{_libdir}/db.jar $RPM_BUILD_ROOT%{_javadir}
325 %endif
326
327 %clean
328 rm -rf $RPM_BUILD_ROOT
329
330 %post   -p /sbin/ldconfig
331 %postun -p /sbin/ldconfig
332
333 %post   tcl -p /sbin/ldconfig
334 %postun tcl -p /sbin/ldconfig
335
336 %post   cxx -p /sbin/ldconfig
337 %postun cxx -p /sbin/ldconfig
338
339 %files
340 %defattr(644,root,root,755)
341 %doc LICENSE README
342 %attr(755,root,root) %{_libdir}/libdb-4.2.so
343 %dir %{_docdir}/db-%{version}-docs
344 %{_docdir}/db-%{version}-docs/sleepycat
345 %{_docdir}/db-%{version}-docs/index.html
346
347 %files devel
348 %defattr(644,root,root,755)
349 %{_libdir}/libdb-4.2.la
350 %dir %{_includedir}
351 %{_includedir}/db.h
352 %{_includedir}/db_185.h
353 %{_docdir}/db-%{version}-docs/api_c
354 %{_docdir}/db-%{version}-docs/images
355 %{_docdir}/db-%{version}-docs/ref
356 %{_examplesdir}/db-%{version}
357
358 %files static
359 %defattr(644,root,root,755)
360 %{_libdir}/libdb-4.2.a
361
362 %files cxx
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{_libdir}/libdb_cxx-4.2.so
365
366 %files cxx-devel
367 %defattr(644,root,root,755)
368 %{_includedir}/db_cxx.h
369 %{_libdir}/libdb_cxx-4.2.la
370 %{_docdir}/db-%{version}-docs/api_cxx
371 %{_examplesdir}/db-cxx-%{version}
372
373 %files cxx-static
374 %defattr(644,root,root,755)
375 %{_libdir}/libdb_cxx-4.2.a
376
377 %if %{with java}
378 %files java
379 %defattr(644,root,root,755)
380 %attr(755,root,root) %{_libdir}/libdb_java-4.2.so
381 %{_javadir}/db.jar
382
383 %files java-devel
384 %defattr(644,root,root,755)
385 %{_libdir}/libdb_java-4.2.la
386 %{_docdir}/db-%{version}-docs/java
387 %{_examplesdir}/db-java-%{version}
388 %endif
389
390 %if %{with tcl}
391 %files tcl
392 %defattr(644,root,root,755)
393 %attr(755,root,root) %{_libdir}/libdb_tcl-4.2.so
394
395 %files tcl-devel
396 %defattr(644,root,root,755)
397 %{_libdir}/libdb_tcl-4.2.la
398 %{_docdir}/db-%{version}-docs/api_tcl
399 %endif
400
401 %files utils
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_bindir}/berkeley_db_svc
404 %attr(755,root,root) %{_bindir}/db*_archive
405 %attr(755,root,root) %{_bindir}/db*_checkpoint
406 %attr(755,root,root) %{_bindir}/db*_deadlock
407 %attr(755,root,root) %{_bindir}/db*_dump
408 #%attr(755,root,root) %{_bindir}/db*_dump185
409 %attr(755,root,root) %{_bindir}/db*_load
410 %attr(755,root,root) %{_bindir}/db*_printlog
411 %attr(755,root,root) %{_bindir}/db*_recover
412 %attr(755,root,root) %{_bindir}/db*_stat
413 %attr(755,root,root) %{_bindir}/db*_upgrade
414 %attr(755,root,root) %{_bindir}/db*_verify
415 %{_docdir}/db-%{version}-docs/utility
This page took 0.331378 seconds and 3 git commands to generate.