source: projects/specs/branches/6/d/db40/db40-vl.spec @ 521

Revision 521, 15.7 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

Line 
1%define java_arches %{ix86} alpha ia64 ppc
2#%undefine java_arches
3
4# compatibility with legacy versions of rpm
5%{!?_lib:%define _lib   lib}
6
7%define __soversion     4.0
8%define _libdb_a        libdb-%{__soversion}.a
9%define _libcxx_a       libdb_cxx-%{__soversion}.a
10
11Summary: The Berkeley DB database library (version 4) for C.
12Summary(ja): C ÍÑ Berkeley DB ¥Ç¡¼¥¿¥Ù¡¼¥¹¥é¥¤¥Ö¥é¥ê (¥Ð¡¼¥¸¥ç¥ó4)
13Name: db40
14Version: 4.0.14
15Release: 15vl4
16Source: http://www.sleepycat.com/update/%{version}/db-%{version}.tar.gz
17Source1: http://www.sleepycat.com/update/1.85/db.1.85.tar.gz
18Patch10: http://www.sleepycat.com/update/1.85/patch.1.1
19Patch11: http://www.sleepycat.com/update/1.85/patch.1.2
20Patch12: http://www.sleepycat.com/update/1.85/patch.1.3
21Patch13: http://www.sleepycat.com/update/1.85/patch.1.4
22Patch14: db-1.85-errno.patch
23Patch15: db4-4.0.14-configure.patch
24Patch16: db4-4.0.14-recover.patch
25URL: http://www.sleepycat.com/
26License: GPL
27Group: System Environment/Libraries
28#Obsoletes: db1, db1-devel
29Obsoletes: db1-devel
30BuildPreReq: perl
31BuildPreReq: tcl
32%ifarch %{java_arches}
33BuildPreReq: gcc-java
34%endif
35BuildRoot: %{_tmppath}/%{name}-%{version}-root
36
37
38%description
39The Berkeley Database (Berkeley DB) is a programmatic toolkit that
40provides embedded database support for both traditional and
41client/server applications. The Berkeley DB includes B+tree, Extended
42Linear Hashing, Fixed and Variable-length record access methods,
43transactions, locking, logging, shared memory caching, and database
44recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is
45used by many applications, including Python and Perl, so this should
46be installed on all systems.
47
48
49%package utils
50Summary: Command line tools for managing Berkeley DB (version 4) databases.
51Summary(ja): Berkeley DB ¥Ç¡¼¥¿¥Ù¡¼¥¹ (¥Ð¡¼¥¸¥ç¥ó4) ÍÑ¥³¥Þ¥ó¥É¥é¥¤¥ó¥Ä¡¼¥ë
52Group: Applications/Databases
53Requires: db4 = %{version}-%{release}
54Obsoletes: db2-utils, db3-utils
55
56
57%description utils
58The Berkeley Database (Berkeley DB) is a programmatic toolkit that
59provides embedded database support for both traditional and
60client/server applications. Berkeley DB includes B+tree, Extended
61Linear Hashing, Fixed and Variable-length record access methods,
62transactions, locking, logging, shared memory caching, and database
63recovery. DB supports C, C++, Java and Perl APIs.
64
65This package contains command line tools for managing Berkeley DB
66(version 4) databases.
67
68
69%package devel
70Summary: Development files for the Berkeley DB (version 4) library.
71Summary(ja): Berkeley DB (¥Ð¡¼¥¸¥ç¥ó4) Íѳ«È¯¥é¥¤¥Ö¥é¥ê/¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë
72Group: System Environment/Libraries
73Requires: db4 = %{version}-%{release}
74Obsoletes: db2-devel, db3-devel
75
76
77%description devel
78The Berkeley Database (Berkeley DB) is a programmatic toolkit that
79provides embedded database support for both traditional and
80client/server applications. This package contains the header files,
81libraries, and documentation for building programs which use the
82Berkeley DB.
83
84
85%package java
86Summary: Development files for using the Berkeley DB (version 4) with Java.
87Group: System Environment/Libraries
88Requires: %{name} = %{version}-%{release}
89
90
91%description java
92The Berkeley Database (Berkeley DB) is a programmatic toolkit that
93provides embedded database support for both traditional and
94client/server applications. This package contains the libraries
95for building programs which use the Berkeley DB in Java.
96
97
98%prep
99%setup -q -n db-%{version} -a 1
100%patch15 -p1 -b .configure
101pushd mp
102%patch16 -p0 -b .recover
103popd
104pushd dist
105libtoolize --copy --force
106cp -f %{_datadir}/aclocal/libtool.m4 aclocal/libtool.ac
107popd
108pushd db.1.85/PORT/linux
109%patch10 -p0 -b .1
110cd ../..
111%patch11 -p0 -b .1
112%patch12 -p0 -b .2
113%patch13 -p0 -b .3
114%patch14 -p1 -b .errno
115popd
116
117# Remove tags files which we don't need.
118find . -name tags | xargs rm -f
119# Define a shell function for fixing HREF references in the docs, which
120# would otherwise break when we split the docs up into subpackages.
121fixup_href() {
122    for doc in $@ ; do
123        chmod u+w ${doc}
124        sed -e 's,="../api_c/,="../../%{name}-devel-%{version}/api_c/,g' \
125            -e 's,="api_c/,="../%{name}-devel-%{version}/api_c/,g' \
126            -e 's,="../api_cxx/,="../../%{name}-devel-%{version}/api_cxx/,g' \
127            -e 's,="api_cxx/,="../%{name}-devel-%{version}/api_cxx/,g' \
128            -e 's,="../api_java/,="../../%{name}-devel-%{version}/api_java/,g' \
129            -e 's,="api_java/,="../%{name}-devel-%{version}/api_java/,g' \
130            -e 's,="../api_tcl/,="../../%{name}-devel-%{version}/api_tcl/,g' \
131            -e 's,="api_tcl/,="../%{name}-devel-%{version}/api_tcl/,g' \
132            -e 's,="../examples_c/,="../../%{name}-devel-%{version}/examples_c/,g' \
133            -e 's,="examples_c/,="../%{name}-devel-%{version}/examples_c/,g' \
134            -e 's,="../examples_cxx/,="../../%{name}-devel-%{version}/examples_cxx/,g' \
135            -e 's,="examples_cxx/,="../%{name}-devel-%{version}/examples_cxx/,g' \
136            -e 's,="../ref/,="../../%{name}-devel-%{version}/ref/,g' \
137            -e 's,="ref/,="../%{name}-devel-%{version}/ref/,g' \
138            -e 's,="../sleepycat/,="../../%{name}-devel-%{version}/sleepycat/,g' \
139            -e 's,="sleepycat/,="../%{name}-devel-%{version}/sleepycat/,g' \
140            -e 's,="../images/,="../../%{name}-%{version}/images/,g' \
141            -e 's,="images/,="../%{name}-%{version}/images/,g' \
142            -e 's,="../utility/,="../../%{name}-%{version}/utility/,g' \
143            -e 's,="utility/,="../%{name}-%{version}/utility/,g' ${doc} > ${doc}.new
144        touch -r ${doc} ${doc}.new
145        cat ${doc}.new > ${doc}
146        touch -r ${doc}.new ${doc}
147        rm -f ${doc}.new
148    done
149}
150
151set +x  # XXX painful to watch
152# Fix all of the HTML files.
153fixup_href `find . -name "*.html"`
154set -x  # XXX painful to watch
155
156
157%build
158CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
159
160# Static link with old db-185 libraries.
161make -C db.1.85/PORT/%{_os} OORG="$CFLAGS"
162/bin/sh libtool --mode=compile %{__cc} $RPM_OPT_FLAGS -Idb.1.85/PORT/%{_os}/include -D_REENTRANT -c db_dump185/db_dump185.c -o dist/db_dump185.lo
163/bin/sh libtool --mode=link    %{__cc} -o dist/db_dump185 dist/db_dump185.lo db.1.85/PORT/%{_os}/libdb.a
164
165# XXX --enable-posixmutexes is useful for threads but useless for interprocess locking.
166# XXX --enable-diagnostic should be disabled for production (but is useful).
167# XXX --enable-debug_{r,w}op should be disabled for production.
168# XXX --enable-java
169pushd dist
170%configure \
171        --enable-compat185 --enable-dump185 \
172        --enable-shared --enable-static --enable-rpc \
173        --enable-tcl --with-tcl=%{_libdir} \
174        --enable-cxx \
175%ifarch %{java_arches}
176        --enable-java \
177%else
178        --disable-java \
179%endif
180        --enable-test \
181        # --enable-diagnostic \
182        # --enable-debug --enable-debug_rop --enable-debug_wop \
183        # --enable-posixmutexes
184
185make libdb=%{_libdb_a} libcxx=%{_libcxx_a}
186popd
187
188
189%install
190rm -rf ${RPM_BUILD_ROOT}
191mkdir -p ${RPM_BUILD_ROOT}%{_includedir}
192mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
193%makeinstall -C dist libdb=%{_libdb_a} libcxx=%{_libcxx_a}
194chmod +x $RPM_BUILD_ROOT/%{_libdir}/*.so*
195
196# On Linux systems, move the shared libraries to lib directory, but leave the
197# versioned .so symlink in the usual place to link against.
198%ifos linux
199if [ "%{_libdir}" != "/%{_lib}" ]; then
200        mkdir -p $RPM_BUILD_ROOT/%{_lib}
201        mv $RPM_BUILD_ROOT/%{_libdir}/libdb[-.]*so* $RPM_BUILD_ROOT/%{_lib}/
202        touch $RPM_BUILD_ROOT/rootfile
203        root=..
204        while [ ! -e $RPM_BUILD_ROOT/%{_libdir}/${root}/rootfile ] ; do
205                root=${root}/..
206        done
207        rm $RPM_BUILD_ROOT/rootfile
208        ln -sf ${root}/%{_lib}/libdb-%{__soversion}.so $RPM_BUILD_ROOT/%{_libdir}/libdb-%{__soversion}.so
209fi
210%endif
211
212# Move the header files to a subdirectory, in case we're deploying on a
213# system with multiple versions of DB installed.
214mkdir -p $RPM_BUILD_ROOT/%{_includedir}/db4
215mv $RPM_BUILD_ROOT/%{_includedir}/*.h $RPM_BUILD_ROOT/%{_includedir}/db4/
216
217# Rename the utilities s/db_/dbN_/ (for multiple versions of DB installed)
218#for p in berkeley_db_svc db_dump185 \
219#        db_archive db_checkpoint db_deadlock db_dump db_load \
220#        db_printlog db_recover db_stat db_upgrade db_verify; do
221#    q="`echo $p | sed -e 's,db_,%{name}_,'`"
222#    mv ${RPM_BUILD_ROOT}%{_bindir}/$p ${RPM_BUILD_ROOT}%{_bindir}/$q
223#done
224
225# Create symlinks so that "use <db.h> and link with -ldb" works.
226for i in db.h db_cxx.h db_185.h cxx_common.h cxx_except.h; do
227        ln -s db4/$i $RPM_BUILD_ROOT%{_includedir}
228done
229
230# Make sure that -ldb is functional.
231ln -sf libdb-%{__soversion}.so $RPM_BUILD_ROOT/%{_lib}/libdb.so
232
233%ifarch %{java_arches}
234# Move java jar file to the correct place
235mkdir -p $RPM_BUILD_ROOT%{_datadir}/java
236mv $RPM_BUILD_ROOT%{_libdir}/*.jar $RPM_BUILD_ROOT%{_datadir}/java
237%endif
238
239# Eliminate installed doco
240rm -rf ${RPM_BUILD_ROOT}%{_prefix}/docs
241
242
243%clean
244rm -rf ${RPM_BUILD_ROOT}
245
246
247%post -p /sbin/ldconfig
248
249
250%postun -p /sbin/ldconfig
251
252
253%files
254%defattr(-,root,root)
255%doc LICENSE README docs/images
256%ifos linux
257/%{_lib}/libdb-%{__soversion}.so
258%else
259%{_libdir}/libdb-%{__soversion}.so
260%endif
261%{_libdir}/libdb_cxx-%{__soversion}.so
262
263
264%if 0
265
266%files utils
267%defattr(-,root,root)
268%doc    docs/utility
269%{_libdir}/libdb_tcl.so
270%{_libdir}/libdb_tcl-%{__soversion}.a
271%{_libdir}/libdb_tcl-%{__soversion}.la
272%{_libdir}/libdb_tcl-%{__soversion}.so
273%{_bindir}/berkeley_db*_svc
274%{_bindir}/db*_archive
275%{_bindir}/db*_checkpoint
276%{_bindir}/db*_deadlock
277%{_bindir}/db*_dump*
278%{_bindir}/db*_load
279%{_bindir}/db*_printlog
280%{_bindir}/db*_recover
281%{_bindir}/db*_stat
282%{_bindir}/db*_upgrade
283%{_bindir}/db*_verify
284
285
286%files devel
287%defattr(-,root,root)
288%doc    docs/api_c docs/api_cxx docs/api_tcl docs/index.html
289%doc    docs/ref docs/sleepycat
290%doc    examples_c examples_cxx
291%{_libdir}/libdb-%{__soversion}.la
292%{_libdir}/libdb_cxx-%{__soversion}.la
293%{_libdir}/%{_libdb_a}
294%{_libdir}/%{_libcxx_a}
295%{_includedir}/%{name}
296%{_includedir}/*.h
297
298%ifos linux
299/%{_lib}/libdb.so
300%{_libdir}/libdb-%{__soversion}.so
301%else
302%{_libdir}/libdb.so
303%endif
304%{_libdir}/libdb_cxx.so
305
306%ifarch %{java_arches}
307%files java
308%defattr(-,root,root)
309%doc docs/api_java
310%{_libdir}/libdb_java*
311%{_datadir}/java/*.jar
312%endif
313
314%endif
315
316
317%changelog
318* Mon Oct 11 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.0.14-15vl4
319- changed package's name from db4 to db40
320
321* Fri Feb 20 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0.14-15vl3
322- remove Obsoletes: db[123]
323
324* Tue Feb 17 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 4.0.14-15vl2
325- rebuild
326- added Obsoletes: db[123]
327- remove BuildPreReq: jdkgcj
328- undefine java_arches
329
330* Sat Jan 18 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.0.14-15vl1
331- deleted Obsoletes: db1
332  (Obsoletes: db1 is too early for Vine:
333   we need more work/time to resolve db[1234] disorder...)
334
335* Wed Jan 15 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.0.14-15vl0
336- rebuilt for Vine Linux
337
338* Tue Oct  8 2002 Nalin Dahyabhai <nalin@redhat.com> 4.0.14-15
339- add java bits back in for x86 boxes
340
341* Fri Sep 20 2002 Than Ngo <than@redhat.com> 4.0.14-14.1
342- Added better fix for s390/s390x/x86_64
343
344* Thu Sep 05 2002 Arjan van de Ven
345- remove java bits for x86-64
346
347* Tue Aug 27 2002 Jeff Johnson <jbj@redhat.com> 4.0.14-14
348- include libdb_tcl-4.1.a library.
349- obsolete db1 packages.
350
351* Tue Aug 13 2002 Nalin Dahyabhai <nalin@redhat.com> 4.0.14-13
352- include patch to avoid db_recover (#70362)
353
354* Sat Aug 10 2002 Elliot Lee <sopwith@redhat.com>
355- rebuilt with gcc-3.2 (we hope)
356
357* Tue Jul 23 2002 Nalin Dahyabhai <nalin@redhat.com> 4.0.14-11
358- own %%{_includedir}/%{name}
359
360* Tue Jul 23 2002 Tim Powers <timp@redhat.com> 4.0.14-10
361- build using gcc-3.2-0.1
362
363* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
364- automated rebuild
365
366* Wed Jun 12 2002 Bernhard Rosenkraenzer <bero@redhat.com> 4.0.14-8
367- Add java bindings
368- Fix C++ bindings
369
370* Thu May 23 2002 Tim Powers <timp@redhat.com>
371- automated rebuild
372
373* Thu May  9 2002 Jeff Johnson <jbj@redhat.com>
374- re-enable db.h symlink creation, db_util names, and db[23]-devel obsoletes.
375- make sure that -ldb is functional.
376
377* Thu Feb 21 2002 Jeff Johnson <jbj@redhat.com>
378- avoid db_util name collisions with multiple versions installed.
379
380* Mon Feb 18 2002 Nalin Dahyabhai <nalin@redhat.com> 4.0.14-3
381- remove relocatability stuffs
382- swallow a local copy of db1 and build db185_dump statically with it, to
383  remove the build dependency and simplify bootstrapping new arches
384
385* Mon Jan 27 2002 Nalin Dahyabhai <nalin@redhat.com> 4.0.14-2
386- have subpackages obsolete their db3 counterparts, because they conflict anyway
387
388* Tue Jan  8 2002 Jeff Johnson <jbj@redhat.com> db4-4.0.14-1
389- upgrade to 4.0.14.
390
391* Sun Aug  5 2001 Nalin Dahyabhai <nalin@redhat.com>
392- fix dangling docs symlinks
393- fix dangling doc HREFs (#33328)
394- apply the two patches listed at http://www.sleepycat.com/update/3.2.9/patch.3.2.9.html
395
396* Tue Jun 19 2001 Bill Nottingham <notting@redhat.com>
397- turn off --enable-debug
398
399* Thu May 10 2001 Than Ngo <than@redhat.com>
400- fixed to build on s390x
401
402* Mon Mar 19 2001 Jeff Johnson <jbj@redhat.com>
403- update to 3.2.9.
404
405* Tue Dec 12 2000 Jeff Johnson <jbj@redhat.com>
406- rebuild to remove 777 directories.
407
408* Sat Nov 11 2000 Jeff Johnson <jbj@redhat.com>
409- don't build with --enable-diagnostic.
410- add build prereq on tcl.
411- default value for %%_lib macro if not found.
412
413* Tue Oct 17 2000 Jeff Johnson <jbj@redhat.com>
414- add /usr/lib/libdb-3.1.so symlink to %%files.
415- remove dangling tags symlink from examples.
416
417* Mon Oct  9 2000 Jeff Johnson <jbj@redhat.com>
418- rather than hack *.la (see below), create /usr/lib/libdb-3.1.so symlink.
419- turn off --enable-diagnostic for performance.
420
421* Fri Sep 29 2000 Jeff Johnson <jbj@redhat.com>
422- update to 3.1.17.
423- disable posix mutexes Yet Again.
424
425* Tue Sep 26 2000 Jeff Johnson <jbj@redhat.com>
426- add c++ and posix mutex support.
427
428* Thu Sep 14 2000 Jakub Jelinek <jakub@redhat.com>
429- put nss_db into a separate package
430
431* Wed Aug 30 2000 Matt Wilson <msw@redhat.com>
432- rebuild to cope with glibc locale binary incompatibility, again
433
434* Wed Aug 23 2000 Jeff Johnson <jbj@redhat.com>
435- remove redundant strip of libnss_db* that is nuking symbols.
436- change location in /usr/lib/libdb-3.1.la to point to /lib (#16776).
437
438* Thu Aug 17 2000 Jeff Johnson <jbj@redhat.com>
439- summaries from specspo.
440- all of libdb_tcl* (including symlinks) in db3-utils, should be db3->tcl?
441
442* Wed Aug 16 2000 Jakub Jelinek <jakub@redhat.com>
443- temporarily build nss_db in this package, should be moved
444  into separate nss_db package soon
445
446* Wed Jul 19 2000 Jakub Jelinek <jakub@redhat.com>
447- rebuild to cope with glibc locale binary incompatibility
448
449* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
450- automatic rebuild
451
452* Sun Jun 11 2000 Jeff Johnson <jbj@redhat.com>
453- upgrade to 3.1.14.
454- create db3-utils sub-package to hide tcl dependency, enable tcl Yet Again.
455- FHS packaging.
456
457* Mon Jun  5 2000 Jeff Johnson <jbj@redhat.com>
458- disable tcl Yet Again, base packages cannot depend on libtcl.so.
459
460* Sat Jun  3 2000 Jeff Johnson <jbj@redhat.com>
461- enable tcl, rebuild against tcltk 8.3.1 (w/o pthreads).
462
463* Tue May 30 2000 Matt Wilson <msw@redhat.com>
464- include /lib/libdb.so in the devel package
465
466* Wed May 10 2000 Jeff Johnson <jbj@redhat.com>
467- put in "System Environment/Libraries" per msw instructions.
468
469* Tue May  9 2000 Jeff Johnson <jbj@redhat.com>
470- install shared library in /lib, not /usr/lib.
471- move API docs to db3-devel.
472
473* Mon May  8 2000 Jeff Johnson <jbj@redhat.com>
474- don't rename db_* to db3_*.
475
476* Tue May  2 2000 Jeff Johnson <jbj@redhat.com>
477- disable --enable-test --enable-debug_rop --enable-debug_wop.
478- disable --enable-posixmutexes --enable-tcl as well, to avoid glibc-2.1.3
479  problems.
480
481* Mon Apr 24 2000 Jeff Johnson <jbj@redhat.com>
482- add 3.0.55.1 alignment patch.
483- add --enable-posixmutexes (linux threads has not pthread_*attr_setpshared).
484- add --enable-tcl (needed -lpthreads).
485
486* Sat Apr  1 2000 Jeff Johnson <jbj@redhat.com>
487- add --enable-debug_{r,w}op for now.
488- add variable to set shm perms.
489
490* Sat Mar 25 2000 Jeff Johnson <jbj@redhat.com>
491- update to 3.0.55
492
493* Tue Dec 29 1998 Jeff Johnson <jbj@redhat.com>
494- Add --enable-cxx to configure.
495
496* Thu Jun 18 1998 Jeff Johnson <jbj@redhat.com>
497- Create.
Note: See TracBrowser for help on using the repository browser.