APKBUILD 3.5 KB
Newer Older
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
1
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
3
pkgname=squid
Leo's avatar
Leo committed
4
pkgver=4.11
5
pkgrel=0
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
6 7
pkgdesc="A full-featured Web proxy cache server."
url="http://www.squid-cache.org"
8
install="squid.pre-install squid.pre-upgrade"
9 10
pkgusers="squid"
pkggroups="squid"
11
arch="all"
12
license="GPL-2.0"
13
depends="logrotate"
14
makedepends="openssl-dev perl-dev autoconf automake heimdal-dev libtool
15
	libcap-dev linux-headers"
16
subpackages="$pkgname-doc"
Natanael Copa's avatar
Natanael Copa committed
17
linguas="af ar az bg ca cs da de el es et fa fi fr he hu hy id it ja ka ko lt
18 19
	lv ms nl oc pl pt ro ru sk sl sr sv th tr uk uz vi zh"
langdir="/usr/share/squid/errors"
Leo's avatar
Leo committed
20
source="http://www.squid-cache.org/Versions/v4/squid-$pkgver.tar.xz
21

Simon F's avatar
Simon F committed
22 23
	$pkgname.initd
	$pkgname.confd
24
	$pkgname.logrotate
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
25
	"
26 27
pkgusers="squid"
pkggroups="squid"
Simon F's avatar
Simon F committed
28
options="!check"  # does not work. Error message is about "applet not found", some issue with the installed busybox
29 30

# secfixes:
Kevin Daudt's avatar
Kevin Daudt committed
31 32 33 34 35
#   4.10-r0:
#     - CVE-2020-8449
#     - CVE-2020-8450
#     - CVE-2019-12528
#     - CVE-2020-8517
36 37
#   4.9-r0:
#     - CVE-2019-18679
Natanael Copa's avatar
Natanael Copa committed
38 39
#   4.8-r0:
#     - CVE-2019-13345
40
#   3.5.27-r2:
41 42
#     - CVE-2018-1000024
#     - CVE-2018-1000027
43
#     - CVE-2018-1172
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
44

45
build() {
46
	case "$CARCH" in mips|mipsel*) export ac_cv_search___atomic_load_8=-latomic ;; esac
47 48 49 50
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
51 52 53
		--datadir=/usr/share/squid \
		--sysconfdir=/etc/squid \
		--libexecdir=/usr/lib/squid \
54
		--localstatedir=/var \
55
		--with-logdir=/var/log/squid \
56
		--disable-strict-error-checking \
57
		--disable-arch-native \
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
58
		--enable-removal-policies="lru,heap" \
Natanael Copa's avatar
Natanael Copa committed
59
		--enable-auth-digest \
Timo Teräs's avatar
Timo Teräs committed
60
		--enable-auth-basic="getpwnam,NCSA,SMB,SMB_LM,RADIUS" \
61
		--enable-epoll \
62
		--enable-external-acl-helpers="file_userip,unix_group,wbinfo_group,session" \
Simon F's avatar
Simon F committed
63
		--enable-auth-ntlm="fake,SMB_LM" \
Natanael Copa's avatar
Natanael Copa committed
64
		--enable-auth-negotiate="kerberos,wrapper" \
65 66 67 68
		--disable-mit \
		--enable-heimdal \
		--enable-delay-pools \
		--enable-arp-acl \
Natanael Copa's avatar
Natanael Copa committed
69 70
		--enable-openssl \
		--enable-ssl-crtd \
71 72 73 74 75 76 77 78 79 80
		--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 \
81
		--enable-poll \
82
		--enable-follow-x-forwarded-for \
83
		--with-large-files \
84
		--with-default-user=squid \
Simon F's avatar
Simon F committed
85
		--with-openssl
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
86

Simon F's avatar
Simon F committed
87
	make
88 89 90
}

package() {
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
91 92 93 94
	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
95 96
	install -m644 -D "$srcdir"/$pkgname.logrotate \
		"$pkgdir"/etc/logrotate.d/squid
97

98 99 100 101
	install -d -o squid -g squid \
		"$pkgdir"/var/cache/squid \
		"$pkgdir"/var/log/squid \
		"$pkgdir"/var/run/squid
102
	chmod +x "$pkgdir"/usr/lib/squid/*
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
103 104
}

105 106 107 108 109
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/
}
Leo's avatar
Leo committed
110
sha512sums="02d4bb4d5860124347670615e69b1b92be7ea4fc0131e54091a06cb2e67bd73583d8e6cbe472473f0c59764611a49561d02ab9fe2bf0305ce4652d4ec7714f26  squid-4.11.tar.xz
111
8320820c02c824ed96065e0b66cabdd80b11c23e911880a42f5bd7e3f6e7a5c1c6def910a1843cca810c62a7dc8ccdb9ae82c0cf52bf08259c3b50058232132d  squid.initd
112
7292661de344e8a87d855c83afce49511685d2680effab3afab110e45144c0117935f3bf73ab893c9e6d43f7fb5ba013635e24f6da6daf0eeb895ef2e9b5baa9  squid.confd
Simon F's avatar
Simon F committed
113
89a703fa4f21b6c7c26e64a46fd52407e20f00c34146ade0bea0c4b63d050117c0f8e218f2256a1fbf6abb84f4ec9b0472c9a4092ff6e78f07c4f5a25d0892a5  squid.logrotate"