Makefile 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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:= tntnet
  5. PKG_VERSION:= 1.6.4
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= e2c3c5075a890711a7569730493c0996
  8. PKG_DESCR:= small C++ application server
  9. PKG_SECTION:= net
  10. PKG_DEPENDS:= cxxtools zlib libpthread libiconv
  11. PKG_URL:= http://www.tntnet.org
  12. PKG_SITES:= http://www.tntnet.org/download/
  13. include ${TOPDIR}/mk/package.mk
  14. ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y)
  15. PKG_DEPENDS+= uclibc++
  16. else
  17. PKG_DEPENDS+= libstdcxx
  18. endif
  19. ifeq (${ADK_COMPILE_TNTNET_WITH_OPENSSL},y)
  20. PKG_DEPENDS+= libopenssl
  21. endif
  22. ifeq (${ADK_COMPILE_TNTNET_WITH_GNUTLS},y)
  23. PKG_DEPENDS+= libgnutls
  24. endif
  25. $(eval $(call PKG_template,TNTNET,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  26. ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y)
  27. TCXXFLAGS+= -fno-builtin -nostdinc++ -nodefaultlibs -I${STAGING_DIR}/usr/include/uClibc++
  28. TLDFLAGS+= -nodefaultlibs -luClibc++ -liconv -lpthread -lcxxtools -lm
  29. else
  30. TLDFLAGS+= -liconv -lpthread -lcxxtools -lm -ldl
  31. endif
  32. CONFIGURE_STYLE:= gnu
  33. CONFIGURE_ARGS+= --without-epoll \
  34. --without-sdk \
  35. --without-cgi \
  36. --without-sendfile
  37. ifeq (${ADK_COMPILE_TNTNET_WITH_OPENSSL},y)
  38. CONFIGURE_ARGS+= --with-ssl=openssl
  39. else ifeq (${ADK_COMPILE_TNTNET_WITH_GNUTLS},y)
  40. CONFIGURE_ARGS+= --with-ssl=gnutls
  41. else
  42. CONFIGURE_ARGS+= --without-ssl
  43. endif
  44. CONFIGURE_ENV+= CXXFLAGS='${TCXXFLAGS}' \
  45. ac_cv_path_cxxtools_config=${STAGING_DIR}/usr/bin
  46. BUILD_STYLE:= auto
  47. INSTALL_STYLE:= auto
  48. ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y)
  49. # add workaround because libtool tries to link libstdc++
  50. post-configure:
  51. ${SED} 's#postdeps="-lstdc.*#postdeps="-lm"#' \
  52. ${WRKBUILD}/libtool
  53. endif
  54. post-install:
  55. ${INSTALL_DIR} ${IDIR_TNTNET}/www
  56. ${INSTALL_DIR} ${IDIR_TNTNET}/etc/tntnet
  57. ${INSTALL_DIR} ${IDIR_TNTNET}/usr/bin
  58. ${INSTALL_DIR} ${IDIR_TNTNET}/usr/lib/tntnet
  59. ${INSTALL_DATA} ./files/tntnet.{conf,properties} \
  60. ${IDIR_TNTNET}/etc/tntnet
  61. ${INSTALL_DATA} ./files/mime.conf \
  62. ${IDIR_TNTNET}/etc/tntnet
  63. ${CP} ${WRKINST}/usr/bin/tntnet ${IDIR_TNTNET}/usr/bin
  64. ${CP} ${WRKINST}/usr/lib/tntnet/tntnet.so* ${IDIR_TNTNET}/usr/lib/tntnet
  65. ${CP} ${WRKINST}/usr/lib/libtntnet.so.* ${IDIR_TNTNET}/usr/lib
  66. include ${TOPDIR}/mk/pkg-bottom.mk