Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=lucihttp
  3. PKG_RELEASE:=1
  4. PKG_SOURCE_PROTO:=git
  5. PKG_SOURCE_URL=https://github.com/jow-/lucihttp.git
  6. PKG_SOURCE_DATE:=2021-06-11
  7. PKG_SOURCE_VERSION:=3dc89af443410c9eae7a0ff091bd7fb4c5d48f41
  8. PKG_MIRROR_HASH:=6024a34c514a7231bcc36486abfb3e43e6c17490ac8d838f202a43ce259cda03
  9. CMAKE_INSTALL:=1
  10. PKG_LICENSE:=ISC
  11. PKG_LICENSE_FILES:=LICENSE
  12. PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
  13. PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_liblucihttp-lua
  14. include $(INCLUDE_DIR)/package.mk
  15. include $(INCLUDE_DIR)/cmake.mk
  16. define Package/liblucihttp
  17. SECTION:=libs
  18. CATEGORY:=Libraries
  19. TITLE:=LuCI HTTP utility library
  20. ABI_VERSION:=0
  21. endef
  22. define Package/liblucihttp-lua
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. DEPENDS:=+liblucihttp +liblua
  26. TITLE:=Lua binding for the LuCI HTTP utility library
  27. endef
  28. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
  29. CMAKE_OPTIONS += \
  30. -DLUAPATH=/usr/lib/lua \
  31. -DBUILD_LUA=$(if $(CONFIG_PACKAGE_liblucihttp-lua),ON,OFF) \
  32. -DBUILD_TESTS=OFF
  33. define Build/InstallDev
  34. $(INSTALL_DIR) $(1)/usr/lib
  35. $(INSTALL_DIR) $(1)/usr/include
  36. $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblucihttp.so* $(1)/usr/lib/
  37. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  38. endef
  39. define Package/liblucihttp/install
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblucihttp.so.* $(1)/usr/lib/
  42. endef
  43. define Package/liblucihttp-lua/install
  44. $(INSTALL_DIR) $(1)/usr/lib/lua
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lua/lucihttp.so $(1)/usr/lib/lua/
  46. endef
  47. $(eval $(call BuildPackage,liblucihttp))
  48. $(eval $(call BuildPackage,liblucihttp-lua))