diff options
Diffstat (limited to 'contrib/package/lucihttp/Makefile')
-rw-r--r-- | contrib/package/lucihttp/Makefile | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/contrib/package/lucihttp/Makefile b/contrib/package/lucihttp/Makefile new file mode 100644 index 0000000000..408994435a --- /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-05-18 +PKG_SOURCE_VERSION:=cb119deddee5f0f8f1da883b20c60aea7611b175 +PKG_MIRROR_HASH:=573a20817c73344b17c8fa1b8112f14af9dccc25fef017ae072ecd09140cf9e1 +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)) |