1
0

Makefile 2.4 KB

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