Makefile 2.5 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:= mini-httpd
  5. PKG_VERSION:= 1.19
  6. PKG_RELEASE:= 10
  7. PKG_MD5SUM:= 7c68293ad265ecfe2edea917912f6f1f
  8. PKG_DESCR:= A small HTTP server
  9. PKG_MULTI:= 1
  10. PKG_SECTION:= www
  11. ifneq ($(ADK_PACKAGE_MINI_HTTPD_OPENSSL),)
  12. PKG_DEPENDS:= libopenssl
  13. PKG_BUILDDEP+= openssl
  14. endif
  15. PKG_URL:= http://www.acme.com/software/mini_httpd
  16. PKG_SITES:= http://www.acme.com/software/mini_httpd/
  17. PKG_DESCR_1:= htpasswd utility
  18. PKG_DESCR_2:= A small HTTP server with SSL support
  19. DISTFILES:= mini_httpd-${PKG_VERSION}.tar.gz
  20. WRKDIST= ${WRKDIR}/mini_httpd-${PKG_VERSION}
  21. include ${TOPDIR}/mk/package.mk
  22. $(eval $(call PKG_template,MINI_HTTPD,mini-httpd,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR},${PKG_SECTION}))
  23. $(eval $(call PKG_template,MINI_HTTPD_HTPASSWD,mini-httpd-htpasswd,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR_1},${PKG_SECTION}))
  24. $(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_2},${PKG_SECTION}))
  25. CONFIG_STYLE:= manual
  26. BUILD_STYLE:= manual
  27. INSTALL_STYLE:= manual
  28. do-build:
  29. # with OpenSSL
  30. ifneq (${ADK_PACKAGE_MINI_HTTPD_OPENSSL},)
  31. ${MAKE} -C ${WRKBUILD} \
  32. CC="${TARGET_CC}" \
  33. SSL_DEFS="-DUSE_SSL -DHAVE_OPENSSL" \
  34. SSL_INC="-I${STAGING_DIR}/usr/include" \
  35. SSL_LIBS="-L${STAGING_DIR}/usr/lib -lssl -lcrypto" \
  36. all
  37. (cd ${WRKBUILD}; mv mini_httpd mini_httpd-openssl; )
  38. ${MAKE} -C ${WRKBUILD} clean
  39. endif
  40. # without SSL
  41. ifneq (${ADK_PACKAGE_MINI_HTTPD},)
  42. ${MAKE} -C ${WRKBUILD} \
  43. CC="${TARGET_CC}" \
  44. all
  45. endif
  46. do-install:
  47. # without SSL
  48. ifneq (${ADK_PACKAGE_MINI_HTTPD},)
  49. ${INSTALL_DIR} ${IDIR_MINI_HTTPD}/etc
  50. ${INSTALL_DATA} ./files/mini_httpd.conf \
  51. ${IDIR_MINI_HTTPD}/etc/mini_httpd.conf
  52. ${INSTALL_DIR} ${IDIR_MINI_HTTPD}/usr/sbin
  53. ${INSTALL_BIN} ${WRKBUILD}/mini_httpd ${IDIR_MINI_HTTPD}/usr/sbin/
  54. ${INSTALL_DIR} ${IDIR_MINI_HTTPD_HTPASSWD}/usr/sbin
  55. ${INSTALL_BIN} ${WRKBUILD}/htpasswd \
  56. ${IDIR_MINI_HTTPD_HTPASSWD}/usr/sbin/
  57. endif
  58. # with OpenSSL
  59. ifneq (${ADK_PACKAGE_MINI_HTTPD_OPENSSL},)
  60. ${INSTALL_DIR} ${IDIR_MINI_HTTPD_OPENSSL}/etc
  61. ${INSTALL_DATA} ./files/mini_httpd-ssl.conf \
  62. ${IDIR_MINI_HTTPD_OPENSSL}/etc/mini_httpd.conf
  63. install -m0600 ./files/mini_httpd.pem ${IDIR_MINI_HTTPD_OPENSSL}/etc/
  64. ${INSTALL_DIR} ${IDIR_MINI_HTTPD_OPENSSL}/usr/sbin
  65. ${INSTALL_BIN} ${WRKBUILD}/mini_httpd-openssl \
  66. ${IDIR_MINI_HTTPD_OPENSSL}/usr/sbin/mini_httpd
  67. endif
  68. include ${TOPDIR}/mk/pkg-bottom.mk