1
0

Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 ${ADK_TOPDIR}/rules.mk
  4. PKG_NAME:= mysql
  5. PKG_VERSION:= 5.6.19
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= a663c5b3c710043c74f97902a1ed62c0
  8. PKG_DESCR:= mysql client library
  9. PKG_SECTION:= libs/db
  10. PKG_DEPENDS:= libncurses zlib libevent
  11. PKG_BUILDDEP:= cmake-host mysql-host ncurses zlib readline libevent
  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 ${ADK_TOPDIR}/mk/host.mk
  19. include ${ADK_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:= cmake
  24. CMAKE_FLAGS+= -DSTACK_DIRECTION=1 \
  25. -DHAVE_LLVM_LIBCPP=0 \
  26. -DWITH_EDITLINE=bundled \
  27. -DCURSES_LIBRARY="$(STAGING_TARGET_DIR)/usr/lib" \
  28. -DCURSES_INCLUDE_PATH="$(STAGING_TARGET_DIR)/usr/include"
  29. host-configure:
  30. cd ${WRKBUILD} && PATH='${HOST_PATH}' \
  31. cmake .
  32. host-build:
  33. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  34. ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
  35. pre-configure:
  36. $(SED) "s#@@STAGING_DIR@@#${STAGING_TARGET_DIR}#" ${WRKBUILD}/scripts/mysql_config.sh
  37. mysql-hostinstall:
  38. $(INSTALL_BIN) ${WRKBUILD}/extra/comp_err \
  39. $(STAGING_HOST_DIR)/usr/bin
  40. $(INSTALL_BIN) ${WRKBUILD}/scripts/comp_sql \
  41. $(STAGING_HOST_DIR)/usr/bin
  42. $(INSTALL_BIN) ${WRKBUILD}/sql/gen_lex_hash \
  43. $(STAGING_HOST_DIR)/usr/bin
  44. $(INSTALL_BIN) ${WRKBUILD}/storage/perfschema/gen_pfs_lex_token \
  45. $(STAGING_HOST_DIR)/usr/bin
  46. post-configure:
  47. $(CP) $(STAGING_HOST_DIR)/usr/bin/comp_err \
  48. ${WRKBUILD}/extra/
  49. $(CP) $(STAGING_HOST_DIR)/usr/bin/comp_sql \
  50. ${WRKBUILD}/scripts/
  51. $(CP) $(STAGING_HOST_DIR)/usr/bin/gen_lex_hash \
  52. ${WRKBUILD}/sql/
  53. $(CP) $(STAGING_HOST_DIR)/usr/bin/gen_pfs_lex_token \
  54. ${WRKBUILD}/storage/perfschema/
  55. libmysqlclient-install:
  56. ${INSTALL_DIR} ${IDIR_LIBMYSQLCLIENT}/usr/lib
  57. ${CP} ${WRKINST}/usr/lib/libmysqlclient.so* \
  58. ${IDIR_LIBMYSQLCLIENT}/usr/lib
  59. include ${ADK_TOPDIR}/mk/host-bottom.mk
  60. include ${ADK_TOPDIR}/mk/pkg-bottom.mk