]>
Commit | Line | Data |
---|---|---|
0f0e30dc MT |
1 | ############################################################################### |
2 | # # | |
3 | # IPFire.org - A linux based firewall # | |
db437417 | 4 | # Copyright (C) 2007-2023 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 | ||
25 | include Config | |
26 | ||
66c36198 | 27 | SUMMARY = The Reliable, High Performance TCP/HTTP Load Balancer |
f15707c7 | 28 | |
134e40c4 | 29 | VER = 2.8.1 |
e73c7825 | 30 | |
134e40c4 | 31 | # From: https://www.haproxy.org/download/2.8/src/haproxy-2.8.1.tar.gz |
0f0e30dc MT |
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 | |
922cd4d5 | 39 | PAK_VER = 27 |
0f0e30dc | 40 | |
2dc2a278 | 41 | DEPS = |
0f0e30dc | 42 | |
f15707c7 | 43 | SERVICES = haproxy |
e36a7e3c | 44 | |
f821fbf6 MT |
45 | ifeq "$(BUILD_ARCH)" "riscv64" |
46 | LDFLAGS += -latomic | |
47 | endif | |
48 | ||
0f0e30dc MT |
49 | ############################################################################### |
50 | # Top-level Rules | |
51 | ############################################################################### | |
52 | ||
53 | objects = $(DL_FILE) | |
54 | ||
55 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
56 | ||
134e40c4 | 57 | $(DL_FILE)_BLAKE2 = 4c4cb6d0a50d1a5d799b4d861f1dff98d5b3cf6f33c94c1b5927dd1998afb968c0bded9ddbac3e95fc1b16b5515d3d29695d5a6e20ee4424e7240e6a309e8b89 |
0f0e30dc MT |
58 | |
59 | install : $(TARGET) | |
60 | ||
61 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
62 | ||
63 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
64 | ||
9a7e4d85 | 65 | b2 : $(subst %,%_BLAKE2,$(objects)) |
0f0e30dc MT |
66 | |
67 | dist: | |
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) |