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.

95 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.49
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@GNU/libmicrohttpd
  13. PKG_MD5SUM:=3209aa2ac6199b874a6325342b86edbc
  14. PKG_MAINTAINER:=Alexander Couzens <lynxis@fe80.eu>
  15. PKG_LICENSE:=LGPL-2.1
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libmicrohttpd/Default
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=GNU libmicrohttpd is a library that runs an HTTP server.
  25. URL:=http://www.gnu.org/software/libmicrohttpd/
  26. endef
  27. define Package/libmicrohttpd
  28. $(call Package/libmicrohttpd/Default)
  29. TITLE+=(with-ssl)
  30. DEPENDS:=+libpthread +libgcrypt +libgnutls +libgpg-error
  31. endef
  32. define Package/libmicrohttpd-no-ssl
  33. $(call Package/libmicrohttpd/Default)
  34. TITLE+=(no-ssl)
  35. DEPENDS:=+libpthread
  36. VARIANT:=no-ssl
  37. PROVIDES:=libmicrohttpd
  38. CONFLICTS:=libmicrohttpd
  39. endef
  40. define Package/libmicrohttpd/description/Default
  41. GNU libmicrohttpd is a small C library that is supposed to make it easy
  42. to run an HTTP server as part of another application.
  43. endef
  44. define Package/libmicrohttpd-no-ssl/description
  45. $(call Package/libmicrohttp/description/Default)
  46. endef
  47. CONFIGURE_ARGS+= \
  48. --disable-curl \
  49. --disable-spdy \
  50. --without-openssl
  51. ifeq ($(BUILD_VARIANT),no-ssl)
  52. CONFIGURE_ARGS += \
  53. --disable-https \
  54. --without-gnutls
  55. else
  56. CONFIGURE_ARGS += \
  57. --enable-https \
  58. --with-gnutls
  59. endif
  60. define Build/InstallDev
  61. $(INSTALL_DIR) $(1)/usr/include/
  62. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  63. $(INSTALL_DIR) $(1)/usr/lib/
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
  65. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  66. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  67. endef
  68. define Package/libmicrohttpd/install
  69. $(INSTALL_DIR) $(1)/usr/lib/
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  71. endef
  72. define Package/libmicrohttpd-no-ssl/install
  73. $(call Package/libmicrohttpd/install,$1)
  74. endef
  75. $(eval $(call BuildPackage,libmicrohttpd))
  76. $(eval $(call BuildPackage,libmicrohttpd-no-ssl))