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.

90 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:=2
  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
  27. $(call Package/libmicrohttpd/default)
  28. VARIANT:=nossl
  29. CONFLICTS:=libmicrohttpd-ssl
  30. endef
  31. define Package/libmicrohttpd-ssl
  32. $(call Package/libmicrohttpd/default)
  33. TITLE+= with SSL support
  34. VARIANT:=ssl
  35. DEPENDS:=+libgcrypt +libgnutls +libgpg-error
  36. PROVIDES:=libmicrohttpd
  37. endef
  38. CONFIGURE_ARGS+= \
  39. --disable-curl \
  40. --disable-rpath \
  41. --disable-doc \
  42. --disable-examples \
  43. --enable-poll=no \
  44. --enable-epoll=yes \
  45. ifeq ($(BUILD_VARIANT),ssl)
  46. CONFIGURE_ARGS += \
  47. --enable-https \
  48. --with-gnutls
  49. else
  50. CONFIGURE_ARGS += \
  51. --disable-https \
  52. --without-gnutls
  53. endif
  54. define Package/libmicrohttpd/description
  55. GNU libmicrohttpd is a small C library that is supposed to make it easy
  56. to run an HTTP server as part of another application.
  57. endef
  58. define Build/InstallDev
  59. $(INSTALL_DIR) $(1)/usr/include/
  60. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/microhttpd.h $(1)/usr/include/
  61. $(INSTALL_DIR) $(1)/usr/lib/
  62. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.{so*,a,la} $(1)/usr/lib/
  63. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  64. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmicrohttpd.pc $(1)/usr/lib/pkgconfig/
  65. endef
  66. define Package/libmicrohttpd/install
  67. $(INSTALL_DIR) $(1)/usr/lib/
  68. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
  69. endef
  70. define Package/libmicrohttpd-ssl/install
  71. $(INSTALL_DIR) $(1)/usr/lib/
  72. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
  73. endef
  74. $(eval $(call BuildPackage,libmicrohttpd))
  75. $(eval $(call BuildPackage,libmicrohttpd-ssl))