]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/squid
squid: Update to 5.8
[people/pmueller/ipfire-2.x.git] / lfs / squid
CommitLineData
cd1a2927 1###############################################################################
cd1a2927 2# #
70df8302 3# IPFire.org - A linux based firewall #
ab049514 4# Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> #
70df8302
MT
5# #
6# This program is free software: you can redistribute it and/or modify #
cd1a2927 7# it under the terms of the GNU General Public License as published by #
70df8302 8# the Free Software Foundation, either version 3 of the License, or #
cd1a2927
MT
9# (at your option) any later version. #
10# #
70df8302 11# This program is distributed in the hope that it will be useful, #
cd1a2927
MT
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 #
70df8302 17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
cd1a2927 18# #
cd1a2927
MT
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
ab049514
MF
27VER = 5.8
28LANGPACK = 20230225
cd1a2927
MT
29
30THISAPP = squid-$(VER)
754f508b 31DL_FILE = $(THISAPP).tar.xz
e383179b 32DL_FROM = $(URL_IPFIRE)
cd1a2927
MT
33DIR_APP = $(DIR_SRC)/$(THISAPP)
34TARGET = $(DIR_INFO)/$(THISAPP)
35
11b5e5cb
AF
36CXXFLAGS+= -Wno-error=format-truncation
37
abde7323
MT
38ifeq "$(BUILD_ARCH)" "riscv64"
39 LDFLAGS += -latomic
40endif
41
cd1a2927
MT
42###############################################################################
43# Top-level Rules
44###############################################################################
45
ab049514
MF
46objects = $(DL_FILE) \
47 squid-langpack-$(LANGPACK).tar.gz
cd1a2927 48
ab049514
MF
49$(DL_FILE) = $(URL_IPFIRE)/$(DL_FILE)
50squid-langpack-$(LANGPACK).tar.gz = $(URL_IPFIRE)/squid-langpack-$(LANGPACK).tar.gz
cd1a2927 51
ab049514
MF
52$(DL_FILE)_BLAKE2 = c9d1ae9464e68beabdf7ae1641a70d6c614bc4d4f4bae3fc5946c2bf61510634992cbd5abe63f071104edb2fa487a6c5c7fb8fbf8f06ac723a6522ec9ade8b68
53squid-langpack-$(LANGPACK).tar.gz_BLAKE2 = 169a05d16770f56e515fd633658e8bcd9464fb01ccba76256b119932c833af7bc22e3e8d3a7d5fde37638546f15822a4d1548a78af13be9f4e3b8989758250b6
cd1a2927
MT
54
55install : $(TARGET)
56
57check : $(patsubst %,$(DIR_CHK)/%,$(objects))
58
59download :$(patsubst %,$(DIR_DL)/%,$(objects))
60
9a7e4d85 61b2 : $(subst %,%_BLAKE2,$(objects))
cd1a2927
MT
62
63###############################################################################
9a7e4d85 64# Downloading, checking, b2sum
cd1a2927 65###############################################################################
6bd4bcda 66
cd1a2927
MT
67$(patsubst %,$(DIR_CHK)/%,$(objects)) :
68 @$(CHECK)
69
70$(patsubst %,$(DIR_DL)/%,$(objects)) :
71 @$(LOAD)
72
9a7e4d85
PM
73$(subst %,%_BLAKE2,$(objects)) :
74 @$(B2SUM)
cd1a2927
MT
75
76###############################################################################
77# Installation Details
78###############################################################################
79
80$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
81 @$(PREBUILD)
754f508b 82 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar xaf $(DIR_DL)/$(DL_FILE)
ab049514 83 cd $(DIR_APP)/errors && tar zxf $(DIR_DL)/squid-langpack-$(LANGPACK).tar.gz
198c3926 84
bbca73d4
MF
85 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/squid/01_squid-gcc11.patch
86
02a60a9b
MT
87 cd $(DIR_APP) && autoreconf -vfi
88 cd $(DIR_APP)/libltdl && autoreconf -vfi
89
bf62652e
MT
90 cd $(DIR_APP) && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
91 LDFLAGS="$(LDFLAGS)" ./configure \
754f508b
MT
92 --prefix=/usr \
93 --sysconfdir=/etc/squid \
94 --datadir=/usr/lib/squid \
95 --mandir=/usr/share/man \
96 --libexecdir=/usr/lib/squid \
97 --localstatedir=/var \
88b1e637 98 --disable-ssl \
754f508b
MT
99 --disable-icmp \
100 --disable-wccp \
198c3926
MF
101 --disable-wccpv2 \
102 --disable-kqueue \
103 --disable-esi \
104 --disable-arch-native \
3196d226 105 --disable-strict-error-checking \
198c3926 106 --enable-poll \
754f508b 107 --enable-ident-lookups \
efccb433 108 --enable-storeio=aufs,diskd,ufs \
754f508b
MT
109 --enable-underscores \
110 --enable-http-violations \
efccb433 111 --enable-removal-policies=heap,lru \
754f508b
MT
112 --enable-delay-pools \
113 --enable-linux-netfilter \
114 --enable-snmp \
115 --enable-auth \
116 --enable-auth-basic \
117 --enable-auth-digest \
118 --enable-auth-negotiate \
119 --enable-auth-ntlm \
120 --enable-log-daemon-helpers \
121 --enable-url-rewrite-helpers \
122 --enable-build-info \
123 --enable-eui \
198c3926 124 --enable-async-io=16 \
754f508b
MT
125 --enable-unlinkd \
126 --enable-internal-dns \
127 --enable-epoll \
754f508b
MT
128 --enable-select \
129 --enable-cache-digests \
130 --enable-forw-via-db \
131 --enable-htcp \
754f508b 132 --enable-kill-parent-hack \
754f508b 133 --enable-icap-client \
69a324f0 134 --enable-zph-qos \
198c3926 135 --with-dl \
a2bcb413
MF
136 --with-large-files \
137 --without-gnutls \
138 --without-netfilter-conntrack
ed38f89d 139
fd3e7da0 140 cd $(DIR_APP) && make $(MAKETUNING)
cd1a2927
MT
141 cd $(DIR_APP) && make install
142
143 rm -f /etc/squid/squid.conf
46c01c09 144 ln -sf /var/ipfire/proxy/squid.conf /etc/squid/squid.conf
fe1656d2
CS
145 rm -f /etc/squid/cachemgr.conf
146 ln -sf /var/ipfire/proxy/cachemgr.conf /etc/squid/cachemgr.conf
cd1a2927 147 rm -f /etc/squid/errors
d4c6ba21 148 ln -sf /usr/lib/squid/errors/en /etc/squid/errors
cd1a2927 149
46c01c09 150 -mkdir -p /var/log/cache /var/log/squid /var/log/updatexlrator
cd1a2927 151 touch /var/log/squid/access.log
46c01c09
MT
152 chown -R squid:squid /var/log/squid /var/log/cache /var/log/updatexlrator
153
fe1656d2 154 cp /usr/lib/squid/cachemgr.cgi /srv/web/ipfire/cgi-bin/cachemgr.cgi
f2ccb35f 155 chown root:root /srv/web/ipfire/cgi-bin/cachemgr.cgi
fe1656d2 156
46c01c09
MT
157 cp -f $(DIR_SRC)/config/updxlrator/updxlrator /usr/sbin/updxlrator
158 cp -f $(DIR_SRC)/config/updxlrator/checkup /var/ipfire/updatexlrator/bin/checkup
159 cp -f $(DIR_SRC)/config/updxlrator/download /var/ipfire/updatexlrator/bin/download
e79f3ac0
AF
160 cp -f $(DIR_SRC)/config/updxlrator/convert /var/ipfire/updatexlrator/bin/convert
161 cp -f $(DIR_SRC)/config/updxlrator/lscache /var/ipfire/updatexlrator/bin/lscache
4f4092e3
CS
162 cp -f $(DIR_SRC)/config/updxlrator/checkdeaddl /var/ipfire/updatexlrator/bin/checkdeaddl
163
bffe0abd 164 cp -f $(DIR_SRC)/config/updxlrator/updxlrator-lib.pl /var/ipfire/updatexlrator/updxlrator-lib.pl
5ae664e1 165
46c01c09 166 chmod 755 /usr/sbin/updxlrator /var/ipfire/updatexlrator/bin/checkup \
5ae664e1
AF
167 /var/ipfire/updatexlrator/bin/download \
168 /var/ipfire/updatexlrator/bin/convert \
4f4092e3
CS
169 /var/ipfire/updatexlrator/bin/lscache \
170 /var/ipfire/updatexlrator/bin/checkdeaddl
46c01c09 171
09eb4f00
MT
172 ln -fs /bin/false /var/ipfire/updatexlrator/autocheck/cron.daily
173 ln -fs /bin/false /var/ipfire/updatexlrator/autocheck/cron.monthly
174 ln -fs /bin/false /var/ipfire/updatexlrator/autocheck/cron.weekly
46c01c09
MT
175
176 chown -R nobody:nobody /var/ipfire/updatexlrator
859100c5 177 chown -R root:root /var/ipfire/updatexlrator/bin
362c5537 178 chown root:root /var/ipfire/updatexlrator/updxlrator-lib.pl
5db10f47
AF
179 chown nobody.squid /var/updatecache
180 chown nobody.squid /var/updatecache/download
181 chown nobody.squid /var/updatecache/metadata
182 chmod 775 /var/updatecache
183 chmod 775 /var/updatecache/download
184 chmod 775 /var/updatecache/metadata
46c01c09 185 chmod 755 /var/log/updatexlrator
bd24e1fa 186 chmod 755 /srv/web/ipfire/html/images/updbooster
66c36198 187
b4f8d26c
MT
188 chown squid:squid /var/log/squid
189 ln -sf /usr/lib/squid /usr/lib/squid/auth
268292e7
CS
190 cp -f $(DIR_SRC)/config/proxy/proxy.pac /srv/web/ipfire/html/proxy.pac
191 chown nobody.nobody /srv/web/ipfire/html/proxy.pac
b4f8d26c 192 ln -sf /srv/web/ipfire/html/proxy.pac /srv/web/ipfire/html/wpad.dat
46c01c09 193
859100c5 194 # Copy stylesheets for the errorpages
ab4a5a35
AF
195 cp -f $(DIR_SRC)/config/proxy/errorpage-ipfire.css /var/ipfire/proxy/
196 cp -f /etc/squid/errorpage.css /var/ipfire/proxy/errorpage-squid.css
197
cd1a2927
MT
198 @rm -rf $(DIR_APP)
199 @$(POSTBUILD)