]>
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 |
92f2d78e SS |
7 | major_ver = 5 |
8 | minor_ver = 7 | |
9 | version = %{major_ver}.%{minor_ver} | |
d6112748 | 10 | release = 1.1 |
4f9dda45 | 11 | |
802ea3af | 12 | groups = Networking/Daemons |
92f2d78e | 13 | url = https://www.squid-cache.org/ |
802ea3af | 14 | license = GPLv2+ |
92f2d78e | 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 | |
d6112748 | 26 | source_dl = http://www.squid-cache.org/Versions/v%{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 | |
802ea3af MT |
35 | pam-devel |
36 | libcap-devel | |
fcf279c0 | 37 | shadow-utils |
92f2d78e | 38 | systemd-devel |
802ea3af | 39 | end |
4f9dda45 | 40 | |
165d2feb | 41 | CFLAGS += -Wno-error |
4f9dda45 | 42 | |
802ea3af MT |
43 | configure_options += \ |
44 | --datadir=/usr/lib/squid \ | |
45 | --libexecdir=/usr/lib/squid \ | |
46 | --localstatedir=/var \ | |
47 | --sysconfdir=/etc/squid \ | |
fcf279c0 | 48 | --with-logdir=/var/log/squid \ |
802ea3af MT |
49 | --enable-storeio="aufs,diskd,ufs" \ |
50 | --enable-removal-policies="heap,lru" \ | |
51 | --enable-icmp \ | |
52 | --enable-delay-pools \ | |
53 | --disable-esi \ | |
d7b41604 | 54 | --enable-icap-client \ |
802ea3af MT |
55 | --enable-useragent-log \ |
56 | --enable-referrer-log \ | |
d7b41604 CS |
57 | --enable-wccp \ |
58 | --enable-wccpv2 \ | |
802ea3af MT |
59 | --enable-kill-parent-hack \ |
60 | --enable-snmp \ | |
61 | --enable-arp-acl \ | |
802ea3af | 62 | --enable-htcp \ |
92f2d78e | 63 | --disable-ssl \ |
802ea3af MT |
64 | --enable-forw-via-db \ |
65 | --disable-cache-digests \ | |
66 | --enable-poll \ | |
67 | --enable-select \ | |
68 | --disable-kqueue \ | |
69 | --enable-epoll \ | |
70 | --enable-http-violations \ | |
71 | --enable-linux-netfilter \ | |
72 | --disable-ident-lookups \ | |
73 | --enable-internal-dns \ | |
92f2d78e | 74 | --enable-auth \ |
802ea3af MT |
75 | --enable-basic-auth-helpers="LDAP,MSNT,multi-domain-NTLM,PAM,NCSA,SMB,squid_radius_auth" \ |
76 | --enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth" \ | |
77 | --enable-ntlm-fail-open \ | |
78 | --with-filedescriptors=16384 \ | |
79 | --enable-unlinkd \ | |
80 | --with-pthreads \ | |
81 | --with-aio \ | |
82 | --with-dl \ | |
83 | --with-large-files | |
4f9dda45 | 84 | |
fcf279c0 CS |
85 | prepare_cmds |
86 | %{create_user} | |
87 | end | |
88 | ||
802ea3af MT |
89 | install_cmds |
90 | rm -vf %{BUILDROOT}/etc/squid/errors | |
f464ef1e | 91 | |
802ea3af MT |
92 | mkdir -pv %{BUILDROOT}/var/log/cache %{BUILDROOT}/var/log/squid |
93 | touch %{BUILDROOT}/var/log/squid/access.log | |
fcf279c0 | 94 | touch %{BUILDROOT}/var/log/squid/cache.log |
802ea3af | 95 | mkdir -pv %{BUILDROOT}/var/cache/squid |
4f9dda45 | 96 | |
fcf279c0 CS |
97 | echo "visible_hostname %{DISTRO_NAME}" >> %{BUILDROOT}/etc/squid/squid.conf |
98 | echo "cache_effective_user squid" >> %{BUILDROOT}/etc/squid/squid.conf | |
99 | echo "cache_effective_group squid" >> %{BUILDROOT}/etc/squid/squid.conf | |
1f9bc2f0 | 100 | |
fcf279c0 CS |
101 | chown -Rv squid:squid %{BUILDROOT}/var/log/squid %{BUILDROOT}/var/log/cache %{BUILDROOT}/var/cache/squid |
102 | chmod 600 %{BUILDROOT}/var/cache/squid | |
217da106 CS |
103 | mkdir -pv %{BUILDROOT}/etc/sysconfig |
104 | cp -vf %{DIR_SOURCE}/squid.sysconfig %{BUILDROOT}/etc/sysconfig/squid | |
105 | cp -vf %{DIR_SOURCE}/cache_swap.sh %{BUILDROOT}/usr/lib/squid/ | |
106 | chmod 755 %{BUILDROOT}/usr/lib/squid/cache_swap.sh | |
107 | chown -Rv squid:squid %{BUILDROOT}/usr/lib/squid/cache_swap.sh | |
802ea3af MT |
108 | end |
109 | end | |
4f9dda45 | 110 | |
fcf279c0 CS |
111 | create_user |
112 | getent group squid >/dev/null || /usr/sbin/groupadd -r squid | |
113 | getent passwd squid >/dev/null || /usr/sbin/useradd -r -g squid \ | |
114 | -d /var/cache/squid -s /sbin/nologin squid | |
115 | end | |
116 | ||
802ea3af MT |
117 | packages |
118 | package %{name} | |
7d9b1d61 SS |
119 | prerequires |
120 | shadow-utils | |
121 | systemd-units | |
122 | end | |
217da106 CS |
123 | |
124 | configfiles | |
125 | /etc/squid.conf | |
126 | /etc/sysconfig/squid | |
127 | end | |
fcf279c0 CS |
128 | |
129 | script prein | |
130 | %{create_user} | |
131 | end | |
217da106 CS |
132 | |
133 | script postin | |
134 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
135 | end | |
136 | ||
137 | script preun | |
138 | /bin/systemctl --no-reload disable squid.service >/dev/null 2>&1 || : | |
139 | /bin/systemctl stop squid.service >/dev/null 2>&1 || : | |
140 | end | |
141 | ||
142 | script postun | |
143 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
144 | end | |
145 | ||
146 | script postup | |
147 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
148 | /bin/systemctl try-restart squid.service >/dev/null 2>&1 || : | |
149 | end | |
150 | ||
fb8afaf0 | 151 | filter_requires = perl.Auth.* |
802ea3af | 152 | end |
1f9bc2f0 MT |
153 | |
154 | package %{name}-debuginfo | |
155 | template DEBUGINFO | |
156 | end | |
802ea3af | 157 | end |