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.

88 lines
3.2 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 - 2004 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. is_bdb_default || var_append confopt ' ' "--program-transform-name='s/db/${xpkg:1}/'"
  36. # bdb doesn't like some of our make options
  37. makeopt="docdir=$docdir all"
  38. makeinstopt="docdir=$docdir install"
  39. hook_add postinstall 8 'chmod 755 $libdir/libdb-${xpkg:3:1}.${xpkg:4:1}.so \
  40. $libdir/libdb_cxx-${xpkg:3:1}.${xpkg:4:1}.so'
  41. # create yet another alternative library name some programs use
  42. # this will crate a symlinks in the form libdb-4.1.so -> libdb41.so
  43. hook_add postinstall 9 'ln -sfv libdb-${xpkg:3:1}.${xpkg:4:1}.so $libdir/libdb${xpkg:3}.so'
  44. hook_add postinstall 9 'ln -sfv libdb-${xpkg:3:1}.${xpkg:4:1}.a $libdir/libdb${xpkg:3}.a'
  45. # bdb does copy the docs itself ...
  46. createdocs=0
  47. if is_bdb_default; then
  48. # default headers
  49. hook_add postmake 3 "ln -sfv ${xpkg:1}/db.h $root/$prefix/include/db.h"
  50. hook_add postmake 3 "ln -sfv ${xpkg:1}/db_185.h $root/$prefix/include/db_185.h"
  51. hook_add postmake 3 "[ -e $includedir/db ] || \
  52. ln -sfv ${xpkg:1} $includedir/db"
  53. # default libs
  54. hook_add postmake 5 'ln -sfv libdb-${xpkg:3:1}.${xpkg:4:1}.so $libdir/libdb.so'
  55. hook_add postmake 5 'ln -sfv libdb-${xpkg:3:1}.${xpkg:4:1}.a $libdir/libdb.a'
  56. fi
  57. if [ $xpkg = bdb33 ]
  58. then
  59. # should actually done by make
  60. hook_add postmake 3 'ln -svf libdb-3.3.a $libdir/libdb-3.a'
  61. hook_add postmake 3 'ln -svf libdb_cxx-3.3.a $libdir/libdb_cxx-3.a'
  62. # default for it's mayor version
  63. hook_add postmake 4 '[ -e $includedir/${xpkg:1:3} ] || \
  64. ln -svf ${xpkg:1} $includedir/${xpkg:1:3}'
  65. else
  66. if is_bdb_default; then
  67. # default for it's mayor version
  68. hook_add postmake 4 '[ -e $includedir/${xpkg:1:3} ] || \
  69. ln -svf ${xpkg:1} $includedir/${xpkg:1:3}'
  70. hook_add postmake 5 'ln -sfv libdb-${xpkg:3:1}.${xpkg:4:1}.so $libdir/libdb${xpkg:3:1}.so'
  71. hook_add postmake 5 'ln -sfv libdb-${xpkg:3:1}.${xpkg:4:1}.a $libdir/libdb${xpkg:3:1}.a'
  72. fi
  73. fi