summaryrefslogtreecommitdiffstats
path: root/extra/squid/APKBUILD
blob: 68ceb744d9b74758883220d5c8bc6995bb29807f (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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=squid
pkgver=2.7.STABLE6
pkgrel=0
pkgdesc="A full-featured Web proxy cache server."
url="http://www.squid-cache.org"
license="GPL-2"
depends="openssl $pkgname-errors_english"
makedepends="openssl-dev perl-dev"
subpackages="$pkgname-doc
$pkgname-errors_armenian $pkgname-errors_azerbaijani
$pkgname-errors_bulgarian $pkgname-errors_catalan 
$pkgname-errors_czech $pkgname-errors_danish
$pkgname-errors_dutch $pkgname-errors_english
$pkgname-errors_estonian $pkgname-errors_finnish
$pkgname-errors_french $pkgname-errors_german
$pkgname-errors_greek $pkgname-errors_hebrew
$pkgname-errors_hungarian $pkgname-errors_italian
$pkgname-errors_japanese $pkgname-errors_korean
$pkgname-errors_lithuanian $pkgname-errors_polish
$pkgname-errors_portuguese $pkgname-errors_romanian
$pkgname-errors_russian_1251 $pkgname-errors_russian_koi8_r
$pkgname-errors_serbian $pkgname-errors_simplify_chinese
$pkgname-errors_slovak $pkgname-errors_spanish
$pkgname-errors_swedish $pkgname-errors_traditional_chinese
$pkgname-errors_turkish $pkgname-errors_ukrainian_1251
$pkgname-errors_ukrainian_koi8_u $pkgname-errors_ukrainian_utf8"
source="http://www.squid-cache.org/Versions/v2/2.7/${pkgname}-${pkgver}.tar.bz2
	squid.initd
	squid.confd
	squid-2.7-gentoo.patch
	"

build() {
	cd "$srcdir/$pkgname-$pkgver"

	patch -p1 -i "$srcdir"/squid-2.7-gentoo.patch || return 1

	./configure --prefix=/usr --datadir=/usr/share/squid \
		--sysconfdir=/etc/squid --libexecdir=/usr/lib/squid \
		--localstatedir=/var --enable-auth="basic,digest,ntlm" \
		--enable-removal-policies="lru,heap" \
		--enable-digest-auth-helpers="password" \
		--enable-storeio="aufs,ufs,diskd,coss,null" \
		--enable-basic-auth-helpers="getpwnam,NCSA,SMB,MSNT,multi-domain-NTLM" \
		--enable-external-acl-helpers="ip_user,unix_group,wbinfo_group" \
		--enable-ntlm-auth-helpers="SMB,fakeauth,no_check" \
		--enable-delay-pools --enable-arp-acl --enable-ssl \
		--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 --with-maxfd=4096

	make || return 1
	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
}


_mv_error() {
	local d=usr/share/squid/errors
	mkdir -p "$subpkgdir/$d"
	mv "$pkgdir/$d/${1}" "$subpkgdir/$d/" || return 1
	# last one removed the dir
	rmdir "$pkgdir/$d" 2>/dev/null
	return 0
}

errors_armenian() {
	depends="pkgname"
	_mv_error Armenian
}

errors_azerbaijani() {
	depends="pkgname"
	_mv_error Azerbaijani
}

errors_bulgarian() {
	depends="pkgname"
	_mv_error Bulgarian
}

errors_catalan() {
	depends="pkgname"
	_mv_error Catalan
}

errors_czech() {
	depends="pkgname"
	_mv_error Czech
}

errors_danish() {
	depends="pkgname"
	_mv_error Danish
}

errors_dutch() {
	depends="pkgname"
	_mv_error Dutch
}

errors_english() {
	depends="pkgname"
	_mv_error English
}

errors_estonian() {
	depends="pkgname"
	_mv_error Estonian
}

errors_finnish() {
	depends="pkgname"
	_mv_error Finnish
}

errors_french() {
	depends="pkgname"
	_mv_error French
}

errors_german() {
	depends="pkgname"
	_mv_error German
}

errors_greek() {
	depends="pkgname"
	_mv_error Greek
}

errors_hebrew() {
	depends="pkgname"
	_mv_error Hebrew
}

errors_hungarian() {
	depends="pkgname"
	_mv_error Hungarian
}

errors_italian() {
	depends="pkgname"
	_mv_error Italian
}

errors_japanese() {
	depends="pkgname"
	_mv_error Japanese
}

errors_korean() {
	depends="pkgname"
	_mv_error Korean
}

errors_lithuanian() {
	depends="pkgname"
	_mv_error Lithuanian
}

errors_polish() {
	depends="pkgname"
	_mv_error Polish
}

errors_portuguese() {
	depends="pkgname"
	_mv_error Portuguese
}

errors_romanian() {
	depends="pkgname"
	_mv_error Romanian
}

errors_russian_1251() {
	depends="pkgname"
	_mv_error Russian-1251
}

errors_russian_koi8_r() {
	depends="pkgname"
	_mv_error Russian-koi8-r
}

errors_serbian() {
	depends="pkgname"
	_mv_error Serbian
}

errors_simplify_chinese() {
	depends="pkgname"
	_mv_error Simplify_Chinese
}

errors_slovak() {
	depends="pkgname"
	_mv_error Slovak
}

errors_spanish() {
	depends="pkgname"
	_mv_error Spanish
}

errors_swedish() {
	depends="pkgname"
	_mv_error Swedish
}

errors_traditional_chinese() {
	depends="pkgname"
	_mv_error Traditional_Chinese
}

errors_turkish() {
	depends="pkgname"
	_mv_error Turkish
}

errors_ukrainian_1251() {
	depends="pkgname"
	_mv_error Ukrainian-1251
}

errors_ukrainian_koi8_u() {
	depends="pkgname"
	_mv_error Ukrainian-koi8-u
}

errors_ukrainian_utf8() {
	depends="pkgname"
	_mv_error Ukrainian-utf8
}


md5sums="6de3a6a7a56a7ecae092f2d31a04f039  squid-2.7.STABLE6.tar.bz2
d31f293cf10a90bc3d60aa6428889db5  squid.initd
44b052db7910f386ef88ddcf69c9ba4e  squid.confd
1d33108353d788b238d9a8877bf2e401  squid-2.7-gentoo.patch"