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.

157 lines
5.3 KiB

  1. #
  2. # Copyright (C) 2008-2014 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. ### USB stays disabled as long as official libusb-1.0 remains on version 1.0.9
  10. ### you need to build libusb-1.0 >= 1.0.10 yourself if you want to add USB support
  11. include $(TOPDIR)/rules.mk
  12. PKG_NAME:=knxd
  13. PKG_REV:=b01d99c6748cc565f1be69b68cf2b9d3115e8ce5
  14. PKG_VERSION:=2014-12-20
  15. PKG_RELEASE:=1
  16. PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
  17. PKG_LICENSE:=GPL-2.0+
  18. PKG_LICENSE_FILES:=LICENSE
  19. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  20. PKG_SOURCE_PROTO:=git
  21. PKG_SOURCE_URL:=git://github.com/Makki1/knxd.git
  22. PKG_SOURCE_SUBDIR:=$(PKG_NAME)
  23. PKG_SOURCE_VERSION:=$(PKG_REV)
  24. PKG_CAT:=zcat
  25. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
  26. PKG_BUILD_DEPENDS:=pthsem argp-standalone
  27. PKG_FIXUP:=autoreconf
  28. include $(INCLUDE_DIR)/package.mk
  29. define Package/knxd
  30. SECTION:=net
  31. CATEGORY:=Network
  32. TITLE:=Eib KNX deamon
  33. URL:=https://github.com/Makki1/knxd
  34. DEPENDS:=pthsem
  35. endef
  36. # use this if you want to support USB
  37. # DEPENDS:=pthsem libusb-1.0
  38. define Package/knxd/description
  39. EIB KNX Daemon
  40. endef
  41. define Package/knxd-tools
  42. SECTION:=net
  43. CATEGORY:=Network
  44. TITLE:=Eib KNX Utils
  45. URL:=https://github.com/Makki1/knxd
  46. DEPENDS:=pthsem
  47. endef
  48. # use this if you want to support USB
  49. # DEPENDS:=pthsem libusb-1.0
  50. define Package/knxd-tools/description
  51. EIB KNX Tools
  52. endef
  53. define Build/Prepare
  54. $(call Build/Prepare/Default)
  55. endef
  56. define Build/Configure
  57. $(call Build/Configure/Default,\
  58. --disable-ft12 \
  59. --enable-eibnetip \
  60. --enable-eibnetiptunnel \
  61. --enable-eibnetipserver \
  62. --disable-usb \
  63. --enable-tpuart \
  64. --enable-tpuarts \
  65. --disable-pei16 \
  66. --disable-pei16s \
  67. --enable-groupcache \
  68. --without-pth-test \
  69. --without-libstdc )
  70. endef
  71. define Build/Compile
  72. $(MAKE) -C $(PKG_BUILD_DIR) \
  73. CC=$(TARGET_CC) \
  74. LIBS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib -fno-builtin -nostdinc++ -nodefaultlibs -lc -lm -lgcc -largp -lpthsem" \
  75. CPPFLAGS="-I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include"
  76. endef
  77. define Package/knxd/install
  78. $(INSTALL_DIR) $(1)/usr/bin
  79. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/server/knxd $(1)/usr/bin/
  80. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/bcu/bcuaddrtab $(1)/usr/bin/
  81. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/bcu/bcuread $(1)/usr/bin/
  82. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/eibnet/eibnetsearch $(1)/usr/bin/
  83. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/eibnet/eibnetdescribe $(1)/usr/bin/
  84. $(INSTALL_DIR) $(1)/etc/init.d
  85. $(INSTALL_BIN) ./files/knxd.init $(1)/etc/init.d/knxd
  86. $(INSTALL_DIR) $(1)/etc/config
  87. $(INSTALL_DATA) ./files/knxd.config $(1)/etc/config/knxd
  88. endef
  89. # add this line above to support USB
  90. # $(CP) $(PKG_BUILD_DIR)/src/usb/findknxusb $(1)/usr/bin/
  91. define Package/knxd-tools/install
  92. $(INSTALL_DIR) $(1)/usr/lib
  93. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/client/c/.libs/libeibclient.so.0.0.0 $(1)/usr/lib/
  94. ln -s libeibclient.so.0.0.0 $(1)/usr/lib/libeibclient.so
  95. ln -s libeibclient.so.0.0.0 $(1)/usr/lib/libeibclient.so.0
  96. $(INSTALL_DIR) $(1)/usr/bin
  97. -rm -f $(1)/usr/bin/knxread
  98. -rm -f $(1)/usr/bin/knxreadtemp
  99. -rm -f $(1)/usr/bin/knxwrite
  100. -rm -f $(1)/usr/bin/knxlog
  101. -rm -f $(1)/usr/bin/knxon
  102. -rm -f $(1)/usr/bin/knxoff
  103. -rm -f $(1)/usr/bin/knxif
  104. -rm -f $(1)/usr/bin/knxswrite
  105. -rm -f $(1)/usr/bin/knxbool
  106. -rm -f $(1)/usr/bin/knxdimup
  107. ln -s knxtool $(1)/usr/bin/knxread
  108. ln -s knxtool $(1)/usr/bin/knxreadtemp
  109. ln -s knxtool $(1)/usr/bin/knxwrite
  110. ln -s knxtool $(1)/usr/bin/knxlog
  111. ln -s knxtool $(1)/usr/bin/knxon
  112. ln -s knxtool $(1)/usr/bin/knxoff
  113. ln -s knxtool $(1)/usr/bin/knxif
  114. ln -s knxtool $(1)/usr/bin/knxswrite
  115. ln -s knxtool $(1)/usr/bin/knxbool
  116. ln -s knxtool $(1)/usr/bin/knxdimup
  117. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/knxtool $(1)/usr/bin/
  118. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/busmonitor1 $(1)/usr/bin/
  119. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/busmonitor2 $(1)/usr/bin/
  120. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/busmonitor3 $(1)/usr/bin/
  121. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/eibread-cgi $(1)/usr/bin/
  122. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/eibwrite-cgi $(1)/usr/bin/
  123. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/vbusmonitor1 $(1)/usr/bin/
  124. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/vbusmonitor2 $(1)/usr/bin/
  125. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/vbusmonitor3 $(1)/usr/bin/
  126. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupwrite $(1)/usr/bin/
  127. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupswrite $(1)/usr/bin/
  128. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/grouplisten $(1)/usr/bin/
  129. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupread $(1)/usr/bin/
  130. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupresponse $(1)/usr/bin/
  131. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupreadresponse $(1)/usr/bin/
  132. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupsocketlisten $(1)/usr/bin/
  133. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupsocketread $(1)/usr/bin/
  134. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupsocketwrite $(1)/usr/bin/
  135. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/examples/.libs/groupsocketswrite $(1)/usr/bin/
  136. endef
  137. $(eval $(call BuildPackage,knxd))
  138. $(eval $(call BuildPackage,knxd-tools))