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.

63 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:=1
  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_FLAGS := nonshared
  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 Package/ldbus/install
  39. $(INSTALL_DIR) $(1)/usr/lib/lua
  40. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ldbus.so $(1)/usr/lib/lua
  41. endef
  42. define Build/Compile
  43. cd $(PKG_BUILD_DIR) && \
  44. luarocks make --pack-binary-rock ldbus-scm-0.rockspec \
  45. DBUS_INCDIR=$(STAGING_DIR)/usr/include/dbus-1.0/ \
  46. DBUS_ARCH_INCDIR=$(STAGING_DIR)/usr/lib/dbus-1.0/include \
  47. DBUS_LIBDIR=$(STAGING_DIR)/usr/lib \
  48. CC="$(TARGET_CC)" LD="$(TARGET_CC)"
  49. endef
  50. $(eval $(call BuildPackage,ldbus))