Makefile 2.4 KB

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