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.

102 lines
2.1 KiB

26 years ago
  1. #!/bin/sh
  2. # GNU ncurses
  3. # search & check GNU make
  4. GMAKE="gmake"
  5. $GMAKE --version || GMAKE="make"
  6. $GMAKE --version || exit
  7. MAKE=$GMAKE
  8. export MAKE
  9. CC=gcc
  10. CFLAGS="-O6 -fomit-frame-pointer"
  11. CXX=gcc
  12. CXXFLAGS="-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"
  13. # LDFLAGS="-static"
  14. LD=gcc
  15. export CC
  16. export CXX
  17. export LD
  18. export CFLAGS
  19. export CXXFLAGS
  20. # export LDFLAGS
  21. # Solaris don't have libpthread.a.
  22. if [ "x$1" = "x" ]; then
  23. echo " please set character set"
  24. exit
  25. fi
  26. CHAR="$1"
  27. case "$1" in
  28. [uU]*)
  29. CHAR=ujis
  30. ;;
  31. [sS]*)
  32. CHAR=sjis
  33. ;;
  34. esac
  35. #---------------
  36. P=`pwd`
  37. if [ -f Makefile ] ; then
  38. ${GMAKE} distclean
  39. fi
  40. for i in bin sbin include man share/doc/mysql mysql-data
  41. do
  42. /usr/bin/mkdir -p PKG/tmp-${CHAR}/usr/local/${i}
  43. done
  44. /usr/bin/mkdir -p PKG/tmp-${CHAR}/etc/init.d
  45. #----------------------------
  46. ./configure \
  47. --prefix=/usr/local \
  48. --libexecdir=/usr/local/sbin \
  49. --sbindir=/usr/local/sbin \
  50. --localstatedir=/usr/local/mysql-data \
  51. --with-charset=${CHAR} \
  52. --with-extra-charsets=all \
  53. --with-raid \
  54. --without-docs \
  55. --without-bench \
  56. --without-perl \
  57. --with-gcc \
  58. --with-mysqld-ldflags="-static" \
  59. --with-client-ldflags="-static" \
  60. --with-named-curses-libs=/usr/local/lib/libncurses.a \
  61. --with-mysqld-user=mysql
  62. # --with-berkeley-db-includes=/usr/local/include/db3 \
  63. # --with-berkeley-db-libs=/usr/local/lib/libdb3.a \
  64. # --with-low-memory
  65. ${GMAKE}
  66. ${GMAKE} install DESTDIR=${P}/PKG/tmp-${CHAR}
  67. v=`grep '^SHARED_LIB_VERSION' configure.in | sed 's@SHARED_LIB_VERSION@@' | sed -e 's@=@@' -e 's@:@ @g' | awk '{print $1}'`
  68. km="libmysqlclient.so.$v"
  69. export km
  70. (cd ${P}/PKG/tmp-${CHAR}/usr/local/lib/mysql/ ; \
  71. for i in libmysqlclient* ; do \
  72. if /usr/bin/test ! -L $i ; then \
  73. mv $i ../ ; ln -sf ../$i ; \
  74. fi ; \
  75. done ; \
  76. k=`ls libmysqlclient.so.*.*.*` ; \
  77. cd .. ; \
  78. if /usr/bin/test ! -z libmysqlclient.so ; then \
  79. ln -sf $k libmysqlclient.so ;
  80. fi ; \
  81. if /usr/bin/test ! -z $km ; then \
  82. ln -sf $k $km ;
  83. fi ; \
  84. )
  85. #
  86. (cd ${P}/PKG/tmp-${CHAR}/usr/local/bin ; strip * )
  87. (cd ${P}/PKG/tmp-${CHAR}/usr/local/sbin ; strip * )