package: haproxy
[openwrt/svn-archive/archive.git] / net / haproxy / Makefile
1 #
2 # Copyright (C) 2010-2011 OpenWrt.org
3 # Copyright (C) 2009-2010 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
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=haproxy
12 PKG_VERSION:=1.4.21
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.4/src
17 PKG_MD5SUM:=f36d5d13fd4a44ab454eee5d06cb38a2
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/haproxy
22 SUBMENU:=Web Servers/Proxies
23 SECTION:=net
24 CATEGORY:=Network
25 TITLE:=The Reliable, High Performance TCP/HTTP Load Balancer
26 URL:=http://haproxy.1wt.eu/
27 DEPENDS:=+libpcre +libltdl
28 MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
29 endef
30
31 define Package/haproxy/conffiles
32 /etc/haproxy.cfg
33 endef
34
35 define Package/haproxy/description
36 Open source High Performance TCP/HTTP Load Balancer
37 endef
38
39 define Build/Compile
40 $(MAKE) TARGET=linux26 -C $(PKG_BUILD_DIR) \
41 DESTDIR="$(PKG_INSTALL_DIR)" \
42 CC="$(TARGET_CC)" \
43 CFLAGS="$(TARGET_CFLAGS)" \
44 LD="$(TARGET_CC)" \
45 LDFLAGS="$(TARGET_LDFLAGS)" \
46 SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=8192 -DSYSTEM_MAXCONN=65530" USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 \
47 all install
48 endef
49
50 define Package/haproxy/install
51 $(INSTALL_DIR) $(1)/usr/sbin
52 $(INSTALL_BIN) $(PKG_BUILD_DIR)/haproxy $(1)/usr/sbin/
53 $(INSTALL_DIR) $(1)/etc
54 $(INSTALL_CONF) ./files/haproxy.cfg $(1)/etc/
55 $(INSTALL_DIR) $(1)/etc/init.d
56 $(INSTALL_BIN) ./files/haproxy.init $(1)/etc/init.d/haproxy
57 $(INSTALL_DIR) $(1)/etc/hotplug.d/net
58 $(INSTALL_BIN) ./files/haproxy.hotplug $(1)/etc/hotplug.d/net/90-haproxy
59 endef
60
61 $(eval $(call BuildPackage,haproxy))