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.

153 lines
5.0 KiB

  1. #
  2. # Copyright (C) 2008-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. ### Remarks
  8. ### 'python pascal ruby lua' need to be deleted in src/clients/Makefile.am
  9. include $(TOPDIR)/rules.mk
  10. PKG_NAME:=knxd
  11. PKG_REV:=a63bc660d305e26ce3ed038607d387758fad8413
  12. PKG_VERSION:=2015-03-06
  13. PKG_RELEASE:=1
  14. PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
  15. PKG_LICENSE:=GPL-2.0+
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  18. PKG_SOURCE_PROTO:=git
  19. PKG_SOURCE_URL:=git://github.com/knxd/knxd.git
  20. PKG_SOURCE_SUBDIR:=$(PKG_NAME)
  21. PKG_SOURCE_VERSION:=$(PKG_REV)
  22. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
  23. PKG_BUILD_DEPENDS:=pthsem argp-standalone
  24. PKG_FIXUP:=autoreconf
  25. include $(INCLUDE_DIR)/package.mk
  26. define Package/knxd
  27. SECTION:=net
  28. CATEGORY:=Network
  29. TITLE:=EIB KNX daemon
  30. URL:=https://github.com/knxd/knxd
  31. DEPENDS:=pthsem libusb-1.0
  32. endef
  33. define Package/knxd/description
  34. EIB KNX Daemon
  35. endef
  36. define Package/knxd/conffiles
  37. /etc/config/knxd
  38. endef
  39. define Package/knxd-tools
  40. SECTION:=net
  41. CATEGORY:=Network
  42. TITLE:=EIB KNX Utils
  43. URL:=https://github.com/knxd/knxd
  44. DEPENDS:=pthsem libusb-1.0
  45. endef
  46. define Package/knxd-tools/description
  47. EIB KNX Tools
  48. endef
  49. define Build/Prepare
  50. $(call Build/Prepare/Default)
  51. endef
  52. define Build/Configure
  53. $(call Build/Configure/Default,\
  54. --disable-ft12 \
  55. --enable-eibnetip \
  56. --enable-eibnetiptunnel \
  57. --enable-eibnetipserver \
  58. --enable-usb \
  59. --enable-tpuart \
  60. --enable-tpuarts \
  61. --disable-pei16 \
  62. --disable-pei16s \
  63. --enable-groupcache \
  64. --without-pth-test \
  65. --without-libstdc )
  66. endef
  67. define Build/Compile
  68. $(MAKE) -C $(PKG_BUILD_DIR) \
  69. CC=$(TARGET_CC) \
  70. LIBS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib -fno-builtin -nodefaultlibs -lc -lm -lgcc -largp -lpthsem" \
  71. CPPFLAGS="-I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include"
  72. endef
  73. define Package/knxd/install
  74. $(INSTALL_DIR) $(1)/usr/bin
  75. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/server/knxd $(1)/usr/bin/
  76. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/bcu/bcuaddrtab $(1)/usr/bin/
  77. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/bcu/bcuread $(1)/usr/bin/
  78. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/eibnet/eibnetsearch $(1)/usr/bin/
  79. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/eibnet/eibnetdescribe $(1)/usr/bin/
  80. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/usb/findknxusb $(1)/usr/bin/
  81. $(INSTALL_DIR) $(1)/etc/init.d
  82. $(INSTALL_BIN) ./files/knxd.init $(1)/etc/init.d/knxd
  83. $(INSTALL_DIR) $(1)/etc/config
  84. $(INSTALL_DATA) ./files/knxd.config $(1)/etc/config/knxd
  85. endef
  86. define Package/knxd-tools/install
  87. $(INSTALL_DIR) $(1)/usr/lib
  88. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/client/c/.libs/libeibclient.so.0.0.0 $(1)/usr/lib/
  89. ln -s libeibclient.so.0.0.0 $(1)/usr/lib/libeibclient.so
  90. ln -s libeibclient.so.0.0.0 $(1)/usr/lib/libeibclient.so.0
  91. $(INSTALL_DIR) $(1)/usr/bin
  92. -rm -f $(1)/usr/bin/knxread
  93. -rm -f $(1)/usr/bin/knxreadtemp
  94. -rm -f $(1)/usr/bin/knxwrite
  95. -rm -f $(1)/usr/bin/knxlog
  96. -rm -f $(1)/usr/bin/knxon
  97. -rm -f $(1)/usr/bin/knxoff
  98. -rm -f $(1)/usr/bin/knxif
  99. -rm -f $(1)/usr/bin/knxswrite
  100. -rm -f $(1)/usr/bin/knxbool
  101. -rm -f $(1)/usr/bin/knxdimup
  102. ln -s knxtool $(1)/usr/bin/knxread
  103. ln -s knxtool $(1)/usr/bin/knxreadtemp
  104. ln -s knxtool $(1)/usr/bin/knxwrite
  105. ln -s knxtool $(1)/usr/bin/knxlog
  106. ln -s knxtool $(1)/usr/bin/knxon
  107. ln -s knxtool $(1)/usr/bin/knxoff
  108. ln -s knxtool $(1)/usr/bin/knxif
  109. ln -s knxtool $(1)/usr/bin/knxswrite
  110. ln -s knxtool $(1)/usr/bin/knxbool
  111. ln -s knxtool $(1)/usr/bin/knxdimup
  112. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/knxtool $(1)/usr/bin/
  113. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/busmonitor1 $(1)/usr/bin/
  114. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/busmonitor2 $(1)/usr/bin/
  115. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/busmonitor3 $(1)/usr/bin/
  116. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/eibread-cgi $(1)/usr/bin/
  117. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/eibwrite-cgi $(1)/usr/bin/
  118. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/vbusmonitor1 $(1)/usr/bin/
  119. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/vbusmonitor2 $(1)/usr/bin/
  120. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/vbusmonitor3 $(1)/usr/bin/
  121. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupwrite $(1)/usr/bin/
  122. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupswrite $(1)/usr/bin/
  123. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/grouplisten $(1)/usr/bin/
  124. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupread $(1)/usr/bin/
  125. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupresponse $(1)/usr/bin/
  126. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupreadresponse $(1)/usr/bin/
  127. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupsocketlisten $(1)/usr/bin/
  128. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupsocketread $(1)/usr/bin/
  129. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupsocketwrite $(1)/usr/bin/
  130. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupsocketswrite $(1)/usr/bin/
  131. endef
  132. $(eval $(call BuildPackage,knxd))
  133. $(eval $(call BuildPackage,knxd-tools))