db3-vl.spec 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. # compatibility with legacy rpm
  2. %{!?_lib:%define _lib lib}
  3. %define __s -s
  4. %define __soversion 3.2
  5. %define _libdb_a libdb-%{__soversion}.a
  6. %define _libcxx_a libdb_cxx-%{__soversion}.a
  7. Summary: The Berkeley DB database library for C.
  8. Summary(ja): C 用 Berkeley DB データベースライブラリ
  9. Name: db3
  10. Version: 3.2.9
  11. Release: 1vl2
  12. Source: http://www.sleepycat.com/update/%{version}/db-%{version}.tar.gz
  13. URL: http://www.sleepycat.com
  14. Copyright: GPL
  15. Group: System Environment/Libraries
  16. %ifos linux
  17. # XXX written as a file prereq in order to build with glibc-2.1.3
  18. BuildPreReq: /usr/lib/libdb1.a
  19. %endif
  20. BuildPreReq: tcl
  21. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  22. Prefix: %{_prefix}
  23. %description
  24. The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
  25. embedded database support for both traditional and client/server applications.
  26. Berkeley DB is used by many applications, including Python and Perl, so this
  27. should be installed on all systems.
  28. %package utils
  29. Summary: Command line tools for managing Berkeley DB databases.
  30. Summary(ja): Berkeley DB データベース用コマンドラインツール
  31. Group: Applications/Databases
  32. Requires: db3 = %{version}
  33. Prefix: %{_prefix}
  34. %description utils
  35. The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
  36. embedded database support for both traditional and client/server applications.
  37. Berkeley DB includes B+tree, Extended Linear Hashing, Fixed and Variable-length
  38. record access methods, transactions, locking, logging, shared memory caching
  39. and database recovery. DB supports C, C++, Java and Perl APIs.
  40. This package contains command line tools for managing Berkeley DB databases.
  41. %package devel
  42. Summary: Development libraries/header files for the Berkeley DB library.
  43. Summary(ja): Berkeley DB 用開発ライブラリ/ヘッダファイル
  44. Group: System Environment/Libraries
  45. Requires: db3 = %{version}
  46. Prefix: %{_prefix}
  47. %description devel
  48. The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
  49. embedded database support for both traditional and client/server applications.
  50. Berkeley DB includes B+tree, Extended Linear Hashing, Fixed and Variable-length
  51. record access methods, transactions, locking, logging, shared memory caching
  52. and database recovery. DB supports C, C++, Java and Perl APIs.
  53. This package contains the header files, libraries, and documentation for
  54. building programs which use Berkeley DB.
  55. %prep
  56. %setup -q -n db-%{version}
  57. %build
  58. cd build_unix
  59. # XXX --enable-posixmutexes is useful for threads but useless for interprocess locking.
  60. # XXX --enable-diagnostic should be disabled for production (but is useful).
  61. # XXX --enable-debug_{r,w}op should be disabled for production.
  62. # XXX --enable-java
  63. CFLAGS="$RPM_OPT_FLAGS" ../dist/configure --prefix=%{_prefix} --enable-debug --enable-compat185 --enable-dump185 --enable-shared --enable-static --enable-rpc --enable-tcl --with-tcl=%{_prefix}/lib --enable-cxx --enable-test # --enable-diagnostic --enable-debug --enable-debug_rop --enable-debug_wop # --enable-posixmutexes
  64. make libdb=%{_libdb_a} %{_libdb_a}
  65. make libcxx=%{_libcxx_a} %{_libcxx_a}
  66. # Static link with old db-185 libraries.
  67. /bin/sh ./libtool --mode=compile cc -c -O2 -g -g -I/usr/include/db1 -I../dist/../include -D_REENTRANT ../dist/../db_dump185/db_dump185.c
  68. cc %{__s} -static -o db_dump185 db_dump185.lo -L%{_libdir} -ldb1
  69. # Compile rest normally.
  70. make libdb=%{_libdb_a} libcxx=%{_libcxx_a} TCFLAGS='-I$(builddir) -I/usr/include' LDFLAGS="%{__s}"
  71. # remove dangling tags symlink from examples.
  72. rm -f examples_cxx/tags
  73. rm -f examples_c/tags
  74. %install
  75. rm -rf ${RPM_BUILD_ROOT}
  76. mkdir -p ${RPM_BUILD_ROOT}%{_includedir}
  77. mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib
  78. cd build_unix
  79. # XXX install_java
  80. make libdb=%{_libdb_a} libcxx=%{_libcxx_a} LDFLAGS="%{__s}" prefix=${RPM_BUILD_ROOT}%{_prefix} install_include install_dynamic install_static install_dynamic_cxx install_static_cxx install_tcl install_utilities
  81. # XXX annoying
  82. set -x
  83. ( cd ${RPM_BUILD_ROOT}
  84. %ifos linux
  85. mkdir -p ./%{_lib}
  86. mv .%{_prefix}/lib/libdb[-.]*so* ./%{_lib}
  87. if [ "%{_libdir}" != "%{_prefix}/lib" ]; then
  88. mkdir -p .%{_libdir}
  89. mv .%{_prefix}/lib/libdb* .%{_libdir}
  90. fi
  91. %endif
  92. mkdir -p .%{_includedir}/db3
  93. mv .%{_prefix}/include/*.h .%{_includedir}/db3
  94. ln -sf db3/db.h .%{_includedir}/db.h
  95. # XXX Rather than hack *.la (see below), create /usr/lib/libdb-3.1.so symlink.
  96. ln -sf ../../lib/libdb-%{__soversion}.so .%{_libdir}/libdb-%{__soversion}.so
  97. # XXX This is needed for packaging db3 for Red Hat 6.x
  98. # for F in .%{_prefix}/bin/db_* ; do
  99. # mv $F `echo $F | sed -e 's,/db_,/db3_,'`
  100. # done
  101. )
  102. set +x
  103. # XXX libdb-3.1.so is in /lib teach libtool as well
  104. #perl -pi -e 's,/usr,,' ${RPM_BUILD_ROOT}%{_libdir}/libdb-%{__soversion}.la
  105. %clean
  106. rm -rf ${RPM_BUILD_ROOT}
  107. %post -p /sbin/ldconfig
  108. %postun -p /sbin/ldconfig
  109. %files
  110. %defattr(-,root,root)
  111. %doc LICENSE README docs/images
  112. %ifos linux
  113. /%{_lib}/libdb-%{__soversion}.so
  114. %else
  115. %{_libdir}/libdb-%{__soversion}.so
  116. %endif
  117. %{_libdir}/libdb_cxx-%{__soversion}.so
  118. %files utils
  119. %defattr(-,root,root)
  120. %doc docs/utility
  121. %{_libdir}/libdb_tcl.so
  122. %{_libdir}/libdb_tcl-%{__soversion}.la
  123. %{_libdir}/libdb_tcl-%{__soversion}.so
  124. %{_bindir}/berkeley_db_svc
  125. %{_bindir}/db*_archive
  126. %{_bindir}/db*_checkpoint
  127. %{_bindir}/db*_deadlock
  128. %{_bindir}/db*_dump
  129. %{_bindir}/db*_dump185
  130. %{_bindir}/db*_load
  131. %{_bindir}/db*_printlog
  132. %{_bindir}/db*_recover
  133. %{_bindir}/db*_stat
  134. %{_bindir}/db*_upgrade
  135. %{_bindir}/db*_verify
  136. %files devel
  137. %defattr(-,root,root)
  138. %doc docs/api_c docs/api_cxx docs/api_java docs/api_tcl docs/index.html
  139. %doc docs/ref docs/sleepycat
  140. %doc examples_c examples_cxx
  141. %{_libdir}/libdb-%{__soversion}.la
  142. %{_libdir}/libdb_cxx-%{__soversion}.la
  143. %{_libdir}/%{_libdb_a}
  144. %{_libdir}/%{_libcxx_a}
  145. %{_includedir}/db3/db.h
  146. %{_includedir}/db3/db_185.h
  147. %{_includedir}/db3/db_cxx.h
  148. %{_includedir}/db.h
  149. %ifos linux
  150. /%{_lib}/libdb.so
  151. /%{_libdir}/libdb-%{__soversion}.so
  152. %else
  153. %{_libdir}/libdb.so
  154. %endif
  155. %{_libdir}/libdb_cxx.so
  156. %changelog
  157. * Tue Dec 11 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.2.9-1vl2
  158. - increased release number for VineSeed main tree :)
  159. * Thu May 10 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
  160. - 3.2.9-1vl1
  161. - based on 3.2.9 from Rawhide
  162. - rebuilt for VineSeed
  163. * Mon Mar 19 2001 Jeff Johnson <jbj@redhat.com>
  164. - update to 3.2.9.
  165. * Tue Dec 12 2000 Jeff Johnson <jbj@redhat.com>
  166. - rebuild to remove 777 directories.
  167. * Sat Nov 11 2000 Jeff Johnson <jbj@redhat.com>
  168. - don't build with --enable-diagnostic.
  169. - add build prereq on tcl.
  170. - default value for %%_lib macro if not found.
  171. * Tue Oct 17 2000 Jeff Johnson <jbj@redhat.com>
  172. - add /usr/lib/libdb-3.1.so symlink to %%files.
  173. - remove dangling tags symlink from examples.
  174. * Mon Oct 9 2000 Jeff Johnson <jbj@redhat.com>
  175. - rather than hack *.la (see below), create /usr/lib/libdb-3.1.so symlink.
  176. - turn off --enable-diagnostic for performance.
  177. * Fri Sep 29 2000 Jeff Johnson <jbj@redhat.com>
  178. - update to 3.1.17.
  179. - disable posix mutexes Yet Again.
  180. * Tue Sep 26 2000 Jeff Johnson <jbj@redhat.com>
  181. - add c++ and posix mutex support.
  182. * Thu Sep 14 2000 Jakub Jelinek <jakub@redhat.com>
  183. - put nss_db into a separate package
  184. * Wed Aug 30 2000 Matt Wilson <msw@redhat.com>
  185. - rebuild to cope with glibc locale binary incompatibility, again
  186. * Wed Aug 23 2000 Jeff Johnson <jbj@redhat.com>
  187. - remove redundant strip of libnss_db* that is nuking symbols.
  188. - change location in /usr/lib/libdb-3.1.la to point to /lib (#16776).
  189. * Thu Aug 17 2000 Jeff Johnson <jbj@redhat.com>
  190. - summaries from specspo.
  191. - all of libdb_tcl* (including symlinks) in db3-utils, should be db3->tcl?
  192. * Wed Aug 16 2000 Jakub Jelinek <jakub@redhat.com>
  193. - temporarily build nss_db in this package, should be moved
  194. into separate nss_db package soon
  195. * Wed Jul 19 2000 Jakub Jelinek <jakub@redhat.com>
  196. - rebuild to cope with glibc locale binary incompatibility
  197. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  198. - automatic rebuild
  199. * Sun Jun 11 2000 Jeff Johnson <jbj@redhat.com>
  200. - upgrade to 3.1.14.
  201. - create db3-utils sub-package to hide tcl dependency, enable tcl Yet Again.
  202. - FHS packaging.
  203. * Mon Jun 5 2000 Jeff Johnson <jbj@redhat.com>
  204. - disable tcl Yet Again, base packages cannot depend on libtcl.so.
  205. * Sat Jun 3 2000 Jeff Johnson <jbj@redhat.com>
  206. - enable tcl, rebuild against tcltk 8.3.1 (w/o pthreads).
  207. * Tue May 30 2000 Matt Wilson <msw@redhat.com>
  208. - include /lib/libdb.so in the devel package
  209. * Wed May 10 2000 Jeff Johnson <jbj@redhat.com>
  210. - put in "System Environment/Libraries" per msw instructions.
  211. * Tue May 9 2000 Jeff Johnson <jbj@redhat.com>
  212. - install shared library in /lib, not /usr/lib.
  213. - move API docs to db3-devel.
  214. * Mon May 8 2000 Jeff Johnson <jbj@redhat.com>
  215. - don't rename db_* to db3_*.
  216. * Tue May 2 2000 Jeff Johnson <jbj@redhat.com>
  217. - disable --enable-test --enable-debug_rop --enable-debug_wop.
  218. - disable --enable-posixmutexes --enable-tcl as well, to avoid glibc-2.1.3
  219. problems.
  220. * Mon Apr 24 2000 Jeff Johnson <jbj@redhat.com>
  221. - add 3.0.55.1 alignment patch.
  222. - add --enable-posixmutexes (linux threads has not pthread_*attr_setpshared).
  223. - add --enable-tcl (needed -lpthreads).
  224. * Sat Apr 1 2000 Jeff Johnson <jbj@redhat.com>
  225. - add --enable-debug_{r,w}op for now.
  226. - add variable to set shm perms.
  227. * Sat Mar 25 2000 Jeff Johnson <jbj@redhat.com>
  228. - update to 3.0.55
  229. * Tue Dec 29 1998 Jeff Johnson <jbj@redhat.com>
  230. - Add --enable-cxx to configure.
  231. * Thu Jun 18 1998 Jeff Johnson <jbj@redhat.com>
  232. - Create.