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.

93 lines
2.7 KiB

  1. #
  2. # Copyright (C) 2010-2013 OpenWrt.org
  3. # Copyright (C) 2009-2014 Thomas Heil <heil@terminal-consulting.de>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=haproxy
  10. PKG_VERSION:=1.5.0
  11. PKG_RELEASE:=01
  12. PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.5/src/
  14. PKG_MD5SUM:=e33bb97e644e98af948090f1ecebbda9
  15. PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
  16. PKG_LICENSE:=GPL-2.0
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/haproxy
  19. SUBMENU:=Web Servers/Proxies
  20. SECTION:=net
  21. CATEGORY:=Network
  22. TITLE:=The Reliable, High Performance TCP/HTTP Load Balancer
  23. URL:=http://haproxy.1wt.eu/
  24. DEPENDS:=+libpcre +libltdl +libopenssl +zlib +libpthread
  25. endef
  26. define Package/haproxy/conffiles
  27. /etc/haproxy.cfg
  28. endef
  29. define Package/haproxy/description
  30. Open source High Performance TCP/HTTP Load Balancer
  31. endef
  32. define Build/Compile
  33. $(MAKE) TARGET=linux2628 -C $(PKG_BUILD_DIR) \
  34. DESTDIR="$(PKG_INSTALL_DIR)" \
  35. CC="$(TARGET_CC)" \
  36. CFLAGS="$(TARGET_CFLAGS) -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -pipe -fomit-frame-pointer -fhonour-copts" \
  37. LD="$(TARGET_CC)" \
  38. LDFLAGS="$(TARGET_LDFLAGS)" \
  39. ADDLIB="-lcrypto" \
  40. PCREDIR="$(STAGING_DIR)/usr/include" \
  41. SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=165530 " \
  42. USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 USE_REGPARM=1 USE_OPENSSL=1 \
  43. USE_ZLIB=yes USE_PCRE=1 \
  44. VERSION="$(PKG_VERSION)-patch$(PKG_RELEASE)" \
  45. install
  46. $(MAKE) -C $(PKG_BUILD_DIR)/contrib/halog \
  47. DESTDIR="$(PKG_INSTALL_DIR)" \
  48. CC="$(TARGET_CC)" \
  49. CFLAGS="$(TARGET_CFLAGS) -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -pipe -fomit-frame-pointer -fhonour-copts" \
  50. LD="$(TARGET_CC)" \
  51. LDFLAGS="$(TARGET_LDFLAGS)" \
  52. ADDLIB="-lcrypto" \
  53. VERSION="$(PKG_VERSION)-patch$(PKG_RELEASE)" \
  54. halog
  55. endef
  56. define Package/haproxy/install
  57. $(INSTALL_DIR) $(1)/usr/sbin
  58. $(INSTALL_BIN) $(PKG_BUILD_DIR)/haproxy $(1)/usr/sbin/
  59. $(INSTALL_DIR) $(1)/etc
  60. $(INSTALL_CONF) ./files/haproxy.cfg $(1)/etc/
  61. $(INSTALL_DIR) $(1)/etc/init.d
  62. $(INSTALL_BIN) ./files/haproxy.init $(1)/etc/init.d/haproxy
  63. $(INSTALL_DIR) $(1)/etc/hotplug.d/net
  64. $(INSTALL_BIN) ./files/haproxy.hotplug $(1)/etc/hotplug.d/net/90-haproxy
  65. endef
  66. define Package/halog
  67. MENU:=1
  68. $(call Package/haproxy)
  69. TITLE+= halog
  70. DEPENDS:=haproxy
  71. endef
  72. define Package/halog/description
  73. HAProxy Log Analyzer
  74. endef
  75. define Package/halog/install
  76. $(INSTALL_DIR) $(1)/usr/bin
  77. $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/halog/halog $(1)/usr/bin/
  78. endef
  79. $(eval $(call BuildPackage,haproxy))
  80. $(eval $(call BuildPackage,halog))