libulfius: new package
authorToni Uhlig <matzeton@googlemail.com>
Thu, 4 Jun 2020 18:23:34 +0000 (20:23 +0200)
committerToni Uhlig <matzeton@googlemail.com>
Mon, 15 Jun 2020 18:18:45 +0000 (20:18 +0200)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
libs/liborcania/Makefile [new file with mode: 0644]
libs/libulfius/Makefile [new file with mode: 0644]

diff --git a/libs/liborcania/Makefile b/libs/liborcania/Makefile
new file mode 100644 (file)
index 0000000..aaf6c76
--- /dev/null
@@ -0,0 +1,45 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=liborcania
+PKG_VERSION:=2.1.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/babelouest/orcania/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=a83f01968ae3e68fecfb2f7029f886902718c65315008223784d2d023da515bb
+
+PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/orcania-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/liborcania
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Functionality required by libulfius.
+  URL:=https://github.com/babelouest/orcania
+  PROVIDES:=liborcania
+endef
+
+define Package/liborcania/description
+  Potluck with different functions for different purposes that can be shared among C programs.
+endef
+
+define Package/liborcania/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liborcania.so.* \
+               $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,liborcania))
diff --git a/libs/libulfius/Makefile b/libs/libulfius/Makefile
new file mode 100644 (file)
index 0000000..37b99ac
--- /dev/null
@@ -0,0 +1,70 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libulfius
+PKG_VERSION:=2.6.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/babelouest/ulfius/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=fbbcf693043409cc1929820b3eae5e1f7b1c93a3a8acec981946988ee3d0e85b
+
+PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/ulfius-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libulfius/default
+  SECTION:=libs
+  CATEGORY:=Libraries
+  SUBMENU:=Networking
+  TITLE:=Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language.
+  URL:=https://github.com/babelouest/ulfius
+endef
+
+define Package/libulfius-nossl
+$(call Package/libulfius/default)
+  VARIANT:=nossl
+  DEFAULT_VARIANT:=1
+  DEPENDS:=+libmicrohttpd +libcurl +liborcania
+  PROVIDES:=libulfius
+endef
+
+define Package/libulfius-gnutls
+$(call Package/libulfius/default)
+  TITLE+= with SSL support
+  VARIANT:=gnutls
+  DEPENDS:=+libmicrohttpd +libcurl +libgnutls +liborcania
+  PROVIDES:=libulfius
+endef
+
+define Package/libulfius-$(BUILD_VARIANT)/install
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libulfius.so.* \
+               $(1)/usr/lib/
+endef
+
+CMAKE_OPTIONS += \
+       -DDOWNLOAD_DEPENDENCIES=OFF \
+       -DBUILD_WEBSOCKET=OFF \
+       -DSEARCH_ORCANIA_U=ON \
+       -DWITH_CURL=ON \
+       -DWITH_JANSSON=OFF \
+       -DWITH_STRSTR=ON \
+       -DWITH_YDER=OFF \
+       -DSEARCH_YDER=OFF \
+       -DCMAKE_BUILD_TYPE=Release
+
+ifeq ($(BUILD_VARIANT),gnutls)
+       CMAKE_OPTIONS += -DWITH_GNUTLS=ON
+else
+       CMAKE_OPTIONS += -DWITH_GNUTLS=OFF
+endif
+
+$(eval $(call BuildPackage,libulfius-gnutls))
+$(eval $(call BuildPackage,libulfius-nossl))