summaryrefslogtreecommitdiffhomepage
path: root/contrib/package
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-04-14 18:47:51 +0200
committerJo-Philipp Wich <jo@mein.io>2018-04-17 11:31:37 +0200
commit084499a4c0f01a09ec08ae58e0c263bf866d1a24 (patch)
tree377f7e886dff58bb464f6bf4d2a031d022e98ae7 /contrib/package
parent9f327a3d020c9bd03c3a4a005c4de87353a0c354 (diff)
contrib: package liblucihttp
Package liblucihttp, a utility library providing HTTP parsing and data decoding helpers. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'contrib/package')
-rw-r--r--contrib/package/lucihttp/Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/contrib/package/lucihttp/Makefile b/contrib/package/lucihttp/Makefile
new file mode 100644
index 000000000..ac03c665a
--- /dev/null
+++ b/contrib/package/lucihttp/Makefile
@@ -0,0 +1,54 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lucihttp
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://github.com/jow-/lucihttp.git
+PKG_SOURCE_DATE:=2018-04-17
+PKG_SOURCE_VERSION:=77a85c7232902ff765ed18cff31c5b19b7b2faca
+PKG_MIRROR_HASH:=34af584ceaaaddfba45b3b5b2d9c3c605eaed686d0ba3f17c45ff2021e32ab96
+CMAKE_INSTALL:=1
+
+PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
+PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_liblucihttp-lua
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/liblucihttp
+ SECTION:=libs
+ CATEGORY:=Libraries
+ ABI_VERSION:=$(PKG_VERSION)
+ TITLE:=LuCI HTTP utility library
+endef
+
+define Package/liblucihttp-lua
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+liblucihttp +liblua
+ TITLE:=Lua binding for the LuCI HTTP utility library
+endef
+
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
+
+CMAKE_OPTIONS = \
+ -DLUAPATH=/usr/lib/lua \
+ -DBUILD_LUA=$(if $(CONFIG_PACKAGE_liblucihttp-lua),ON,OFF) \
+ -DBUILD_TESTS=OFF
+
+define Package/liblucihttp/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblucihttp.so $(1)/usr/lib/
+endef
+
+define Package/liblucihttp-lua/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lua/lucihttp.so $(1)/usr/lib/lua/
+endef
+
+$(eval $(call BuildPackage,liblucihttp))
+$(eval $(call BuildPackage,liblucihttp-lua))