mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
3.4 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/bdb/bdb.conf
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. echo_status "Set package version number based on name: $ver"
  23. hook_add preconf 2 'cd build_unix'
  24. configscript="../dist/configure"
  25. if [ $stagelevel -gt 1 ] ; then
  26. var_append confopt ' ' '--enable-cxx'
  27. fi
  28. var_append confopt ' ' '--enable-compat185'
  29. var_append confopt ' ' "--includedir=$root/$prefix/include/${xpkg:1}"
  30. is_bdb_default() {
  31. [ "$xpkg" = "$ROCKCFG_PKG_BDB_DEFAULT" ]
  32. }
  33. # we need the install-sh here, since our gnu-install does not
  34. # handle the transform-name ...
  35. if ! is_bdb_default; then
  36. var_append confopt ' ' "--program-transform-name='s/db/${xpkg:1}/'"
  37. var_append makeinstopt ' ' "transform='s/db/${xpkg:1}/'"
  38. fi
  39. # bdb doesn't like some of our make options
  40. makeopt="docdir=$docdir all"
  41. makeinstopt="docdir=$docdir install"
  42. hook_add postinstall 8 'chmod 755 $libdir/libdb-${xpkg:3:1}.${xpkg:4:1}.so \
  43. $libdir/libdb_cxx-${xpkg:3:1}.${xpkg:4:1}.so'
  44. # create yet another alternative library name some programs use
  45. # this will crate a symlinks in the form libdb-4.1.so -> libdb41.so
  46. hook_add postinstall 9 'ln -sfv libdb-${xpkg:3:1}.${xpkg:4:1}.so $libdir/libdb${xpkg:3}.so'
  47. hook_add postinstall 9 'ln -sfv libdb-${xpkg:3:1}.${xpkg:4:1}.a $libdir/libdb${xpkg:3}.a'
  48. # bdb does copy the docs itself ...
  49. createdocs=0
  50. if is_bdb_default; then
  51. # default headers
  52. hook_add postmake 3 "ln -sfv ${xpkg:1}/db.h $root/$prefix/include/db.h"
  53. hook_add postmake 3 "ln -sfv ${xpkg:1}/db_185.h $root/$prefix/include/db_185.h"
  54. hook_add postmake 3 "[ -e $includedir/db ] || \
  55. ln -sfv ${xpkg:1} $includedir/db"
  56. # default libs
  57. hook_add postmake 5 'ln -sfv libdb-${xpkg:3:1}.${xpkg:4:1}.so $libdir/libdb.so'
  58. hook_add postmake 5 'ln -sfv libdb-${xpkg:3:1}.${xpkg:4:1}.a $libdir/libdb.a'
  59. fi
  60. if [ $xpkg = bdb33 ]
  61. then
  62. # should actually done by make
  63. hook_add postmake 3 'ln -svf libdb-3.3.a $libdir/libdb-3.a'
  64. hook_add postmake 3 'ln -svf libdb_cxx-3.3.a $libdir/libdb_cxx-3.a'
  65. # default for it's mayor version
  66. hook_add postmake 4 '[ -e $includedir/${xpkg:1:3} ] || \
  67. ln -svf ${xpkg:1} $includedir/${xpkg:1:3}'
  68. else
  69. if is_bdb_default; then
  70. # default for it's mayor version
  71. hook_add postmake 4 '[ -e $includedir/${xpkg:1:3} ] || \
  72. ln -svf ${xpkg:1} $includedir/${xpkg:1:3}'
  73. hook_add postmake 5 'ln -sfv libdb-${xpkg:3:1}.${xpkg:4:1}.so $libdir/libdb${xpkg:3:1}.so'
  74. hook_add postmake 5 'ln -sfv libdb-${xpkg:3:1}.${xpkg:4:1}.a $libdir/libdb${xpkg:3:1}.a'
  75. fi
  76. fi
  77. # adding -pthread switch so we don't end up with dangling symbol references
  78. var_append GCC_WRAPPER_INSERT ' ' '-pthread'