aboutsummaryrefslogtreecommitdiffstats
path: root/main/squid/APKBUILD
blob: 228a05d5e40a9801aedc2da6fdb08050fbde2950 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=squid
pkgver=4.15
pkgrel=0
pkgdesc="A full-featured Web proxy cache server."
url="http://www.squid-cache.org"
install="squid.pre-install squid.pre-upgrade"
pkgusers="squid"
pkggroups="squid"
arch="all"
license="GPL-2.0"
depends="logrotate"
makedepends="openssl-dev perl-dev autoconf automake heimdal-dev libtool
	libcap-dev linux-headers"
subpackages="$pkgname-doc"
linguas="af ar az bg ca cs da de el es et fa fi fr he hu hy id it ja ka ko lt
	lv ms nl oc pl pt ro ru sk sl sr sv th tr uk uz vi zh"
langdir="/usr/share/squid/errors"
source="http://www.squid-cache.org/Versions/v4/squid-$pkgver.tar.xz

	$pkgname.initd
	$pkgname.confd
	$pkgname.logrotate
	"
pkgusers="squid"
pkggroups="squid"
options="!check"  # does not work. Error message is about "applet not found", some issue with the installed busybox

# secfixes:
#   4.15-r0:
#     - CVE-2021-28651
#     - CVE-2021-28652
#     - CVE-2021-28662
#     - CVE-2021-31806
#     - CVE-2021-31807
#     - CVE-2021-31808
#     - GHSA-572g-rvwr-6c7f
#   4.14-r0:
#     - CVE-2020-25097
#   4.13-r0:
#     - CVE-2020-15810
#     - CVE-2020-15811
#     - CVE-2020-24606
#   4.10-r0:
#     - CVE-2020-8449
#     - CVE-2020-8450
#     - CVE-2019-12528
#     - CVE-2020-8517
#   4.9-r0:
#     - CVE-2019-18679
#   4.8-r0:
#     - CVE-2019-13345
#   3.5.27-r2:
#     - CVE-2018-1000024
#     - CVE-2018-1000027
#     - CVE-2018-1172

build() {
	case "$CARCH" in mips|mipsel*) export ac_cv_search___atomic_load_8=-latomic ;; esac
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--datadir=/usr/share/squid \
		--sysconfdir=/etc/squid \
		--libexecdir=/usr/lib/squid \
		--localstatedir=/var \
		--with-logdir=/var/log/squid \
		--disable-strict-error-checking \
		--disable-arch-native \
		--enable-removal-policies="lru,heap" \
		--enable-auth-digest \
		--enable-auth-basic="getpwnam,NCSA,SMB,SMB_LM,RADIUS" \
		--enable-epoll \
		--enable-external-acl-helpers="file_userip,unix_group,wbinfo_group,session" \
		--enable-auth-ntlm="fake,SMB_LM" \
		--enable-auth-negotiate="kerberos,wrapper" \
		--disable-mit \
		--enable-heimdal \
		--enable-delay-pools \
		--enable-arp-acl \
		--enable-openssl \
		--enable-ssl-crtd \
		--enable-linux-netfilter \
		--enable-ident-lookups \
		--enable-useragent-log \
		--enable-cache-digests \
		--enable-referer-log \
		--enable-async-io \
		--enable-truncate \
		--enable-arp-acl \
		--enable-htcp \
		--enable-carp \
		--enable-poll \
		--enable-follow-x-forwarded-for \
		--with-large-files \
		--with-default-user=squid \
		--with-openssl

	make
}

package() {
	make DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.logrotate \
		"$pkgdir"/etc/logrotate.d/squid

	install -d -o squid -g squid \
		"$pkgdir"/var/cache/squid \
		"$pkgdir"/var/log/squid \
		"$pkgdir"/var/run/squid
	chmod +x "$pkgdir"/usr/lib/squid/*
}

squid_kerb_auth() {
	pkgdesc="Squid kerberos authetication helper"
	install -d "$subpkgdir"/usr/lib/squid
	mv "$pkgdir"/usr/lib/squid/squid_kerb_auth "$subpkgdir"/usr/lib/squid/
}

sha512sums="8f0ce6e30dd9173927e8133618211ffb865fb5dde4c63c2fb465e2efccda4a6efb33f2c0846870c9b915340aff5f59461a60171882bcc0c890336b846fe60bd1  squid-4.15.tar.xz
8320820c02c824ed96065e0b66cabdd80b11c23e911880a42f5bd7e3f6e7a5c1c6def910a1843cca810c62a7dc8ccdb9ae82c0cf52bf08259c3b50058232132d  squid.initd
7292661de344e8a87d855c83afce49511685d2680effab3afab110e45144c0117935f3bf73ab893c9e6d43f7fb5ba013635e24f6da6daf0eeb895ef2e9b5baa9  squid.confd
89a703fa4f21b6c7c26e64a46fd52407e20f00c34146ade0bea0c4b63d050117c0f8e218f2256a1fbf6abb84f4ec9b0472c9a4092ff6e78f07c4f5a25d0892a5  squid.logrotate"