/packages/databases/mysql-hosttools/build

http://github.com/OpenELEC/OpenELEC.tv · Shell · 60 lines · 26 code · 14 blank · 20 comment · 1 complexity · c6908f6b24f28d4e76255f9a9ed5e304 MD5 · raw file

  1. #!/bin/sh
  2. ################################################################################
  3. # This file is part of OpenELEC - http://www.openelec.tv
  4. # Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
  5. #
  6. # This Program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. #
  11. # This Program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with OpenELEC.tv; see the file COPYING. If not, write to
  18. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19. # http://www.gnu.org/copyleft/gpl.html
  20. ################################################################################
  21. . config/options $1
  22. $SCRIPTS/unpack mysql
  23. setup_toolchain host
  24. cd $BUILD/mysql*
  25. do_autoreconf
  26. mkdir -p .objdir-host && cd .objdir-host
  27. ../configure --host=$HOST_NAME \
  28. --build=$HOST_NAME \
  29. --prefix=/usr \
  30. --sysconfdir=/etc \
  31. --libexecdir=/usr/sbin \
  32. --localstatedir=/var/mysql \
  33. make -C include my_config.h
  34. make -C mysys libmysys.a
  35. make -C strings libmystrings.a
  36. make -C dbug factorial
  37. cp -PR dbug/factorial $ROOT/$TOOLCHAIN/bin/mysql-factorial
  38. make -C vio libvio.a
  39. make -C dbug libdbug.a
  40. make -C regex libregex.a
  41. make -C sql gen_lex_hash
  42. cp -PR sql/gen_lex_hash $ROOT/$TOOLCHAIN/bin/mysql-gen_lex_hash
  43. make -C scripts comp_sql
  44. cp -PR scripts/comp_sql $ROOT/$TOOLCHAIN/bin/mysql-comp_sql
  45. make -C extra comp_err
  46. cp -PR extra/comp_err $ROOT/$TOOLCHAIN/bin/mysql-comp_err