]> git.pld-linux.org Git - packages/db.git/blob - db.spec
aad0c4517fda25e53d4e030d16b94f15f80a83f2
[packages/db.git] / db.spec
1 #
2 # Conditional build:
3 # _with_java    - build db-java (required for openoffice)
4 #
5 Summary:        BSD database library for C
6 Summary(pl):    Biblioteka C do obs³ugi baz Berkeley DB
7 Name:           db
8 Version:        4.2.50
9 Release:        1
10 License:        BSD
11 Group:          Libraries
12 # alternative site (sometimes working): http://www.berkeleydb.com/
13 Source0:        http://www.sleepycat.com/update/snapshot/%{name}-%{version}.tar.gz
14 # Source0-md5:  644522fe89c565ec10c6d2e2d010227b
15 URL:            http://www.sleepycat.com/
16 BuildRequires:  autoconf
17 BuildRequires:  ed
18 %{?_with_java:BuildRequires:    gcc-java}
19 BuildRequires:  libstdc++-devel
20 BuildRequires:  tcl-devel >= 8.3.2
21 Obsoletes:      db4
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
26 provides embedded database support for both traditional and
27 client/server applications. Berkeley DB is used by many applications,
28 including Python and Perl, so this should be installed on all systems.
29
30 %description -l pl
31 Berkeley Database (Berkeley DB) to zestaw narzêdzi programistycznych
32 zapewniaj±cych obs³ugê baz danych w aplikacjach tradycyjnych jak i
33 klient-serwer. Berkeley db jest u¿ywana w wielu aplikacjach, w tym w
34 Pythonie i Perlu.
35
36 %package devel
37 Summary:        Header files for Berkeley database library
38 Summary(pl):    Pliki nag³ówkowe do biblioteki Berkeley Database
39 Group:          Development/Libraries
40 Requires:       %{name} = %{version}
41 Obsoletes:      db3-devel
42 Obsoletes:      db4-devel
43
44 %description devel
45 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
46 provides embedded database support for both traditional and
47 client/server applications. Berkeley DB includes B+tree, Extended
48 Linear Hashing, Fixed and Variable-length record access methods,
49 transactions, locking, logging, shared memory caching and database
50 recovery. DB supports C, C++, Java and Perl APIs.
51
52 This package contains the header files, libraries, and documentation
53 for building programs which use Berkeley DB.
54
55 %description devel -l pl
56 Berkeley Database (Berkeley DB) to zestaw narzêdzi programistycznych
57 zapewniaj±cych obs³ugê baz danych w aplikacjach tradycyjnych jak i
58 klient-serwer. Berkeley DB obs³ugje dostêp do bazy przez B-drzewa i
59 funkcje mieszaj±ce ze sta³± lub zmienn± wielko¶ci± rekordu,
60 transakcje, kroniki, pamiêæ dzielon± i odtwarzanie baz. Ma wsparcie
61 dla C, C++, Javy i Perla.
62
63 Ten pakiet zawiera pliki nag³ówkowe i dokumentacjê do budowania
64 programów u¿ywaj±cych Berkeley DB.
65
66 %package static
67 Summary:        Static libraries for Berkeley database library
68 Summary(pl):    Statyczne biblioteki Berkeley Database
69 Group:          Development/Libraries
70 Requires:       %{name}-devel = %{version}
71 Obsoletes:      db3-static
72 Obsoletes:      db4-static
73
74 %description static
75 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
76 provides embedded database support for both traditional and
77 client/server applications. Berkeley DB includes B+tree, Extended
78 Linear Hashing, Fixed and Variable-length record access methods,
79 transactions, locking, logging, shared memory caching and database
80 recovery. DB supports C, C++, Java and Perl APIs.
81
82 This package contains the static libraries for building programs which
83 use Berkeley DB.
84
85 %description static -l pl
86 Berkeley Database (Berkeley DB) to zestaw narzêdzi programistycznych
87 zapewniaj±cych obs³ugê baz danych w aplikacjach tradycyjnych jak i
88 klient-serwer. Berkeley DB obs³ugje dostêp do bazy przez B-drzewa i
89 funkcje mieszaj±ce ze sta³± lub zmienn± wielko¶ci± rekordu,
90 transakcje, kroniki, pamiêæ dzielon± i odtwarzanie baz. Ma wsparcie
91 dla C, C++, Javy i Perla.
92
93 Ten pakiet zawiera statyczne biblioteki do budowania programów
94 u¿ywaj±cych Berkeley DB.
95
96 %package cxx
97 Summary:        Berkeley database library for C++
98 Summary(pl):    Biblioteka baz danych Berkeley dla C++
99 Group:          Libraries
100 Obsoletes:      db4-cxx
101
102 %description cxx
103 Berkeley database library for C++.
104
105 %description cxx -l pl
106 Biblioteka baz danych Berkeley dla C++.
107
108 %package cxx-devel
109 Summary:        Berkeley database library for C++
110 Summary(pl):    Biblioteka baz danych Berkeley dla C++
111 Group:          Libraries
112 Requires:       %{name}-cxx = %{version}
113 Requires:       %{name}-devel = %{version}
114 Obsoletes:      db4-cxx
115 Conflicts:      db-devel < 4.1.25-3
116
117 %description cxx-devel
118 Berkeley database library for C++.
119
120 %description cxx-devel -l pl
121 Biblioteka baz danych Berkeley dla C++.
122
123 %package java
124 Summary:        Berkeley database library for Java
125 Summary(pl):    Biblioteka baz danych Berkeley dla Javy
126 Group:          Libraries
127
128 %description java
129 Berkeley database library for Java.
130
131 %description java -l pl
132 Biblioteka baz danych Berkeley dla Javy.
133
134 %package tcl
135 Summary:        Berkeley database library for TCL
136 Summary(pl):    Biblioteka baz danych Berkeley dla TCL
137 Group:          Development/Languages/Tcl
138 Requires:       tcl
139 Obsoletes:      db4-tcl
140
141 %description tcl
142 Berkeley database library for TCL.
143
144 %description tcl -l pl
145 Biblioteka baz danych Berkeley dla TCL.
146
147 %package tcl-devel
148 Summary:        Berkeley database library for TCL
149 Summary(pl):    Biblioteka baz danych Berkeley dla TCL
150 Group:          Development/Languages/Tcl
151 Requires:       tcl
152 Requires:       %{name}-tcl = %{version}
153 Obsoletes:      db4-tcl
154 Conflicts:      db-devel < 4.1.25-3
155
156 %description tcl-devel
157 Berkeley database library for TCL.
158
159 %description tcl-devel -l pl
160 Biblioteka baz danych Berkeley dla TCL.
161
162 %package utils
163 Summary:        Command line tools for managing Berkeley DB databases
164 Summary(pl):    Narzêdzia do obs³ugi baz Berkeley DB z linii poleceñ
165 Group:          Applications/Databases
166 Requires:       %{name} = %{version}
167 Obsoletes:      db4-utils
168
169 %description utils
170 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
171 provides embedded database support for both traditional and
172 client/server applications. Berkeley DB includes B+tree, Extended
173 Linear Hashing, Fixed and Variable-length record access methods,
174 transactions, locking, logging, shared memory caching and database
175 recovery. DB supports C, C++, Java and Perl APIs.
176
177 This package contains command line tools for managing Berkeley DB
178 databases.
179
180 %description utils -l pl
181 Berkeley Database (Berkeley DB) to zestaw narzêdzi programistycznych
182 zapewniaj±cych obs³ugê baz danych w aplikacjach tradycyjnych jak i
183 klient-serwer. Berkeley DB obs³ugje dostêp do bazy przez B-drzewa i
184 funkcje mieszaj±ce ze sta³± lub zmienn± wielko¶ci± rekordu,
185 transakcje, kroniki, pamiêæ dzielon± i odtwarzanie baz. Ma wsparcie
186 dla C, C++, Javy i Perla.
187
188 Ten pakiet zawiera narzêdzia do obs³ugi baz Berkeley DB z linii
189 poleceñ.
190
191 %prep
192 %setup -q
193
194 %build
195 cd dist
196 sh s_config
197 cd ..
198
199 cp -a build_unix build_unix.static
200
201 cd build_unix.static
202
203 CC="%{__cc}"
204 CXX="%{__cxx}"
205 CFLAGS="%{rpmcflags} -fno-implicit-templates"
206 CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
207 export CC CXX CFLAGS CXXFLAGS
208
209 ../dist/configure \
210         --prefix=%{_prefix} \
211         --libdir=%{_libdir} \
212         --enable-compat185 \
213         --disable-shared \
214         --enable-static \
215         --enable-rpc \
216         --enable-cxx
217
218 # (temporarily?) disabled because of compilation errors:
219 #       --enable-dump185 \
220
221 %{__make} library_build
222
223 cd ../build_unix
224
225 ../dist/configure \
226         --prefix=%{_prefix} \
227         --libdir=%{_libdir} \
228         --enable-compat185 \
229         --enable-shared \
230         --disable-static \
231         --enable-rpc \
232         --enable-cxx \
233         --enable-tcl \
234         --with-tcl=/usr/lib \
235         %{?_with_java:--enable-java}
236
237 %{__make} library_build \
238         TCFLAGS='-I$(builddir) -I%{_includedir}'
239
240 %install
241 rm -rf $RPM_BUILD_ROOT
242 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir},/lib}
243
244 cd build_unix.static
245
246 %{__make} library_install \
247         prefix=$RPM_BUILD_ROOT%{_prefix} \
248         libdir=$RPM_BUILD_ROOT%{_libdir} 
249
250 cd ../build_unix
251
252 %{__make} library_install \
253         prefix=$RPM_BUILD_ROOT%{_prefix} \
254         libdir=$RPM_BUILD_ROOT%{_libdir} \
255         includedir=$RPM_BUILD_ROOT%{_includedir} \
256         LIB_INSTALL_FILE_LIST=""
257
258 (cd $RPM_BUILD_ROOT%{_libdir}
259 ln -sf libdb-4.1.so libdb4.so
260 ln -sf libdb-4.1.so libndbm.so
261 ln -sf libdb-4.1.la libdb.la
262 ln -sf libdb-4.1.la libdb4.la
263 ln -sf libdb-4.1.la libndbm.la
264 ln -sf libdb_tcl-4.1.la libdb_tcl.la
265 ln -sf libdb_cxx-4.1.la libdb_cxx.la
266 mv -f libdb.a libdb-4.1.a
267 ln -sf libdb-4.1.a libdb.a
268 ln -sf libdb-4.1.a libdb4.a
269 ln -sf libdb-4.1.a libndbm.a
270 mv -f libdb_cxx.a libdb_cxx-4.1.a
271 ln -sf libdb_cxx-4.1.a libdb_cxx.a
272
273 mv -f libdb-4.1.la libdb-4.1.la.tmp
274 mv -f libdb_cxx-4.1.la libdb_cxx-4.1.la.tmp
275 sed -e "s/old_library=''/old_library='libdb-4.1.a'/" libdb-4.1.la.tmp > libdb-4.1.la
276 sed -e "s/old_library=''/old_library='libdb_cxx-4.1.a'/" libdb_cxx-4.1.la.tmp > libdb_cxx-4.1.la
277 rm -f libdb*.la.tmp
278 )
279
280 cd ..
281 #rm -rf examples_java
282 #cp -a java/src/com/sleepycat/examples examples_java
283
284 %clean
285 rm -rf $RPM_BUILD_ROOT
286
287 %post   -p /sbin/ldconfig
288 %postun -p /sbin/ldconfig
289
290 %post   tcl -p /sbin/ldconfig
291 %postun tcl -p /sbin/ldconfig
292
293 %post   cxx -p /sbin/ldconfig
294 %postun cxx -p /sbin/ldconfig
295
296 %files
297 %defattr(644,root,root,755)
298 %doc LICENSE README
299 #%attr(755,root,root) /lib/libdb-*.so
300 %attr(755,root,root) %{_libdir}/libdb-*.so
301
302 %files devel
303 %defattr(644,root,root,755)
304 %doc docs/{api*,ref,index.html,sleepycat,images} examples_c*
305 %{_includedir}/db.h
306 %{_includedir}/db_185.h
307 %{_libdir}/libdb-4.2.la
308 %{_libdir}/libdb.la
309 %{_libdir}/libdb.so
310 %{_libdir}/libdb4.la
311 %{_libdir}/libdb4.so
312 %{_libdir}/libndbm.la
313 %{_libdir}/libndbm.so
314
315 %files static
316 %defattr(644,root,root,755)
317 %{_libdir}/lib*.a
318
319 %files cxx
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/libdb_cxx-*.so
322
323 %files cxx-devel
324 %defattr(644,root,root,755)
325 %{_includedir}/db_cxx.h
326 %{_libdir}/libdb_cxx-4.2.la
327 %{_libdir}/libdb_cxx.la
328 %{_libdir}/libdb_cxx.so
329
330 %if %{?_with_java:1}%{!?_with_java:0}
331 %files java
332 %defattr(644,root,root,755)
333 %attr(755,root,root) %{_libdir}/libdb_java*.so
334 %attr(644,root,root) %{_libdir}/db.jar
335 %endif
336
337 %files tcl
338 %defattr(644,root,root,755)
339 %attr(755,root,root) %{_libdir}/libdb_tcl-*.so
340
341 %files tcl-devel
342 %defattr(644,root,root,755)
343 %{_libdir}/libdb_tcl-4.2.la
344 %{_libdir}/libdb_tcl.la
345 %{_libdir}/libdb_tcl.so
346
347 %files utils
348 %defattr(644,root,root,755)
349 %doc docs/utility/*
350 %attr(755,root,root) %{_bindir}/berkeley_db_svc
351 %attr(755,root,root) %{_bindir}/db*_archive
352 %attr(755,root,root) %{_bindir}/db*_checkpoint
353 %attr(755,root,root) %{_bindir}/db*_deadlock
354 %attr(755,root,root) %{_bindir}/db*_dump
355 #%attr(755,root,root) %{_bindir}/db*_dump185
356 %attr(755,root,root) %{_bindir}/db*_load
357 %attr(755,root,root) %{_bindir}/db*_printlog
358 %attr(755,root,root) %{_bindir}/db*_recover
359 %attr(755,root,root) %{_bindir}/db*_stat
360 %attr(755,root,root) %{_bindir}/db*_upgrade
361 %attr(755,root,root) %{_bindir}/db*_verify
This page took 0.076321 seconds and 2 git commands to generate.