db40-vl.spec 16 KB

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