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.

99 lines
2.8 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.1
  11. PKG_RELEASE:=06
  12. PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.5/src/
  14. PKG_MD5SUM:=49640cf3ddd793a05fbd3394481a1ed4
  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. ifeq ($(CONFIG_avr32),y)
  33. LINUX_TARGET:=linux26
  34. else
  35. LINUX_TARGET:=linux2628
  36. endif
  37. define Build/Compile
  38. $(MAKE) TARGET=$(LINUX_TARGET) -C $(PKG_BUILD_DIR) \
  39. DESTDIR="$(PKG_INSTALL_DIR)" \
  40. CC="$(TARGET_CC)" \
  41. CFLAGS="$(TARGET_CFLAGS) -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -pipe -fomit-frame-pointer -fhonour-copts" \
  42. LD="$(TARGET_CC)" \
  43. LDFLAGS="$(TARGET_LDFLAGS)" \
  44. ADDLIB="-lcrypto" \
  45. PCREDIR="$(STAGING_DIR)/usr/include" \
  46. SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=165530 " \
  47. USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 USE_REGPARM=1 USE_OPENSSL=1 \
  48. USE_ZLIB=yes USE_PCRE=1 \
  49. VERSION="$(PKG_VERSION)-patch$(PKG_RELEASE)" \
  50. install
  51. $(MAKE) -C $(PKG_BUILD_DIR)/contrib/halog \
  52. DESTDIR="$(PKG_INSTALL_DIR)" \
  53. CC="$(TARGET_CC)" \
  54. CFLAGS="$(TARGET_CFLAGS) -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -pipe -fomit-frame-pointer -fhonour-copts" \
  55. LD="$(TARGET_CC)" \
  56. LDFLAGS="$(TARGET_LDFLAGS)" \
  57. ADDLIB="-lcrypto" \
  58. VERSION="$(PKG_VERSION)-patch$(PKG_RELEASE)" \
  59. halog
  60. endef
  61. define Package/haproxy/install
  62. $(INSTALL_DIR) $(1)/usr/sbin
  63. $(INSTALL_BIN) $(PKG_BUILD_DIR)/haproxy $(1)/usr/sbin/
  64. $(INSTALL_DIR) $(1)/etc
  65. $(INSTALL_CONF) ./files/haproxy.cfg $(1)/etc/
  66. $(INSTALL_DIR) $(1)/etc/init.d
  67. $(INSTALL_BIN) ./files/haproxy.init $(1)/etc/init.d/haproxy
  68. $(INSTALL_DIR) $(1)/etc/hotplug.d/net
  69. $(INSTALL_BIN) ./files/haproxy.hotplug $(1)/etc/hotplug.d/net/90-haproxy
  70. endef
  71. define Package/halog
  72. MENU:=1
  73. $(call Package/haproxy)
  74. TITLE+= halog
  75. DEPENDS:=haproxy
  76. endef
  77. define Package/halog/description
  78. HAProxy Log Analyzer
  79. endef
  80. define Package/halog/install
  81. $(INSTALL_DIR) $(1)/usr/bin
  82. $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/halog/halog $(1)/usr/bin/
  83. endef
  84. $(eval $(call BuildPackage,haproxy))
  85. $(eval $(call BuildPackage,halog))