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