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.

94 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.55
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@GNU/libmicrohttpd
  13. PKG_HASH:=0c1cab8dc9f2588bd3076a28f77a7f8de9560cbf2d80e53f9a8696ada80ed0f8
  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. CONFLICTS:=libmicrohttpd
  38. endef
  39. define Package/libmicrohttpd/description/Default
  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. define Package/libmicrohttpd-no-ssl/description
  44. $(call Package/libmicrohttp/description/Default)
  45. endef
  46. CONFIGURE_ARGS+= \
  47. --disable-curl \
  48. --disable-spdy \
  49. --without-openssl
  50. ifeq ($(BUILD_VARIANT),no-ssl)
  51. CONFIGURE_ARGS += \
  52. --disable-https \
  53. --without-gnutls
  54. else
  55. CONFIGURE_ARGS += \
  56. --enable-https \
  57. --with-gnutls
  58. endif
  59. define Build/InstallDev
  60. $(INSTALL_DIR) $(1)/usr/include/
  61. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  62. $(INSTALL_DIR) $(1)/usr/lib/
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
  64. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  65. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  66. endef
  67. define Package/libmicrohttpd/install
  68. $(INSTALL_DIR) $(1)/usr/lib/
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  70. endef
  71. define Package/libmicrohttpd-no-ssl/install
  72. $(call Package/libmicrohttpd/install,$1)
  73. endef
  74. $(eval $(call BuildPackage,libmicrohttpd))
  75. $(eval $(call BuildPackage,libmicrohttpd-no-ssl))