Makefile 2.4 KB

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