1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2024 IPFire Team <info@ipfire.org> #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
27 SUMMARY = The Reliable, High Performance TCP/HTTP Load Balancer
31 # From: https://www.haproxy.org/download/2.9/src/haproxy-2.9.2.tar.gz
33 THISAPP = haproxy-$(VER)
34 DL_FILE = $(THISAPP).tar.gz
35 DL_FROM = $(URL_IPFIRE)
36 DIR_APP = $(DIR_SRC)/$(THISAPP)
37 TARGET = $(DIR_INFO)/$(THISAPP)
45 ifeq "$(BUILD_ARCH)" "riscv64"
49 ###############################################################################
51 ###############################################################################
55 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
57 $(DL_FILE)_BLAKE2 = 257a594fdb18e50c99e4256aa364d2ea55b56e39bfda0435c921927939a09231be5ae2bd7f39e23286febb343fa0dca5fc33f9b279461c5083050898390b21db
61 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
63 download :$(patsubst %,$(DIR_DL)/%,$(objects))
65 b2 : $(subst %,%_BLAKE2,$(objects))
70 ###############################################################################
71 # Downloading, checking, b2sum
72 ###############################################################################
74 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
77 $(patsubst %,$(DIR_DL)/%,$(objects)) :
80 $(subst %,%_BLAKE2,$(objects)) :
83 ###############################################################################
84 # Installation Details
85 ###############################################################################
87 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
89 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
91 cd $(DIR_APP) && make $(MAKETUNING) CPU="generic" TARGET="linux-glibc" \
92 USE_LUA=1 USE_OPENSSL=1 USE_PCRE2=1 USE_PCRE2_JIT=1 USE_ZLIB=1 USE_REGPARM=1 \
93 LUA_LIB_NAME="lua" ADDINC="$(CFLAGS)" USE_LINUX_TPROXY=1 ADDLIB="$(LDFLAGS)"
95 cd $(DIR_APP) && make install-bin install-man PREFIX=/usr
97 -mkdir -pv /etc/haproxy /var/lib/haproxy
98 install -v -m 644 $(DIR_SRC)/config/haproxy/haproxy.cfg \
99 /etc/haproxy/haproxy.cfg
101 install -v -m 644 $(DIR_SRC)/config/backup/includes/haproxy \
102 /var/ipfire/backup/addons/includes/haproxy
105 $(call INSTALL_INITSCRIPTS,$(SERVICES))
108 -mkdir -pv /etc/logrotate.d
109 install -v -m 644 $(DIR_SRC)/config/haproxy/logrotate \
110 /etc/logrotate.d/haproxy