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.

93 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.75
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@GNU/libmicrohttpd
  13. PKG_HASH:=9278907a6f571b391aab9644fd646a5108ed97311ec66f6359cebbedb0a4e3bb
  14. PKG_MAINTAINER:=Alexander Couzens <lynxis@fe80.eu>
  15. PKG_LICENSE:=LGPL-2.1-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=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:=https://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. define Package/libmicrohttpd/description
  40. GNU libmicrohttpd is a small C library that is supposed to make it easy
  41. to run an HTTP server as part of another application.
  42. endef
  43. CONFIGURE_ARGS += \
  44. --disable-curl \
  45. --disable-rpath \
  46. --disable-doc \
  47. --disable-examples \
  48. --disable-poll \
  49. --enable-epoll \
  50. --with-pic
  51. ifeq ($(BUILD_VARIANT),ssl)
  52. CONFIGURE_ARGS += \
  53. --enable-https \
  54. --with-gnutls
  55. else
  56. CONFIGURE_ARGS += \
  57. --disable-https \
  58. --without-gnutls
  59. endif
  60. define Build/InstallDev
  61. $(INSTALL_DIR) $(1)/usr/include/
  62. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/microhttpd.h $(1)/usr/include/
  63. $(INSTALL_DIR) $(1)/usr/lib/
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.{so*,a,la} $(1)/usr/lib/
  65. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  66. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmicrohttpd.pc $(1)/usr/lib/pkgconfig/
  67. endef
  68. define Package/libmicrohttpd-no-ssl/install
  69. $(INSTALL_DIR) $(1)/usr/lib/
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
  71. endef
  72. define Package/libmicrohttpd-ssl/install
  73. $(INSTALL_DIR) $(1)/usr/lib/
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
  75. endef
  76. $(eval $(call BuildPackage,libmicrohttpd-no-ssl))
  77. $(eval $(call BuildPackage,libmicrohttpd-ssl))