Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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.52
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@GNU/libmicrohttpd
  13. PKG_MD5SUM:=54797f6e763d417627f89f60e4ae0a431dab0523f92f83def23ea02d0defafea
  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))