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.

65 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2006-2017 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GPL 2 license.
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=ldbus
  8. PKG_SOURCE_DATE:=2019-03-25
  9. PKG_SOURCE_VERSION:=345d820b0f34bd35ea01dae633d35ea3cf7faf2a
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL=https://github.com/daurnimator/ldbus
  13. PKG_MIRROR_HASH:=c0f5d1b34bc8b82d0f70bad23ecaca10ef84730c2c3ea318673b5a941f4dfc85
  14. PKG_MAINTAINER:=Enrico Mioso <mrkiko.rs@gmail.com>
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_BUILD_DEPENDS:=luarocks/host
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/ldbus
  20. SUBMENU:=Lua
  21. SECTION:=lang
  22. CATEGORY:=Languages
  23. TITLE:=ldbus Lua DBus bindings
  24. DEPENDS:=+dbus +lua
  25. endef
  26. define Package/ldbus/description
  27. This package contains "ldbus": LUA bindings to interact with the DBUS
  28. message bus system, and services connected to it.
  29. See https://github.com/daurnimator/ldbus
  30. for details.
  31. endef
  32. TARGET_CFLAGS += \
  33. -I$(STAGING_DIR)/usr/include
  34. MAKE_FLAGS += \
  35. FPIC="$(FPIC)" \
  36. CFLAGS="$(TARGET_CFLAGS)" \
  37. LDFLAGS="$(TARGET_LDFLAGS)"
  38. define Build/Compile
  39. cd $(PKG_BUILD_DIR) && \
  40. luarocks make --pack-binary-rock ldbus-scm-0.rockspec \
  41. LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \
  42. LUA_PKGNAME=lua5.1 \
  43. DBUS_INCDIR=$(STAGING_DIR)/usr/include/dbus-1.0/ \
  44. DBUS_ARCH_INCDIR=$(STAGING_DIR)/usr/lib/dbus-1.0/include \
  45. DBUS_LIBDIR=$(STAGING_DIR)/usr/lib \
  46. CC="$(TARGET_CC)" LD="$(TARGET_CC)"
  47. endef
  48. define Package/ldbus/install
  49. $(INSTALL_DIR) $(1)/usr/lib/lua
  50. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ldbus.so $(1)/usr/lib/lua
  51. endef
  52. $(eval $(call BuildPackage,ldbus))