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.

66 lines
1.9 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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=linknx
  9. PKG_VERSION:=0.0.1.32
  10. PKG_RELEASE:=4
  11. PKG_MD5SUM:=7ecc1208f59bceb05068c752b2250b63
  12. PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
  13. PKG_LICENSE:=GPL-2.0+
  14. PKG_SOURCE_URL:=@SF/linknx
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  16. PKG_BUILD_DEPENDS:=pthsem curl libesmtp
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/linknx
  19. SECTION:=net
  20. CATEGORY:=Network
  21. TITLE:=KNX home automation platform
  22. URL:=http://sourceforge.net/projects/linknx/
  23. DEPENDS:=pthsem +lua +luac +libstdcpp +libcurl +libesmtp
  24. endef
  25. define Build/Configure
  26. (cd $(PKG_BUILD_DIR); touch aclocal.m4 Makefile.in config.h.in configure; \
  27. $(SED) 's,\"2.0.4\",\"2.0.4\"\n_pth_version=\"2.0.8\",g' $(PKG_BUILD_DIR)/configure )
  28. $(call Build/Configure/Default,--verbose --without-pth-test --with-pth=$(STAGING_DIR) --without-log4cpp --with-lua --with-libcurl --without-mysql, \
  29. CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -lcrypt" \
  30. )
  31. endef
  32. define Build/Compile
  33. $(MAKE) -C $(PKG_BUILD_DIR)/ \
  34. LIBDIR="$(TARGET_LDFLAGS)" \
  35. CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) " \
  36. LD="$(TARGET_CROSS)ld -shared" \
  37. LUA="$(STAGING_DIR_HOST)/bin/lua" \
  38. LUAC="$(STAGING_DIR_HOST)/bin/luac" \
  39. CFLAGS="$(TARGET_CFLAGS) -nodefaultlibs" all
  40. endef
  41. define Package/linknx/install
  42. $(INSTALL_DIR) $(1)/usr/bin
  43. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/linknx $(1)/usr/bin/
  44. $(INSTALL_DIR) $(1)/etc/init.d
  45. $(INSTALL_BIN) ./files/linknx.init $(1)/etc/init.d/linknx
  46. $(INSTALL_DIR) $(1)/etc/config
  47. $(INSTALL_DATA) ./files/linknx.config $(1)/etc/config/linknx
  48. $(INSTALL_DATA) ./files/linknx.xml.dist $(1)/etc/linknx.xml.dist
  49. $(INSTALL_DIR) $(1)/tmp/linknx/persist
  50. endef
  51. define Package/linknx/conffiles
  52. /etc/config/linknx
  53. /etc/linknx.xml.dist
  54. endef
  55. $(eval $(call BuildPackage,linknx))