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.

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