]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/haproxy
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / lfs / haproxy
CommitLineData
0f0e30dc
MT
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
7ae9d20a 4# Copyright (C) 2007-2024 IPFire Team <info@ipfire.org> #
0f0e30dc
MT
5# #
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. #
10# #
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. #
15# #
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/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
66c36198 27SUMMARY = The Reliable, High Performance TCP/HTTP Load Balancer
f15707c7 28
7ae9d20a 29VER = 2.9.2
e73c7825 30
7ae9d20a 31# From: https://www.haproxy.org/download/2.9/src/haproxy-2.9.2.tar.gz
0f0e30dc
MT
32
33THISAPP = haproxy-$(VER)
34DL_FILE = $(THISAPP).tar.gz
35DL_FROM = $(URL_IPFIRE)
36DIR_APP = $(DIR_SRC)/$(THISAPP)
37TARGET = $(DIR_INFO)/$(THISAPP)
38PROG = haproxy
7ae9d20a 39PAK_VER = 29
0f0e30dc 40
2dc2a278 41DEPS =
0f0e30dc 42
f15707c7 43SERVICES = haproxy
e36a7e3c 44
f821fbf6
MT
45ifeq "$(BUILD_ARCH)" "riscv64"
46 LDFLAGS += -latomic
47endif
48
0f0e30dc
MT
49###############################################################################
50# Top-level Rules
51###############################################################################
52
53objects = $(DL_FILE)
54
55$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
56
7ae9d20a 57$(DL_FILE)_BLAKE2 = 257a594fdb18e50c99e4256aa364d2ea55b56e39bfda0435c921927939a09231be5ae2bd7f39e23286febb343fa0dca5fc33f9b279461c5083050898390b21db
0f0e30dc
MT
58
59install : $(TARGET)
60
61check : $(patsubst %,$(DIR_CHK)/%,$(objects))
62
63download :$(patsubst %,$(DIR_DL)/%,$(objects))
64
9a7e4d85 65b2 : $(subst %,%_BLAKE2,$(objects))
0f0e30dc
MT
66
67dist:
68 @$(PAK)
69
70###############################################################################
9a7e4d85 71# Downloading, checking, b2sum
0f0e30dc
MT
72###############################################################################
73
74$(patsubst %,$(DIR_CHK)/%,$(objects)) :
75 @$(CHECK)
76
77$(patsubst %,$(DIR_DL)/%,$(objects)) :
78 @$(LOAD)
79
9a7e4d85
PM
80$(subst %,%_BLAKE2,$(objects)) :
81 @$(B2SUM)
0f0e30dc
MT
82
83###############################################################################
84# Installation Details
85###############################################################################
86
87$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
88 @$(PREBUILD)
89 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
90
b58281e0 91 cd $(DIR_APP) && make $(MAKETUNING) CPU="generic" TARGET="linux-glibc" \
0b287952 92 USE_LUA=1 USE_OPENSSL=1 USE_PCRE2=1 USE_PCRE2_JIT=1 USE_ZLIB=1 USE_REGPARM=1 \
b6ab15ea 93 LUA_LIB_NAME="lua" ADDINC="$(CFLAGS)" USE_LINUX_TPROXY=1 ADDLIB="$(LDFLAGS)"
0f0e30dc
MT
94
95 cd $(DIR_APP) && make install-bin install-man PREFIX=/usr
96
97 -mkdir -pv /etc/haproxy /var/lib/haproxy
98 install -v -m 644 $(DIR_SRC)/config/haproxy/haproxy.cfg \
99 /etc/haproxy/haproxy.cfg
100
101 install -v -m 644 $(DIR_SRC)/config/backup/includes/haproxy \
102 /var/ipfire/backup/addons/includes/haproxy
103
e804a702 104 #install initscripts
f15707c7 105 $(call INSTALL_INITSCRIPTS,$(SERVICES))
0f0e30dc 106
c5494ad0
MT
107 # Logrotate
108 -mkdir -pv /etc/logrotate.d
109 install -v -m 644 $(DIR_SRC)/config/haproxy/logrotate \
110 /etc/logrotate.d/haproxy
111
0f0e30dc
MT
112 @rm -rf $(DIR_APP)
113 @$(POSTBUILD)