You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.3 KiB

  1. #
  2. # Copyright (C) 2010-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libmicrohttpd
  9. PKG_VERSION:=0.9.62
  10. PKG_RELEASE:=3
  11. PKG_MAINTAINER:=Alexander Couzens <lynxis@fe80.eu>
  12. PKG_LICENSE:=LGPL-2.1
  13. PKG_LICENSE_FILES:=COPYING
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=@GNU/libmicrohttpd
  16. PKG_HASH:=bd3e097d703f5091a6a01b56c0464a90fdd17f5d50478cea50a346b25c88db49
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/libmicrohttpd/default
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=GNU libmicrohttpd is a library that runs an HTTP server.
  24. URL:=http://www.gnu.org/software/libmicrohttpd/
  25. endef
  26. define Package/libmicrohttpd-no-ssl
  27. $(call Package/libmicrohttpd/default)
  28. VARIANT:=nossl
  29. DEFAULT_VARIANT:=1
  30. PROVIDES:=libmicrohttpd
  31. endef
  32. define Package/libmicrohttpd-ssl
  33. $(call Package/libmicrohttpd/default)
  34. TITLE+= with SSL support
  35. VARIANT:=ssl
  36. DEPENDS:=+libgcrypt +libgnutls +libgpg-error
  37. PROVIDES:=libmicrohttpd
  38. endef
  39. CONFIGURE_ARGS+= \
  40. --disable-curl \
  41. --disable-rpath \
  42. --disable-doc \
  43. --disable-examples \
  44. --enable-poll=no \
  45. --enable-epoll=yes \
  46. ifeq ($(BUILD_VARIANT),ssl)
  47. CONFIGURE_ARGS += \
  48. --enable-https \
  49. --with-gnutls
  50. else
  51. CONFIGURE_ARGS += \
  52. --disable-https \
  53. --without-gnutls
  54. endif
  55. define Package/libmicrohttpd/description
  56. GNU libmicrohttpd is a small C library that is supposed to make it easy
  57. to run an HTTP server as part of another application.
  58. endef
  59. define Build/InstallDev
  60. $(INSTALL_DIR) $(1)/usr/include/
  61. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/microhttpd.h $(1)/usr/include/
  62. $(INSTALL_DIR) $(1)/usr/lib/
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.{so*,a,la} $(1)/usr/lib/
  64. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  65. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmicrohttpd.pc $(1)/usr/lib/pkgconfig/
  66. endef
  67. define Package/libmicrohttpd-no-ssl/install
  68. $(INSTALL_DIR) $(1)/usr/lib/
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
  70. endef
  71. define Package/libmicrohttpd-ssl/install
  72. $(INSTALL_DIR) $(1)/usr/lib/
  73. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
  74. endef
  75. $(eval $(call BuildPackage,libmicrohttpd-no-ssl))
  76. $(eval $(call BuildPackage,libmicrohttpd-ssl))