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.

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