]> git.ipfire.org Git - ipfire-2.x.git/blob - lfs/haproxy
suricata: Change midstream policy to "pass-flow"
[ipfire-2.x.git] / lfs / haproxy
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2024 IPFire Team <info@ipfire.org> #
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
25 include Config
26
27 SUMMARY = The Reliable, High Performance TCP/HTTP Load Balancer
28
29 VER = 2.9.2
30
31 # From: https://www.haproxy.org/download/2.9/src/haproxy-2.9.2.tar.gz
32
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)
38 PROG = haproxy
39 PAK_VER = 29
40
41 DEPS =
42
43 SERVICES = haproxy
44
45 ifeq "$(BUILD_ARCH)" "riscv64"
46 LDFLAGS += -latomic
47 endif
48
49 ###############################################################################
50 # Top-level Rules
51 ###############################################################################
52
53 objects = $(DL_FILE)
54
55 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
56
57 $(DL_FILE)_BLAKE2 = 257a594fdb18e50c99e4256aa364d2ea55b56e39bfda0435c921927939a09231be5ae2bd7f39e23286febb343fa0dca5fc33f9b279461c5083050898390b21db
58
59 install : $(TARGET)
60
61 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
62
63 download :$(patsubst %,$(DIR_DL)/%,$(objects))
64
65 b2 : $(subst %,%_BLAKE2,$(objects))
66
67 dist:
68 @$(PAK)
69
70 ###############################################################################
71 # Downloading, checking, b2sum
72 ###############################################################################
73
74 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
75 @$(CHECK)
76
77 $(patsubst %,$(DIR_DL)/%,$(objects)) :
78 @$(LOAD)
79
80 $(subst %,%_BLAKE2,$(objects)) :
81 @$(B2SUM)
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
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)"
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
104 #install initscripts
105 $(call INSTALL_INITSCRIPTS,$(SERVICES))
106
107 # Logrotate
108 -mkdir -pv /etc/logrotate.d
109 install -v -m 644 $(DIR_SRC)/config/haproxy/logrotate \
110 /etc/logrotate.d/haproxy
111
112 @rm -rf $(DIR_APP)
113 @$(POSTBUILD)