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.

61 lines
1.5 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_RELEASE:=2
  9. PKG_MIRROR_HASH:=0e39a80e126a77a937226e49ae0246e1fd4600a03dee6bdee5ac822963a234e1
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_VERSION:=f4a1464e915a2313c80fb40c5c40b0bee7583677
  12. PKG_SOURCE_DATE:=2017-10-03
  13. PKG_SOURCE_URL=https://github.com/daurnimator/ldbus
  14. PKG_MAINTAINER:=Enrico Mioso <mrkiko.rs@gmail.com>
  15. PKG_LICENSE:=MIT
  16. PKG_BUILD_DEPENDS:=luarocks/host
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/ldbus
  19. SUBMENU:=Lua
  20. SECTION:=lang
  21. CATEGORY:=Languages
  22. TITLE:=ldbus Lua DBus bindings
  23. DEPENDS:=+dbus +lua
  24. endef
  25. define Package/ldbus/description
  26. This package contains "ldbus": LUA bindings to interact with the DBUS
  27. message bus system, and services connected to it.
  28. See https://github.com/daurnimator/ldbus
  29. for details.
  30. endef
  31. TARGET_CFLAGS += \
  32. -I$(STAGING_DIR)/usr/include
  33. MAKE_FLAGS += \
  34. FPIC="$(FPIC)" \
  35. CFLAGS="$(TARGET_CFLAGS)" \
  36. LDFLAGS="$(TARGET_LDFLAGS)"
  37. define Package/ldbus/install
  38. $(INSTALL_DIR) $(1)/usr/lib/lua
  39. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ldbus.so $(1)/usr/lib/lua
  40. endef
  41. define Build/Compile
  42. cd $(PKG_BUILD_DIR) && \
  43. luarocks make --pack-binary-rock ldbus-scm-0.rockspec \
  44. DBUS_INCDIR=$(STAGING_DIR)/usr/include/dbus-1.0/ \
  45. DBUS_ARCH_INCDIR=$(STAGING_DIR)/usr/lib/dbus-1.0/include \
  46. DBUS_LIBDIR=$(STAGING_DIR)/usr/lib \
  47. CC="$(TARGET_CC)" LD="$(TARGET_CC)"
  48. endef
  49. $(eval $(call BuildPackage,ldbus))