Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.22
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= c4d2dfabb20a8e26e8437dff41f366520001eb031ffd77fbfcde70d0073fc9f6
  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}' cmake .
  31. host-build:
  32. cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  33. ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
  34. pre-configure:
  35. $(SED) "s#@@STAGING_DIR@@#${STAGING_TARGET_DIR}#" ${WRKBUILD}/scripts/mysql_config.sh
  36. mysql-hostinstall:
  37. $(INSTALL_BIN) ${WRKBUILD}/extra/comp_err \
  38. $(STAGING_HOST_DIR)/usr/bin
  39. $(INSTALL_BIN) ${WRKBUILD}/scripts/comp_sql \
  40. $(STAGING_HOST_DIR)/usr/bin
  41. $(INSTALL_BIN) ${WRKBUILD}/sql/gen_lex_hash \
  42. $(STAGING_HOST_DIR)/usr/bin
  43. $(INSTALL_BIN) ${WRKBUILD}/storage/perfschema/gen_pfs_lex_token \
  44. $(STAGING_HOST_DIR)/usr/bin
  45. post-configure:
  46. $(CP) $(STAGING_HOST_DIR)/usr/bin/comp_err \
  47. ${WRKBUILD}/extra/
  48. $(CP) $(STAGING_HOST_DIR)/usr/bin/comp_sql \
  49. ${WRKBUILD}/scripts/
  50. $(CP) $(STAGING_HOST_DIR)/usr/bin/gen_lex_hash \
  51. ${WRKBUILD}/sql/
  52. $(CP) $(STAGING_HOST_DIR)/usr/bin/gen_pfs_lex_token \
  53. ${WRKBUILD}/storage/perfschema/
  54. libmysqlclient-install:
  55. ${INSTALL_DIR} ${IDIR_LIBMYSQLCLIENT}/usr/lib
  56. ${CP} ${WRKINST}/usr/lib/libmysqlclient.so* \
  57. ${IDIR_LIBMYSQLCLIENT}/usr/lib
  58. include ${ADK_TOPDIR}/mk/host-bottom.mk
  59. include ${ADK_TOPDIR}/mk/pkg-bottom.mk