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.

69 lines
1.8 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=libulfius
  3. PKG_VERSION:=2.7.2
  4. PKG_RELEASE:=$(AUTORELEASE)
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://codeload.github.com/babelouest/ulfius/tar.gz/v$(PKG_VERSION)?
  7. PKG_HASH:=8d3456e85302d1218f83602f2166889d7e1a3d039fce579db7020d619f36c6e3
  8. PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
  9. PKG_LICENSE:=LGPL-2.1-or-later
  10. PKG_LICENSE_FILES:=LICENSE
  11. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/ulfius-$(PKG_VERSION)
  12. CMAKE_INSTALL:=1
  13. include $(INCLUDE_DIR)/package.mk
  14. include $(INCLUDE_DIR)/cmake.mk
  15. define Package/libulfius/default
  16. SECTION:=libs
  17. CATEGORY:=Libraries
  18. SUBMENU:=Networking
  19. TITLE:=Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language.
  20. URL:=https://github.com/babelouest/ulfius
  21. endef
  22. define Package/libulfius-nossl
  23. $(call Package/libulfius/default)
  24. VARIANT:=nossl
  25. DEFAULT_VARIANT:=1
  26. DEPENDS:=+libmicrohttpd +libcurl +liborcania
  27. PROVIDES:=libulfius
  28. endef
  29. define Package/libulfius-gnutls
  30. $(call Package/libulfius/default)
  31. TITLE+= with SSL support
  32. VARIANT:=gnutls
  33. DEPENDS:=+libmicrohttpd +libcurl +liborcania +libgnutls +zlib
  34. PROVIDES:=libulfius
  35. endef
  36. define Package/libulfius-$(BUILD_VARIANT)/install
  37. $(INSTALL_DIR) $(1)/usr/lib/
  38. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libulfius.so.* \
  39. $(1)/usr/lib/
  40. endef
  41. CMAKE_OPTIONS += \
  42. -DDOWNLOAD_DEPENDENCIES=OFF \
  43. -DBUILD_WEBSOCKET=OFF \
  44. -DSEARCH_ORCANIA_U=ON \
  45. -DWITH_CURL=ON \
  46. -DWITH_JANSSON=OFF \
  47. -DWITH_STRSTR=ON \
  48. -DWITH_YDER=OFF \
  49. -DSEARCH_YDER=OFF \
  50. -DCMAKE_BUILD_TYPE=Release
  51. ifeq ($(BUILD_VARIANT),gnutls)
  52. CMAKE_OPTIONS += -DWITH_GNUTLS=ON
  53. else
  54. CMAKE_OPTIONS += -DWITH_GNUTLS=OFF
  55. endif
  56. $(eval $(call BuildPackage,libulfius-gnutls))
  57. $(eval $(call BuildPackage,libulfius-nossl))