Makefile 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= mysql
  5. PKG_VERSION:= 5.6.17
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= 82114fa7c13fa3ca897b34666577d9f4
  8. PKG_DESCR:= mysql client library
  9. PKG_SECTION:= libs/db
  10. PKG_DEPENDS:= libncurses zlib
  11. PKG_BUILDDEP:= cmake-host mysql-host ncurses zlib readline
  12. HOST_BUILDDEP:= cmake-host
  13. PKG_URL:= http://www.mysql.com/
  14. PKG_SITES= ${MASTER_SITE_MYSQL:=Downloads/MySQL-5.6/}
  15. PKG_LIBNAME:= libmysqlclient
  16. PKG_OPTS:= dev
  17. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
  18. include ${TOPDIR}/mk/host.mk
  19. include ${TOPDIR}/mk/package.mk
  20. $(eval $(call HOST_template,MYSQL,mysql,${PKG_VERSION}-${PKG_RELEASE}))
  21. $(eval $(call PKG_template,LIBMYSQLCLIENT,libmysqlclient,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  22. HOST_STYLE:= manual
  23. CONFIG_STYLE:= manual
  24. host-configure:
  25. cd ${WRKBUILD} && PATH='${HOST_PATH}' \
  26. cmake .
  27. host-build:
  28. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  29. ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
  30. pre-configure:
  31. $(SED) "s#@@STAGING_DIR@@#${STAGING_TARGET_DIR}#" ${WRKBUILD}/scripts/mysql_config.sh
  32. mysql-hostinstall:
  33. $(INSTALL_BIN) ${WRKBUILD}/extra/comp_err \
  34. $(STAGING_HOST_DIR)/usr/bin
  35. $(INSTALL_BIN) ${WRKBUILD}/scripts/comp_sql \
  36. $(STAGING_HOST_DIR)/usr/bin
  37. $(INSTALL_BIN) ${WRKBUILD}/sql/gen_lex_hash \
  38. $(STAGING_HOST_DIR)/usr/bin
  39. $(INSTALL_BIN) ${WRKBUILD}/storage/perfschema/gen_pfs_lex_token \
  40. $(STAGING_HOST_DIR)/usr/bin
  41. do-configure:
  42. sed -e "s#@@TARGET_CC@@#$(TARGET_CC)#" \
  43. -e "s#@@TARGET_CXX@@#$(TARGET_CXX)#" \
  44. -e "s#@@TARGET_CFLAGS@@#$(TARGET_CFLAGS)#" \
  45. -e "s#@@TARGET_CXXFLAGS@@#$(TARGET_CXXFLAGS)#" \
  46. -e "s#@@STAGING_TARGET_DIR@@#$(STAGING_TARGET_DIR)#" \
  47. -e "s#@@STAGING_HOST_DIR@@#$(STAGING_HOST_DIR)#" \
  48. $(SCRIPT_DIR)/toolchain.cmake.in > $(SCRIPT_DIR)/toolchain.cmake
  49. (cd ${WRKBUILD} && PATH='${HOST_PATH}' \
  50. cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
  51. -DCMAKE_TOOLCHAIN_FILE="$(SCRIPT_DIR)/toolchain.cmake" \
  52. -DWITH_EDITLINE=bundled \
  53. -DCURSES_LIBRARY="$(STAGING_TARGET_DIR)/usr/lib" \
  54. -DCURSES_INCLUDE_PATH="$(STAGING_TARGET_DIR)/usr/lib" \
  55. -DSTACK_DIRECTION=1 \
  56. .)
  57. $(CP) $(STAGING_HOST_DIR)/usr/bin/comp_err \
  58. ${WRKBUILD}/extra/
  59. $(CP) $(STAGING_HOST_DIR)/usr/bin/comp_sql \
  60. ${WRKBUILD}/scripts/
  61. $(CP) $(STAGING_HOST_DIR)/usr/bin/gen_lex_hash \
  62. ${WRKBUILD}/sql/
  63. $(CP) $(STAGING_HOST_DIR)/usr/bin/gen_pfs_lex_token \
  64. ${WRKBUILD}/storage/perfschema/
  65. libmysqlclient-install:
  66. ${INSTALL_DIR} ${IDIR_LIBMYSQLCLIENT}/usr/lib
  67. ${CP} ${WRKINST}/usr/lib/libmysqlclient.so* \
  68. ${IDIR_LIBMYSQLCLIENT}/usr/lib
  69. include ${TOPDIR}/mk/host-bottom.mk
  70. include ${TOPDIR}/mk/pkg-bottom.mk