Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # $Id$
  2. #-
  3. # This file is part of the OpenADK project. OpenADK is copyrighted
  4. # material, please see the LICENCE file in the top-level directory.
  5. include ${TOPDIR}/rules.mk
  6. PKG_NAME:= mini-httpd
  7. PKG_VERSION:= 1.19
  8. PKG_RELEASE:= 10
  9. PKG_MD5SUM:= 7c68293ad265ecfe2edea917912f6f1f
  10. MASTER_SITES:= http://www.acme.com/software/mini_httpd/
  11. DISTFILES:= mini_httpd-${PKG_VERSION}.tar.gz
  12. WRKDIST= ${WRKDIR}/mini_httpd-${PKG_VERSION}
  13. include ${TOPDIR}/mk/package.mk
  14. $(eval $(call PKG_template,MINI_HTTPD,mini-httpd,${PKG_VERSION}-${PKG_RELEASE}))
  15. $(eval $(call PKG_template,MINI_HTTPD_HTPASSWD,mini-httpd-htpasswd,${PKG_VERSION}-${PKG_RELEASE}))
  16. $(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,${PKG_VERSION}-${PKG_RELEASE}))
  17. do-build:
  18. # with OpenSSL
  19. ifneq (${ADK_PACKAGE_MINI_HTTPD_OPENSSL},)
  20. ${MAKE} -C ${WRKBUILD} \
  21. CC="${TARGET_CC}" \
  22. SSL_DEFS="-DUSE_SSL -DHAVE_OPENSSL" \
  23. SSL_INC="-I${STAGING_DIR}/usr/include" \
  24. SSL_LIBS="-L${STAGING_DIR}/usr/lib -lssl -lcrypto" \
  25. all
  26. (cd ${WRKBUILD}; mv mini_httpd mini_httpd-openssl; )
  27. ${MAKE} -C ${WRKBUILD} clean
  28. endif
  29. # without SSL
  30. ifneq (${ADK_PACKAGE_MINI_HTTPD},)
  31. ${MAKE} -C ${WRKBUILD} \
  32. CC="${TARGET_CC}" \
  33. all
  34. endif
  35. do-install:
  36. # without SSL
  37. ifneq (${ADK_PACKAGE_MINI_HTTPD},)
  38. ${INSTALL_DIR} ${IDIR_MINI_HTTPD}/etc/init.d
  39. ${INSTALL_DATA} ./files/mini_httpd.conf ${IDIR_MINI_HTTPD}/etc/mini_httpd.conf
  40. ${INSTALL_BIN} ./files/mini_httpd.init ${IDIR_MINI_HTTPD}/etc/init.d/mini_httpd
  41. ${INSTALL_DIR} ${IDIR_MINI_HTTPD}/usr/sbin
  42. ${INSTALL_BIN} ${WRKBUILD}/mini_httpd ${IDIR_MINI_HTTPD}/usr/sbin/
  43. ${INSTALL_DIR} ${IDIR_MINI_HTTPD_HTPASSWD}/usr/sbin
  44. install -m0755 ${WRKBUILD}/htpasswd ${IDIR_MINI_HTTPD_HTPASSWD}/usr/sbin/
  45. endif
  46. # with OpenSSL
  47. ifneq (${ADK_PACKAGE_MINI_HTTPD_OPENSSL},)
  48. ${INSTALL_DIR} ${IDIR_MINI_HTTPD_OPENSSL}/etc/init.d
  49. ${INSTALL_DATA} ./files/mini_httpd-ssl.conf ${IDIR_MINI_HTTPD_OPENSSL}/etc/mini_httpd.conf
  50. install -m0600 ./files/mini_httpd.pem ${IDIR_MINI_HTTPD_OPENSSL}/etc/
  51. ${INSTALL_BIN} ./files/mini_httpd.init \
  52. ${IDIR_MINI_HTTPD_OPENSSL}/etc/init.d/mini_httpd
  53. ${INSTALL_DIR} ${IDIR_MINI_HTTPD_OPENSSL}/usr/sbin
  54. ${INSTALL_BIN} ${WRKBUILD}/mini_httpd-openssl ${IDIR_MINI_HTTPD_OPENSSL}/usr/sbin/mini_httpd
  55. endif
  56. include ${TOPDIR}/mk/pkg-bottom.mk