]>
Commit | Line | Data |
---|---|---|
4f9dda45 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
4f9dda45 BS |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = squid |
802ea3af | 7 | major_ver = 3.1 |
fb8afaf0 CS |
8 | version = %{major_ver}.19 |
9 | release = 1 | |
4f9dda45 | 10 | |
802ea3af MT |
11 | maintainer = Christian Schmidt <christian.schmidt@ipfire.org> |
12 | groups = Networking/Daemons | |
13 | url = http://www.squid-cache.org/ | |
14 | license = GPLv2+ | |
15 | summary = The Squid proxy caching server. | |
4f9dda45 | 16 | |
802ea3af MT |
17 | description |
18 | Squid is a high-performance proxy caching server for Web clients, | |
19 | supporting FTP, gopher, and HTTP data objects. Unlike traditional | |
20 | caching software, Squid handles all requests in a single, | |
21 | non-blocking, I/O-driven process. Squid keeps meta data and especially | |
22 | hot objects cached in RAM, caches DNS lookups, supports non-blocking | |
23 | DNS lookups, and implements negative caching of failed requests. | |
24 | end | |
4f9dda45 | 25 | |
802ea3af | 26 | source_dl = http://www.squid-cache.org/Versions/v3/%{major_ver}/ |
321c867a | 27 | |
802ea3af MT |
28 | build |
29 | requires | |
30 | gcc-c++ | |
31 | libxml2-devel | |
32 | openssl-devel | |
33 | openldap-devel | |
34 | samba-devel | |
35 | iptables-devel | |
36 | pam-devel | |
37 | libcap-devel | |
38 | /usr/bin/smbclient | |
fcf279c0 | 39 | shadow-utils |
802ea3af | 40 | end |
4f9dda45 | 41 | |
165d2feb | 42 | CFLAGS += -Wno-error |
4f9dda45 | 43 | |
802ea3af MT |
44 | configure_options += \ |
45 | --datadir=/usr/lib/squid \ | |
46 | --libexecdir=/usr/lib/squid \ | |
47 | --localstatedir=/var \ | |
48 | --sysconfdir=/etc/squid \ | |
fcf279c0 | 49 | --with-logdir=/var/log/squid \ |
802ea3af MT |
50 | --enable-storeio="aufs,diskd,ufs" \ |
51 | --enable-removal-policies="heap,lru" \ | |
52 | --enable-icmp \ | |
53 | --enable-delay-pools \ | |
54 | --disable-esi \ | |
d7b41604 | 55 | --enable-icap-client \ |
802ea3af MT |
56 | --enable-useragent-log \ |
57 | --enable-referrer-log \ | |
d7b41604 CS |
58 | --enable-wccp \ |
59 | --enable-wccpv2 \ | |
802ea3af MT |
60 | --enable-kill-parent-hack \ |
61 | --enable-snmp \ | |
62 | --enable-arp-acl \ | |
63 | --enable-ipf-transparent \ | |
64 | --enable-htcp \ | |
65 | --enable-ssl \ | |
66 | --enable-forw-via-db \ | |
67 | --disable-cache-digests \ | |
68 | --enable-poll \ | |
69 | --enable-select \ | |
70 | --disable-kqueue \ | |
71 | --enable-epoll \ | |
72 | --enable-http-violations \ | |
73 | --enable-linux-netfilter \ | |
74 | --disable-ident-lookups \ | |
75 | --enable-internal-dns \ | |
76 | --enable-auth=basic,ntlm \ | |
77 | --enable-basic-auth-helpers="LDAP,MSNT,multi-domain-NTLM,PAM,NCSA,SMB,squid_radius_auth" \ | |
78 | --enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth" \ | |
79 | --enable-ntlm-fail-open \ | |
80 | --with-filedescriptors=16384 \ | |
81 | --enable-unlinkd \ | |
82 | --with-pthreads \ | |
83 | --with-aio \ | |
84 | --with-dl \ | |
85 | --with-large-files | |
4f9dda45 | 86 | |
fcf279c0 CS |
87 | prepare_cmds |
88 | %{create_user} | |
89 | end | |
90 | ||
802ea3af MT |
91 | install_cmds |
92 | rm -vf %{BUILDROOT}/etc/squid/errors | |
f464ef1e | 93 | |
802ea3af MT |
94 | mkdir -pv %{BUILDROOT}/var/log/cache %{BUILDROOT}/var/log/squid |
95 | touch %{BUILDROOT}/var/log/squid/access.log | |
fcf279c0 | 96 | touch %{BUILDROOT}/var/log/squid/cache.log |
802ea3af | 97 | mkdir -pv %{BUILDROOT}/var/cache/squid |
4f9dda45 | 98 | |
fcf279c0 CS |
99 | echo "visible_hostname %{DISTRO_NAME}" >> %{BUILDROOT}/etc/squid/squid.conf |
100 | echo "cache_effective_user squid" >> %{BUILDROOT}/etc/squid/squid.conf | |
101 | echo "cache_effective_group squid" >> %{BUILDROOT}/etc/squid/squid.conf | |
1f9bc2f0 | 102 | |
fcf279c0 CS |
103 | chown -Rv squid:squid %{BUILDROOT}/var/log/squid %{BUILDROOT}/var/log/cache %{BUILDROOT}/var/cache/squid |
104 | chmod 600 %{BUILDROOT}/var/cache/squid | |
217da106 CS |
105 | mkdir -pv %{BUILDROOT}/etc/sysconfig |
106 | cp -vf %{DIR_SOURCE}/squid.sysconfig %{BUILDROOT}/etc/sysconfig/squid | |
107 | cp -vf %{DIR_SOURCE}/cache_swap.sh %{BUILDROOT}/usr/lib/squid/ | |
108 | chmod 755 %{BUILDROOT}/usr/lib/squid/cache_swap.sh | |
109 | chown -Rv squid:squid %{BUILDROOT}/usr/lib/squid/cache_swap.sh | |
802ea3af MT |
110 | end |
111 | end | |
4f9dda45 | 112 | |
fcf279c0 CS |
113 | create_user |
114 | getent group squid >/dev/null || /usr/sbin/groupadd -r squid | |
115 | getent passwd squid >/dev/null || /usr/sbin/useradd -r -g squid \ | |
116 | -d /var/cache/squid -s /sbin/nologin squid | |
117 | end | |
118 | ||
802ea3af MT |
119 | packages |
120 | package %{name} | |
7d9b1d61 SS |
121 | prerequires |
122 | shadow-utils | |
123 | systemd-units | |
124 | end | |
217da106 CS |
125 | |
126 | configfiles | |
127 | /etc/squid.conf | |
128 | /etc/sysconfig/squid | |
129 | end | |
fcf279c0 CS |
130 | |
131 | script prein | |
132 | %{create_user} | |
133 | end | |
217da106 CS |
134 | |
135 | script postin | |
136 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
137 | end | |
138 | ||
139 | script preun | |
140 | /bin/systemctl --no-reload disable squid.service >/dev/null 2>&1 || : | |
141 | /bin/systemctl stop squid.service >/dev/null 2>&1 || : | |
142 | end | |
143 | ||
144 | script postun | |
145 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
146 | end | |
147 | ||
148 | script postup | |
149 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
150 | /bin/systemctl try-restart squid.service >/dev/null 2>&1 || : | |
151 | end | |
152 | ||
802ea3af | 153 | requires = /usr/bin/smbclient |
165d2feb | 154 | |
fb8afaf0 | 155 | filter_requires = perl.Auth.* |
802ea3af | 156 | end |
1f9bc2f0 MT |
157 | |
158 | package %{name}-debuginfo | |
159 | template DEBUGINFO | |
160 | end | |
802ea3af | 161 | end |