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.

70 lines
1.8 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=libulfius
  3. PKG_VERSION:=2.6.7
  4. PKG_RELEASE:=1
  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:=fbbcf693043409cc1929820b3eae5e1f7b1c93a3a8acec981946988ee3d0e85b
  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. PKG_BUILD_PARALLEL:=1
  13. CMAKE_INSTALL:=1
  14. include $(INCLUDE_DIR)/package.mk
  15. include $(INCLUDE_DIR)/cmake.mk
  16. define Package/libulfius/default
  17. SECTION:=libs
  18. CATEGORY:=Libraries
  19. SUBMENU:=Networking
  20. TITLE:=Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language.
  21. URL:=https://github.com/babelouest/ulfius
  22. endef
  23. define Package/libulfius-nossl
  24. $(call Package/libulfius/default)
  25. VARIANT:=nossl
  26. DEFAULT_VARIANT:=1
  27. DEPENDS:=+libmicrohttpd +libcurl +liborcania
  28. PROVIDES:=libulfius
  29. endef
  30. define Package/libulfius-gnutls
  31. $(call Package/libulfius/default)
  32. TITLE+= with SSL support
  33. VARIANT:=gnutls
  34. DEPENDS:=+libmicrohttpd +libcurl +libgnutls +liborcania
  35. PROVIDES:=libulfius
  36. endef
  37. define Package/libulfius-$(BUILD_VARIANT)/install
  38. $(INSTALL_DIR) $(1)/usr/lib/
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libulfius.so.* \
  40. $(1)/usr/lib/
  41. endef
  42. CMAKE_OPTIONS += \
  43. -DDOWNLOAD_DEPENDENCIES=OFF \
  44. -DBUILD_WEBSOCKET=OFF \
  45. -DSEARCH_ORCANIA_U=ON \
  46. -DWITH_CURL=ON \
  47. -DWITH_JANSSON=OFF \
  48. -DWITH_STRSTR=ON \
  49. -DWITH_YDER=OFF \
  50. -DSEARCH_YDER=OFF \
  51. -DCMAKE_BUILD_TYPE=Release
  52. ifeq ($(BUILD_VARIANT),gnutls)
  53. CMAKE_OPTIONS += -DWITH_GNUTLS=ON
  54. else
  55. CMAKE_OPTIONS += -DWITH_GNUTLS=OFF
  56. endif
  57. $(eval $(call BuildPackage,libulfius-gnutls))
  58. $(eval $(call BuildPackage,libulfius-nossl))