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