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